Jump to content

Edit DDS, leaving MU model untouched?


Recommended Posts

I'm pretty new to modding and asset creation. I know how to edit DDS files, but I can't open the model.mu files. Is there a way for me to open and edit the MU files, or is it fine to just edit the DDS and leave the MU as is?

Link to comment
Share on other sites

If you're just re-texturing you shouldn't need to touch the .mu file. You will need to change the .cfg file to substitute your new texture for the old - MM patch would be best for this.

Link to comment
Share on other sites

If you did want to open the .mu models, there is a plug-in for blender (google KSP blender plugin) which lets you import them. I can’t get it to work consistently on 2.8 + but I keep a 2.79 version for that very purpose. 

Link to comment
Share on other sites

On 4/6/2021 at 1:48 AM, WarpPrime said:

I'm pretty new to modding and asset creation. I know how to edit DDS files, but I can't open the model.mu files. Is there a way for me to open and edit the MU files, or is it fine to just edit the DDS and leave the MU as is?

There is a way, But you want to be very sure you know what you are doing. If you are simply wanting to give a part a new texture. Most Squad stock parts can simply have the config file updated with a "texture =" without the quotes. In the MODEL subsection. Or you can add a "part variant" module in the config file. e.g

 

Spoiler

    MODULE
    {
        name = ModulePartVariants
        baseVariant = WhiteAndGray
        VARIANT
        {
            name = GrayAndWhite
            displayName = Negative
            themeName = GrayAndWhite
            primaryColor = #adadad
            secondaryColor = #ffffff
            TEXTURE
            {
                mainTextureURL = Squad/Parts/Aero/wings/Wings2
            }
        }
        VARIANT
        {
            name = WhiteAndGray
            displayName = Positive
            themeName = WhiteAndGray
            primaryColor = #ffffff
            secondaryColor = #adadad
            TEXTURE
            {
                mainTextureURL = Squad/Parts/Aero/wings/Wings
            }
        }
    }

I make replicas of fighter jets and like the dull grey of the inverted stock white. With some adjustments to the texture DDS, PNG etc.

The part variants module allows you to switch in game and as Squad use it themselves for some of their rocket parts I am pretty sure you don't need a mod to use it.

This works for most models but not all as some modders seem to set different parameters in their meshes.

If you find a part that won't do that the simplest thing to do is open the config file. Immediately "SAVE AS" A new name you choose. Then change the "name =" at the top of the config file. "name =" is how the game tells the difference with parts. If you have 2 configs with the same "name =" then you are going to get strange results. Create a new folder. Cut and paste the new config file after you save it into the new folder. Copy into the new folder any textures the model seems to need and of course the model.mu it uses. Rename the .mu file to whatever you like and make sure the config file is amended to look for the new .mu in the folder structure you are now in e.g Squad/Parts/Aero/Wings/"What you named the .mu" But without ".mu" suffix. Do the same for any mentioned textures. Again no suffix. Rename the texture you want to change to have "old" at the end e.g "Wingsold.dds" so you know where the original is. Then rename the texture you created to the same name e.g "Wings".

Now for those difficult parts where it is still not working. Do the above then you will need the program "HxD Hex Editor" ( which is free but make sure you get it from the developers site)  use it to open the .mu file and scroll to the very bottom of the translated text. Here you will find the textures that the mesh is directed to use. Apparently the type of image file doesn't seem to matter as I have seen many whose suffix doesn't match. What matters is the name of the texture. Rename your new texture to something with exactly the same number of letters as the original. In the hex editor highlight just the name, not the suffix of the texture you want to change and then type it in. do not delete or backspace or do anything other than replace the original name with new name of exactly the same amount of letters. If you get it wrong close without saving and try again. Save the file (it may ask are you sure). Hex editor will automatically create a backup along with your amended .mu with the suffix .bak  The Hex editor is also a good way of finding out what textures your mesh is looking for. Your new .mu will look for your new texture rather than the original.

If this doesn't work you need a Yoda level modder.

All of this was worked out through reading forums and trial and error. But works for me.

Good luck. @WarpPrime

p.s DDS images are flipped upside down compared to PNG so if you save 1 as the other remember to flip them first.

Edited by ColdJ
Link to comment
Share on other sites

  • 3 weeks later...

You may have a more friendly way to get the information needed, with Kerbal Object Inspector. It helps to understand how a part is made, if different meshes are used and how, and which materials are applied on meshes.
For instance that helped me to understand that the Cub Engine model uses materials from a Kodiak mesh (rd108).

Edited by OnlyLightMatters
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...