Jump to content

Emissive troubles


Recommended Posts

I'm having a puzzling issue here. I've created an emissive heat animation with no problem, it works fine, I've tested it in game, everything is great. Except I realized the models were no longer bump-mapped, so I went back and changed my shader from emissive/specular to emissive/bumped specular. However, any time I try and load the parts with the bumped specular shader, I get this error:

Load(Model): HeatManagement/IAHMS/125AHMS/model

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

File error:
Failed to read past end of stream.
at System.IO.BinaryReader.ReadByte () [0x00000] in <filename unknown>:0

at System.IO.BinaryReader.Read7BitEncodedInt () [0x00000] in <filename unknown>:0

at System.IO.BinaryReader.ReadString () [0x00000] in <filename unknown>:0

at A..ReadTextures (System.IO.BinaryReader br, UnityEngine.GameObject o) [0x00000] in <filename unknown>:0

at A..ReadChild (System.IO.BinaryReader br, UnityEngine.Transform parent) [0x00000] in <filename unknown>:0

at A.. (.UrlFile ) [0x00000] in <filename unknown>:0

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Model load error in 'C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\HeatManagement\IAHMS\125AHMS\model.mu'

I see that it says something about a parent object, so I tried rebuilding the model from scratch twice now and it still throws the same error when trying to use the emissive/bumped specular shader. Works fine otherwise. Any thoughts?

Since it seems someone always asks for it, here's a screenshot with the hierarchy, though I don't know that it will help:

mFSwvq9.png

And here's a zip file with the assets I'm using in it: https://www.dropbox.com/s/xx377ewvw2r93ww/AHMS125.zip?dl=0

Link to comment
Share on other sites

It looks like your model isnt exporting from unity properly, this is somewhat common when dealing with animation. The only sure-fire solution is to clean out the scene (delete all objects from the "hierarchy" area and then add in the GameObject, re-add the part tools script to it, and then drag in your model again from assets and set everything up again.

You can usually notice that a .mu file isnt exporting properly because it will be 1 to 5kb or so in the export folder and it won't export the textures anymore (compare the "last update" dates for both files, or just delete the textures and note that they don't come back)

Link to comment
Share on other sites

It looks like your model isnt exporting from unity properly, this is somewhat common when dealing with animation. The only sure-fire solution is to clean out the scene (delete all objects from the "hierarchy" area and then add in the GameObject, re-add the part tools script to it, and then drag in your model again from assets and set everything up again.

You can usually notice that a .mu file isnt exporting properly because it will be 1 to 5kb or so in the export folder and it won't export the textures anymore (compare the "last update" dates for both files, or just delete the textures and note that they don't come back)

Since this is a common problem, is there anything that can be done to avoid it altogether?

Link to comment
Share on other sites

Not exactly sure what causes it, one reliable way to make it happen was to change the hierarchy of the objects in the scene after animating them (it breaks the animation and can leave the model in a broken state) but I've seen it occur without doing that too.

Link to comment
Share on other sites

You can usually notice that a .mu file isnt exporting properly because ... it won't export the textures anymore (compare the "last update" dates for both files, or just delete the textures and note that they don't come back)

This was it. The image I was using as the bump map was in dds format, and unity couldn't export it. Changing it to a PNG fixed it.

Thanks again!

Link to comment
Share on other sites

Ah thats a different issue then, part tools just didn't like the DDS texture; Until its updated everyone should keep their assets in unity in PNG/TGA/whatever and let Part tools export to one of the expected formats it can handle (it will convert between those it supports, just not DDS yet) and then once exported you can convert it to DDS using the DDS4KSP utility or your favorite image tool; as long as the filename minus the file extension is the same, it'll work :)

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