Jump to content

[HELP] Part Tools Model Compiling/Unity


Recommended Posts

Not sure if I'm missing something, but recently when I go to compilemy parts in Unity, KSP won't read the mu. Unity is writing the mu. I've checked the config over and over for errors and I can't seem to figure out what I did wrong.should I name the part model.mu? (I don't think it should matter. I also used cube meshes for the airlock, handhold, and ladder coliders.

Link to comment
Share on other sites

What is the file size of the .mu? If the mu's file size is really small there is probably something wrong with how you set it up in Unity. One thing that messes it up is if you assign a mesh collider to a gameobject. Also you can name the model whatever you want, so long as it matches with the cfg.

Link to comment
Share on other sites

Have a look through output_log for the entry where KSP is trying to load the part (or preferably post the log). I've had a few gotcha's with PartTools exporting stuff KSP won't actually read, but the log will tell. It's frustrating, I know!

Link to comment
Share on other sites

What is the file size of the .mu? If the mu's file size is really small there is probably something wrong with how you set it up in Unity. One thing that messes it up is if you assign a mesh collider to a gameobject. Also you can name the model whatever you want, so long as it matches with the cfg.

So far I have everything the way I set it up for the missiles and stuff for Kerbin Side.

It looks like this:

GameObject - part tools

> cockpit - mesh, mesh colider, texture material

>>frame - mesh, mesh colider, texture material

>>> glass - mesh, mesh colider, texture material

>> frame - mesh, mesh colider, texture material

>>> glass - mesh, mesh colider, texture material

> ladder

>> ladder.001 - mesh

> airlock

>> airlock.001 - mesh

> handhold

>> handhold.001 - mesh

How big is the resulting .mu file? Do you have a KSP material applied to the meshes?

I haven't looked at the size, but all ksp materials are used.

Have a look through output_log for the entry where KSP is trying to load the part (or preferably post the log). I've had a few gotcha's with PartTools exporting stuff KSP won't actually read, but the log will tell. It's frustrating, I know!

I haven't checked the output_log.txt yet. I'm worried that something hidden in my mesh is screwing up the mesh.

Also my smoke texture isn't compiling with my missile model particle effects.

Link to comment
Share on other sites

CTRL-6 to bring up Unity Console when you export. if any errors in there, whatever MU got exported, if any, probably won't work in KSP. if that's all clear; then check the output_log.txt. search for the part you just made (naming the MU to something descriptive comes in handy here), and see what log messages are associated with it.

Link to comment
Share on other sites

I checked the file size, it was a healthy 170kb, then I checked the KSP output_log.txt and there were no loading errors.

CTRL-6 to bring up Unity Console when you export. if any errors in there, whatever MU got exported, if any, probably won't work in KSP. if that's all clear; then check the output_log.txt. search for the part you just made (naming the MU to something descriptive comes in handy here), and see what log messages are associated with it.

I checked the console and there were no reported errors.

So my final thoughts is that Parts Catalog isn't recognizing the file.

Link to comment
Share on other sites

I checked the console and there were no reported errors.

So my final thoughts is that Parts Catalog isn't recognizing the file.

then check Output_log.txt in KSPData. name the export to something descriptive, like "myKickassCockPit" instead of "model", it's a terrible habit I don't know why Squad still does it. name your textures to match the part. i.e. mykickasscockpit_DIF; mykickasscockpit_NRM, etc; decide on a pattern and stick to it. it'll save you a lot of headache when debugging later. remember asset loader is CaSe SenSATive.

search for instances of your export in output_log. you will see KSP loading the textures; then the model; then the config file; then compiling the part. if there's a missing asset during compile your part won't show up in game. if missing textures or model you will see error message complaining about missing texture or missing model during compile phase. if there's no config then no errors will come up, the texture and MU will just eat up your memory.

during model loading you might get errors, usually about bad animation clips; rarely bad colliders. things like missing mesh reference or bad collision mesh will prevent the script from exporting at all, or output a bad MU(that's why I suggested looking in Unity console first). error loading the model will generate an error during compile later about model does not exist in database.

Notepad ++ has a feature that will list all instances of a search string in a separate window. clicking on an instance will jump to the referenced message in main log window. very handy when you have to sift through 83000 lines of output logs.

Edited by nli2work
Link to comment
Share on other sites

then check Output_log.txt in KSPData. name the export to something descriptive, like "myKickassCockPit" instead of "model", it's a terrible habit I don't know why Squad still does it. name your textures to match the part. i.e. mykickasscockpit_DIF; mykickasscockpit_NRM, etc; decide on a pattern and stick to it. it'll save you a lot of headache when debugging later. remember asset loader is CaSe SenSATive.

search for instances of your export in output_log. you will see KSP loading the textures; then the model; then the config file; then compiling the part. if there's a missing asset during compile your part won't show up in game. if missing textures or model you will see error message complaining about missing texture or missing model during compile phase. if there's no config then no errors will come up, the texture and MU will just eat up your memory.

during model loading you might get errors, usually about bad animation clips; rarely bad colliders. things like missing mesh reference or bad collision mesh will prevent the script from exporting at all, or output a bad MU(that's why I suggested looking in Unity console first). error loading the model will generate an error during compile later about model does not exist in database.

Notepad ++ has a feature that will list all instances of a search string in a separate window. clicking on an instance will jump to the referenced message in main log window. very handy when you have to sift through 83000 lines of output logs.

I already checked the output_log.txt I found the entry, there wasn't an error, but I finally did find an error in Unity where it was removing leaked texture. I'll work with it and see what I can do. I have an idea.

nil2work I'm also going to make a skin compatible with Retro Future. I plan to use fsTexture switch.

Edited by Eskandare
Link to comment
Share on other sites

hm... the only other instance I know of where a part loads properly but doesn't show up is incorrect technode definition while in career mode. I presume you are testing in sandbox mode? I don't think leaked texture message in Unity is a problem, just garbage collection doing it's work. unless it occurs during export process, in which case it's something to look into.

Link to comment
Share on other sites

  • 2 weeks later...
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...