Jump to content

[1.2-1.7] Blender (2.83+) .mu import/export addon


Recommended Posts

Hi, I wonder if anyone can help me!

I am editing a mu file. I'm very new to Blender but I have managed to edit the model in the way I want, unfortunately, when I export to mu, the model has lost the silver reflective coating:

https://ibb.co/nDhRvxb

I guess I need to do something with 'materials' although the detailed lines are all correct, it is just the wrong colour and not reflective

Any help gratefully received :)

Link to comment
Share on other sites

6 hours ago, RealTimeShepherd said:

Hi, I wonder if anyone can help me!

I am editing a mu file. I'm very new to Blender but I have managed to edit the model in the way I want, unfortunately, when I export to mu, the model has lost the silver reflective coating:

https://ibb.co/nDhRvxb

I guess I need to do something with 'materials' although the detailed lines are all correct, it is just the wrong colour and not reflective

Any help gratefully received :)

If you want it to have a shiny e.g metalic sheen, then the material needs to be set to "KSP Bumped Specular (Mapped)

You need to have 3 texture files, your  _MainTex, _BumpMap and your _SpecMap. Your Specmap should be a copy of your Maintex but about 50%darker and your Bumpmap should be a sort of Lavender colour, you want to colour pick the Squad Foil Tanks Bumpmap to get the exact colour. The bumpmap can be uniformly that colour if you aren't trying to create the illusion of grooves etc.

The Squad foil tanks are the best place to get a good idea of how it is all set up, just load one of the models into blender, highlight a mesh and then look at it's material properties, scroll down inside the material properties sub window till you get to "Mu Shader". Within it are the areas where you can choose your shader and input the names of the texture files you have made. If you are doing this from scratch rather than making use of the foil tanks material setup and changing the texture pics it looks for, then in the box that says "Name", just above the box that says "Shader", be sure to put in a name you come up with. If you don't do it here then the from scratch material won't save on export.

So if you do all this with your textures in the same folder as your config and .mu file then it should come out looking right.

 

Now I have written this by guessing what your problem may be. As the most likely. Quite often there are many possibilities but unless we have all the facts about what you have done we can only guess. If this doesn't fix your problem then the next time you post could you please, Tell us the folder structure you have your model in, pop its config text in a spoiler so we can see if there is anything in it that may cause a texture not to be included, let us know what material set up you have used and if you have all the required texture pics for it?

For more info that may help with your future work, please take a look at my thread about using the .mu plugin.

 

Link to comment
Share on other sites

@ColdJ - Many thanks for your long and detailed reply!!

I will try and explain exactly what is happening. I have downloaded a mod: StarShip Expansion Project, which contains a lot of beautiful StarShip parts all loving coloured by the mod owner

I would like to modify one or two of these parts in order to create a StarShip variant with no heat shield. So I'm starting with a piece named SEP_S20_BODY. The original piece looks like this in game:

https://ibb.co/TBd8M3J

Note the reflective surface on the right!

So, I just want that reflective surface to remain as it is. I have noted that if I import the MU file in place and immediately export it without making any changes it loses the colour. This is the same piece and all I did was import it (SEP_S20_BODY.mu) and then export it as SEP_S20_BODY_NHS.mu (for No Heat Shield)

https://ibb.co/Ptd5C96

I duplicated the SEP_S20_BODY.cfg file as SEP_S20_BODY_NHS.cfg and renamed all instances of SEP_S20_BODY within to SEP_S20_BODY_NHS, this has enabled me to select it as a separate part in the VAB

So, I'm not sure I can copy the material from the Squad foil tanks, as I need it to continue to match the other pieces in the mod. And I don't think I can examine the materials of the existing mod pieces as they seem to lose their shiny material as soon as I import them into Blender

Below is the contents of SEP_S20_BODY_NHS.cfg

Spoiler
PART
{
  name = SEP_S20_BODY_NHS
  module = Part
  author = Kari
 
  MODEL
  {
    model = StarshipExpansionProject/Assets/SEP_S20_BODY_NHS
    }
 
  rescaleFactor = 0.625
 
  NODE
  {
    name = node_top
    transform = node_top
    size = 4
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_1
    transform = node_rvac_1
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_2
    transform = node_rvac_2
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_3
    transform = node_rvac_3
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_alt_1
    transform = node_rvac_alt_1
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_alt_2
    transform = node_rvac_alt_2
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_alt_3
    transform = node_rvac_alt_3
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_alt_4
    transform = node_rvac_alt_4
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_alt_5
    transform = node_rvac_alt_5
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_alt_6
    transform = node_rvac_alt_6
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rap_1
    transform = node_rap_1
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rap_2
    transform = node_rap_2
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rap_3
    transform = node_rap_3
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_sofie_1
    transform = node_rvac_sofie_1
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_sofie_2
    transform = node_rvac_sofie_2
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_sofie_3
    transform = node_rvac_sofie_3
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_sofie_4
    transform = node_rvac_sofie_4
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_sofie_5
    transform = node_rvac_sofie_5
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_rvac_sofie_6
    transform = node_rvac_sofie_6
    size = 1
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_fin_left
    transform = node_fin_left
    size = 2
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_fin_right
    transform = node_fin_right
    size = 2
    method = FIXED_JOINT
  }
  NODE
  {
    name = node_bottom
    transform = node_bottom
    size = 4
    method = FIXED_JOINT
  }
   
  //CenterOfBuoyancy = 0.0, 5.0, 0.0
  //CenterOfDisplacement = 0.0, 5.0, 0.0
  //CoMoffset = 0.0, 3.0, 0.0
 
  node_attach = 0.0, 0.0, 0.0, 0.0, 0.0, 1.0
  stackSymmetry = 2
 
  TechRequired = veryHeavyRocketry
  entryCost = 35000
  cost = 29850
  category = FuelTank
  subcategory = 0
  title = Donnager MK-1 Main Body
  manufacturer = Starship Expansion Project
  description = The center of everything. The Mother of all Tin Cans!
  tags = BFR ITS big BFS ship starship tanker refuel shroud engine wing deltawing landing spacex
  attachRules = 1,1,1,1,0
  mass = 13
  dragModelType = default
  maximum_drag = 0.2
  minimum_drag = 0.3
  angularDrag = 2
  crashTolerance = 20
  maxTemp = 2700
  breakingForce = 3600
  breakingTorque = 3600
  bulkheadProfiles = size4, srf
  // autoStrutMode = Grandparent
 
  EFFECTS
  {
    running_vent
    {
      AUDIO_MULTI_POOL
      {
        channel = Ship
        transformName = VentTransform
        clip = sound_rocket_mini
        volume = 0.0 0.0
        volume = 1.0 0.1
        pitch = 1.0
        loop = true
      }
    }
  }
 
  MODULE
  {
    name = ModuleColorChanger
    shaderProperty = _EmissiveColor
    animState = false
    toggleInEditor = false
    toggleInFlight = false
    toggleAction = false
    redCurve
    {
      key = 0 0
      key = 1 0
    }
    greenCurve
    {
      key = 0 0
      key = 1 0
    }
    blueCurve
    {
      key = 0 0
      key = 1 0
    }
    alphaCurve
    {
      key = 0 0
      key = 1 0
    }
  }
  MODULE
  {
    name = ModuleCargoBay
    DeployModuleIndex = 0
    closedPosition = 0
    lookupRadius = 10
    lookupCenter = 0, -12, 0
  }
 
  MODULE
  {
    name = ModuleDockingNode
    nodeType = BTB
    referenceAttachNode = node_bottom
    stagingToggleEnabledEditor = False
    acquireForce = 20
        acquireTorque = 1.0
    minDistanceToReEngage = 4.0
    useReferenceAttachNode = false
   
  }
 
  MODULE
  {
        name = ModuleB9PartSwitch
        moduleID = SEP_Docking_Switch
    title = Docking Port Switch
        switcherDescription = Docking System
    switchInFlight = true
       
        SUBTYPE
        {
            name = BTB
            title = Butt to Butt
            descriptionSummary = Butt to Butt Variant
            descriptionDetail = Butt to Butt Variant
            primaryColor = #FFFFFF
     
            TRANSFORM
            {
                name = dockingNode
                positionOffset = 0.0, 0.0, 0.0
                rotationOffset = 0.0, 0.0, 0.0
            }
      MODULE
            {
                IDENTIFIER
        {
                    name = ModuleDockingNode
                }
                DATA
                {
                nodeType = BTB
        referenceAttachNode = node_bottom
        acquireForce = 15
                }
            }
               
        }
        SUBTYPE
        {
            name = QD
            title = QD to QD
            descriptionSummary = QD Port Variant
            descriptionDetail = QD PortVariant
            primaryColor = #808080
            TRANSFORM
            {
                name = dockingNode
        positionOffset = 0.0, 0.04545, 0.0272984
                rotationOffset = 90.0, 0.0, 0.0
            }
      MODULE
            {
                IDENTIFIER
        {
                    name = ModuleDockingNode
                }
                DATA
                {
                nodeType = QD
        referenceAttachNode = QD
        acquireForce = 7.5
                }
            }
           
           
        }
    }
 
  MODULE
  {
    name = ModuleB9PartSwitch
    moduleID = SEP_Raptor
    switcherDescription = Number of Vacuum Raptors
   
    SUBTYPE
    {
      name = 3RVAC
      title = 3 Rvacs
      descriptionSummary = Default 3 Rvac Variant
      descriptionDetail = Default 3 Rvac Variant
      primaryColor = #FFFFFF
      secondaryColor = #808080
      transform = 3
      node = node_rvac_1
      node = node_rvac_2
      node = node_rvac_3
 
    }
    SUBTYPE
    {
      name = 6RVAC
      title = 6 Rvacs
      descriptionSummary = 6 Rvac Variant
      descriptionDetail = 6 Rvac Variant
      primaryColor = #808080
      secondaryColor = #FFFFFF
      transform = 6
      node = node_rvac_alt_1
      node = node_rvac_alt_2
      node = node_rvac_alt_3
      node = node_rvac_alt_4
      node = node_rvac_alt_5
      node = node_rvac_alt_6
    }
    SUBTYPE
    {
      name = 6Sofie
      title = Sofie Layout
      descriptionSummary = 6 Rvac Sofie Layout
      descriptionDetail = 6 Rvac Sofie Layout
      primaryColor = #808080
      transform = SofieLayout
      node = node_rvac_sofie_1
      node = node_rvac_sofie_2
      node = node_rvac_sofie_3
      node = node_rvac_sofie_4
      node = node_rvac_sofie_5
      node = node_rvac_sofie_6
    }
  }
 
  MODULE
  {
    name = ModuleB9PartSwitch
    moduleID = SEP_Raceway
    switcherDescription = Raceway Toggle
   
    SUBTYPE
    {
      name = RacewayON
      title = Raceway ON
      descriptionSummary = Default ON
      primaryColor = #FFFFFF
      secondaryColor = #808080
      transform = Raceway
 
    }
    SUBTYPE
    {
      name = RacewayOFF
      title = Raceway OFF
      descriptionSummary = Disabled
      primaryColor = #808080
      secondaryColor = #FFFFFF
    }
  }
 
  MODULE
  {
    name = ModuleRCSFX
    thrusterTransformName = RCS
    thrusterPower = 20
    resourceName = LiquidFuel
    resourceFlowMode = STAGE_PRIORITY_FLOW
    PROPELLANT
    {
      name = LiquidFuel
      ratio = 1.1
      DrawGauge = True
      resourceFlowMode = STAGE_PRIORITY_FLOW
    }
    PROPELLANT
    {
      name = Oxidizer
      ratio = 1.3
      resourceFlowMode = STAGE_PRIORITY_FLOW
    }
    atmosphereCurve
    {
      key = 0 290
      key = 1 160
      key = 5 0.001
    }
  }
 
  MODULE
  {
        name = ModuleEnginesFX
    engineID = Vents
        thrustVectorTransformName = VentTransform
        throttleLocked = True
        exhaustDamage = True
        allowShutdown = True
    stagingEnabled = False
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 1
        heatProduction = 0
        fxOffset = 0, 0, 0
        nonThrustMotor = true
        EngineType = LiquidFuel
        exhaustDamageMultiplier = 50
    runningEffectName = running_vent
    multFlow = 2
    overrideStagingIconIfBlank = false
   
        PROPELLANT
    {
      name = LiquidFuel
      ratio = 1.1
    }
    PROPELLANT
    {
      name = Oxidizer
      ratio = 1.3
    }
 
        atmosphereCurve
    {
            key = 0 1
            key = 1 1
            key = 6 0.001
        }
  }
  MODULE
  {
    name = ModuleDataTransmitter
    packetInterval = 0.2
    packetSize = 3
    packetResourceCost = 20.0
    requiredResource = ElectricCharge
    antennaPower = 5000000
    DeployFxModules = 0
  }
 
}

Below is what I see if I examine the material properties of one of the shiny metal pieces directly after importing the original piece into Blender:

https://ibb.co/VCTG5dR

I don't know if this is valid though, because like I say, if I export it like that, the colour vanishes

Hope that all makes sense. Do you have any idea what is going on?

Link to comment
Share on other sites

@RealTimeShepherd

At a guess, assuming you have your version in the same folder structure as the original. It is because it requires B9 part switching or there is a patch to use a texture changing mod. Either of these would have a config file that tells Module Manager to apply these to the particular model/config. So the author should have a patch in their folder structure to get MM to apply. Now that relies on the model/config having a specific name. So as soon as you change the names the patch no longer applies to the new names. If I am correct then you need to find the config for the patch, go in and find the section that applies to the original and then duplicate that section below it making sure that any bracket structure is properly maintained. Then in the duplicate rename the sections that say the original names, most likely the unique name = in the the part config to say your new name. This should add that part to the patch and make sure that the (most likely texture mod) is applied to your new config/part.

Try that. Make a copy of the entire patch config first and store it outside of the GameData folder structure so that if you make a mistake you have a backup. Be sure to get all the brackets as 1 wrong bracket could stop the entire patch from working.

If this is the issue I hope this helps fix it.

Link to comment
Share on other sites

@ColdJ Hooray!!!! :D

Thank you my friend, there is a cfg file called TexturesUnlimited.cfg which had an entry for the original part. I added the name for the new part and voila, it now has the silver material applied

This opens up so many possibilities, I am (almost literally) over the moon :) :)

Thank you once again!!

Link to comment
Share on other sites

@ColdJ - Hey! :) The next thing I am trying to do is alter the texture on my new piece. I could use the existing one (SEP_S20_Spec.dds), but the belly of the ship doesn't have the same seams and markings on, so I have successfully edited the dds file (SEP_S20_Spec_belly), created a new material, imported the dds file, applied it to the new piece, edited the UV mapping (All of this is brand new to me, it's exhausting...), and within blender it all looks as it should. When I export, I see the name of the new material at the very end of the MU file (using a hex editor), but in game, the texture is just black

I also notice in the KSP.log, that my new dds file (SEP_S20_Spec_belly.dds) is not being loaded, while the original ones either side of it are all being loaded:

Spoiler

....

[LOG 21:00:03.486] Load(Texture): SquadExpansion/Serenity/Parts/Structural/gripPads/Assets/gripPads_diffuse
[LOG 21:00:03.497] Load(Texture): SquadExpansion/Serenity/Parts/Structural/gripPads/Assets/gripPads_nrm
[LOG 21:00:03.506] Load(Texture): StarshipExpansionProject/Assets/SEP_B4_Cover_NRM
[LOG 21:00:03.550] Load(Texture): StarshipExpansionProject/Assets/SEP_B4_Spec
[LOG 21:00:03.608] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_EM
[LOG 21:00:03.619] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Flaps
[LOG 21:00:03.666] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Flaps_NRM
[LOG 21:00:03.732] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_Gray
[LOG 21:00:03.743] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_Green
[LOG 21:00:03.753] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_SL_NRM
[LOG 21:00:03.763] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_SpecMap
[LOG 21:00:03.773] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_VAC
[LOG 21:00:03.783] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_VAC_NRM
[LOG 21:00:03.794] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Raptor_VAC_SpecMap
[LOG 21:00:03.804] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Spec
[LOG 21:00:03.850] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_Spec2
[LOG 21:00:03.910] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_TilesBody
[LOG 21:00:03.955] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_TilesBody_NRM
[LOG 21:00:04.003] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_TilesNose
[LOG 21:00:04.062] Load(Texture): StarshipExpansionProject/Assets/SEP_S20_TilesNose_NRM
[LOG 21:00:04.118] Load(Texture): StarshipExpansionProject/Categories/SEP
[LOG 21:00:04.126] Load(Texture): StarshipExpansionProject/Parts/@thumbs/SEP.B4.29.CLUSTER_icon
[LOG 21:00:04.135] Load(Texture): StarshipExpansionProject/Parts/@thumbs/SEP.B4.33.CLUSTER_icon
....

I assume that my model section is black because the texture is not being loaded. Do you have any idea how I can resolve this?

(I have read almost all of "Somewhere to put any knowledge learned about using the .mu plugin.", certainly all of the entries with the word 'texture' plus a 25 minute video you linked to, which did help me with the UV mapping, but I have not managed to load my newly create texture...)

Link to comment
Share on other sites

5 hours ago, RealTimeShepherd said:

I assume that my model section is black because the texture is not being loaded. Do you have any idea how I can resolve this?

I had to check back to make sure that it wasn't you I had the conversation about .dds files with.

So first off, did you build the UV map over a .dds file? If so then you most likely have the sections in the wrong places. .dds files are upside down compared to all other formats and blender doesn't auto flip. That is why I UV map over a .png and only when everything is working do I flip the .png upside down and then save as a .dds then remove the .png so that it is the .dds that gets used.

If that is not it. What KSP shader did you use for your material set up? Did you remember to give it a unique name down in the MU Shader section, just above the box that says shader, so that your set up gets saved on export? Did you remember to name the the texture pics in the material set up to look for your named pics?

If the program can't find a pic it is set to look for then it will usually come out as the grey colour you see in the solid view when in blender, the default for when a model is not painted. That is why if it is black I think it is either, over the wrong section or if the shader requires more than one pic, then maybe they aren't configured right.

Alternatively it could be to do with the fact that the parts use a mod to give that specialised silvery look. I knew enough to work out what you most likely needed to do to make it work the same as the original part but I have never made use of that mod myself so I am not versed in its usage. It may be that there is something else that the mod needs to make a new texture work with it. Maybe you should comment out your addition to the patch while you are doing this to see if it comes out correctly in game. If it shows correctly, but not shiny, then you will know you have that bit right and need to work out for the patch. If it doesn't then you know something needs to be fixed in the materials set up.

5 hours ago, RealTimeShepherd said:

(All of this is brand new to me, it's exhausting...)

Man, do I know how that feels. When I joined in April 2021 I had never 3d modeled in my life and it was another 6 months before I even tried, after it was suggested to me that I do. There was very little information on how things worked and I started on BforArtists, which has a different default key map to blender (I now know that I can set it to the Blender key map, but didn't then) so when I tried to watch youtube tutorials the shortcuts didn't match. Trying to get members who had experience to help me learn was near useless, people are very quick to tell you when they don't agree with something you have said but very rarely are willing to help you learn to get it right. That is why I started my thread. I wanted others to have an easier time than me.

Let me know how you go.

Link to comment
Share on other sites

@ColdJ Oh man, yeah it was the upside down thing! lol

So I used a png and now I see my texture! The thing that was confusing me was that the whole dds image was the texture, so I couldn't understand why it was black if it was the wrong way up and not just an upside down texture, but I have noticed that the other dds files are all square, like 4096x4096 and mine was a slim rectangle, so maybe they always have to be square images? Not sure but there is progress at least :) 

Link to comment
Share on other sites

1 hour ago, RealTimeShepherd said:

Oh man, yeah it was the upside down thing! lol

They don't have to be perfectly square but they do have to have the UV map over the right parts, so when you changed the shape the UV mapping wouldn't be over the image in the right areas and so the black texture, because it could find the pic but it didn't fit. If it hadn't found the pic then it would be that grey colour.

So there you go. It is a good way to learn how things work. Trial and error have got me to where I am today. :)

 

Link to comment
Share on other sites

@ColdJ - I'm sorry to keep coming to you. I patched up some holes in the mesh I had copied by selecting verticies and using Ctrl-V to create a new face between the selected verticies. Now the new faces reflect the light in a different direction to those around them:

https://ibb.co/h8psrgY

It took me an age to create all the new faces, surely there is an easy funciton to make them reflect in the same direction?

Link to comment
Share on other sites

22 hours ago, RealTimeShepherd said:

@ColdJ - I'm sorry to keep coming to you. I patched up some holes in the mesh I had copied by selecting verticies and using Ctrl-V to create a new face between the selected verticies. Now the new faces reflect the light in a different direction to those around them:

https://ibb.co/h8psrgY

It took me an age to create all the new faces, surely there is an easy funciton to make them reflect in the same direction?

I don't know if the texture mod has any affect on that but what I can base it on is when I use the reflective shader that is part of stock KSP.

When you patched you added new faces that weren't part of the original so first they may not be as finely done as the original, that is the original faces were much smaller and so the transitions from face to face were less noticeable, meaning the more uniform appearance. It is like you have taken a glass blown, smooth shape and patched it using rectangles from a mirror ball, so the angles of light reflection are always going to be slightly different and noticeable. Check your wireframe and see if your patched areas are wider between edges, meaning they are subtly flatter and and so the edges are more pronounced. If this is the case then you will need to choose all the panels you made and separate them into a separate mesh, then go in to the modifiers and use the "Surface Subdivision" modifier to increase the faces per section to get a more subtle curve. 1 iteration should do depending on how they look compared to the originals. You can experiment before clicking the tick to lock the modification in to get it right.

Second possibility, if your faces are the same size, is that the original was shaded smooth. You can't shade flat a .mu to undo it and you can't remove the shade smooth once it has been saved, so you would have to do as above to separate your sections and then use shade smooth on mesh in the hopes it matches the original.

If neither of these work then you need to use the original like a 3d template and build a new model over it so you can tell where all the distances and angles should be. The "move cursor to selection" to choose a vertice and then the "move selection to cursor" functions can be very handy for this. You sort of shrink wrap the new model over the old. It is tedious work but in the end it will be all a new model so that when you UV map it, all the angles will be uniform at the same time..

Based on the pic it is probably either or both of the first 2 as you can see the obvious, diagonally cut rectangular faces.

See how that goes. You may have to look up some blender tutorials to understand how to use those funstions if you don't already know.

I will get you make your replies in my thread so we don't keep clogging up this one and will see if I can help you more once you have checked using this info and got back to me.

Good Luck.

 

Link to comment
Share on other sites

  • 1 month later...

Not sure if this is the right place but we'll see I guess.

 

Never used blender or anything of the sort before. I would like to increase the number of vertices for the fairing from Procedural Fairings so that it matches with the parts from NFLV as shown in picture. This seems like a fairly easy thing to do in my head but given the nature of the part (being procedural) might that bork that function??? Can this be done using blender with this plugin? Wouldn't mind also know how to make a proper stock-alike texture for the fairing so that it also matches stock/ NF suite if someone can point me in the right direction. Z85eF5G.png

Link to comment
Share on other sites

4 hours ago, FDAUT said:

This seems like a fairly easy thing to do in my head but given the nature of the part (being procedural) might that bork that function??

Quite possibly.

4 hours ago, FDAUT said:

Can this be done using blender with this plugin?

Yes

4 hours ago, FDAUT said:

Wouldn't mind also know how to make a proper stock-alike texture for the fairing so that it also matches stock/ NF suite if someone can point me in the right direction. 

Use the "Edge subdivide" function to create extra vertices evenly between the vertices for that edge. Then highlight only the new vertices and scale them evenly in 2 axis so that the edge ends up looking more circular.

Link to comment
Share on other sites

  • 1 month later...
6 hours ago, Jeb x Valentina said:

hello, I tried it with an sph craft, and it worked, but not with VAB, why?

Blender and the plugin would have no bearing on the SPH vs VAB as that is literally the game changing the starting orientation based on the building. If your model in blender is oriented the same as stock Squad parts of the same type then it should look right in game.

Link to comment
Share on other sites

On 2/17/2023 at 3:21 AM, ColdJ said:

Blender and the plugin would have no bearing on the SPH vs VAB as that is literally the game changing the starting orientation based on the building. If your model in blender is oriented the same as stock Squad parts of the same type then it should look right in game.

I mean- when importing a craft built in the SPH it's fine, but with VAB it pops up some weird errors ;.;

I'm trying to make an animation btw, I'm a stock lover non-modder dude

Here's a screenshot in case needed:

Imgur: The magic of the Internet

 

Link to comment
Share on other sites

I mean- when importing a craft built in the SPH it's fine, but with VAB it pops up some weird errors ;.;

You could always save them in the SPH, build them then swap editor to SPH, then save.

Did you remember to do this?

Importing Craft file into Blender to work on.

 

Thanks to the wisdom of @Concodroid. For the benefit of others as @linuxgurugamer now knows. Here is a simple import of the stock KerbalX.craft file to remove it's chute and make it a 3d printable file format that could also be potentially then exported as a solid .mu to be used as static. Make sure your folder pathway is set to GameData for the .mu pluging under the preferences section. Go to Kerbal Space Program\Ships\VAB\ using the import KSP craft files option and get the KerbalX.craft file. Use the picture to see where the Make Instances Real option is and click it. You will now have a long list on the right and you want to find section canopy.001

0KBdNq7.png

vDBgAv3.png

With just it highlighted you want to right click it and left click delete hierachy.

FaT0RtY.png

This will remove the chute. You then want to use the box or lasso select to highlight everything at once by putting it around the entire model.

nOEOTiu.png

Once everything is highlighted go over to the File drop down, go down to Export and choose as an STL, give it a name and save.

Start new to clear everything and then Import STL back in your saved file. You should now have a solid model of the KerbalX.

pmjAcuR.png

Remember to assign a Materials file and put it under a heirachy before trying to export as a .mu to use as a static. I don't yet know how to create those from scratch, so I import a simple .mu model, Grab the new model in the list and drag and drop it into the other models top heirachy, once over the the section you want to drop into, hold Shift, the section will go darker, then just release the mouse button to drop it in. Once in , make sure it is highlighted, then go down to the materials section (circle that is quartered into to brown triangles, a yellow and a white) Click the drop down and choose a name from the list(the list is from the materials of the model you are adding in to.) Delete only the model info in the heirachy from the simple model you are using for it's heirachy, not the top of the heirachy and then making sure the top of the heirachy is the highlighted part, export as a .mu file.

Clear using New project option. Say no to save project as a blend etc, then import the export you just made and check that everything is as you expect. If yes the you can add a simple box collider as it is only a static, before exporting it again. Hope this helps.

sdxSvEP.pnggr5Ipil.png

On 2/21/2023 at 11:02 AM, Jeb x Valentina said:

I mean- when importing a craft built in the SPH it's fine, but with VAB it pops up some weird errors ;.;

 

Link to comment
Share on other sites

  • 3 months later...

Need some help with the exporter, and it has to do with making multi-nozzle engines:

As I understand it, to create a multi-nozzle engine you'd ideally want to have a separate thrustTransform on the end of each nozzle. Each of them however needs to be named the same thing, since the EnginesModuleFX module doesn't accept more than one. However, Blender prohibits one from actually naming two objects the same thing. See this example where I imported the Bobcat, a twin-nozzle engine, and Blender auto-renames the second to thrustTransform.001:

blender_X6BqQtTywV.png

As I understand it there is also no way to stop Blender from appending the discriminator numbers. Would it be possible then for the exporter to auto-rename any thrustTransform.xxx to thrustTransform on export to .mu? As I understand it Unity does let you actually name two game objetcs the same thing (thrustTransform), hence this is a problem specific to the Blender pipeline.

Edit: Never mind, turns out Taniwha (or some other contributor) knew what they were doing and accounted for this. The exporter sorts out multiple thrustTransform empties with sequential numbering to be named the same thing. Am writing a bit of documentation on how to make an engine part using just the Blender plugin, so it was good to know that's possible.

Edited by Kavaeric
Link to comment
Share on other sites

14 hours ago, gradyforumer15 said:

i figured it out! mod making is easier now because you can get a sense of scale! also, how do you add textures?

Read the bit in my thread that says " Material Setup.", the rest is also helpful.

 

Link to comment
Share on other sites

  • 4 weeks later...

Hi

Can the plugin be used to import .craft with modded part?

Each time i try to import a .craft with modded part i get that error:

Spoiler

Python: Traceback (most recent call last):
  File "C:\Users\[Random]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Users\[Random]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Users\[Random]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 60, in import_craft
    part = gamedata.parts[pname].get_model()
KeyError: 'Knes.Hermes'

 

Link to comment
Share on other sites

I'm import a .craft file into blender 2.83 and I'm getting this error, any idea what I'm doing wrong?

 

Traceback (most recent call last):
  File "C:\Users\gatka\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Users\gatka\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Users\gatka\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 44, in import_craft
    gamedata = GameData(Preferences().GameData)
  File "C:\Users\gatka\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 146, in __init__
    self.create_db()
  File "C:\Users\gatka\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 129, in create_db
    recurse_tree(self.root, self.build_db)
  File "C:\Users\gatka\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 29, in recurse_tree
    files = os.listdir(path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''

location: <unknown location>:-1

 

Link to comment
Share on other sites

12 hours ago, gatkat13 said:

I'm import a .craft file into blender 2.83 and I'm getting this error, any idea what I'm doing wrong?

 

Did you set up the GameData directory when you installed the plugin? There's a list of manual configurations you need to do before being able import a mu file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...