Jump to content

Cant get model to show.


Recommended Posts

New to KSP so hello people, seen some lovely mods on here by everyone :)

Anyway since i like modding that i decided to have a bash at trying to get a model working ingame.

sadly most info you come across seems to be out of date.

But from what i found i think am doing it correct. apart from its not showing up ingame.

getting some kind of texture error when checking the log.


Load(Model): SSS1s_DecouplerMk1/sss1s

(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

this is my file structure and the parts.cfg i just copied from one of the standard decouplers to see if i could get it to work.



GameData/
/SSS1s_DecouplerMk1/
part.cfg
sss1s.mu
SSS1s_Decoupler_mk1.dds

and the copied parts.cfg


PART
{
name = SSS1s_DecouplerMk1
module = Part
author = Reax
mesh = sss1s.mu
scale = 1
rescaleFactor = 1
node_attach = -0.03, 0.0, 0.0, 1.0, 0.0, 0.0
fx_gasBurst_white = -1.16832, 0.0, -0.0826454, -1.0, 0.0, 0.0, decouple
sound_vent_large = decouple
TechRequired = advConstruction
entryCost = 2300
cost = 700
category = Structural
subcategory = 0
title = SSS1s
manufacturer = Sandvoid Space Systems
description = Development
attachRules = 0,1,0,1,0
mass = 0.05
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 8
maxTemp = 2000 // = 3200
stagingIcon = DECOUPLER_HOR
stageOffset = 1
childStageOffset = 1
bulkheadProfiles = srf
MODULE
{
name = ModuleAnchoredDecoupler
anchorName = anchor
ejectionForce = 260
explosiveNodeID = srf
}
MODULE
{
name = ModuleTestSubject
environments = 15
useStaging = True
useEvent = False
}
}

Using..

Unity 4.2.2 and parttools 023 (i think that's number) dragged into unity asset folder

Photoshop with nvidia dds plugin.

Any help would be great so i can get down the workflow and get cracking heh.

Cheers

- Chris.

Link to comment
Share on other sites

What did you name the file when you wrote it into KSP?

It has to be named "model" otherwise the game won't read it

Also make sure your textures are in the part folder if they aren't you did something wrong in applying them to the model

Also welcome to the forums

Link to comment
Share on other sites

What did you name the file when you wrote it into KSP?

It has to be named "model" otherwise the game won't read it

I think you just nailed it. i name it what it is lol did not know it had to be "model" oops.

ill we write it and see if that sorts it

and thanks for the welcome :)

- - - Updated - - -

that wasnt it :)

but also just noticed when i import the dds file into unity and then write. it does not output a texture file.

but when i do the same with just say a png texture file it outputs a texture file with the mu file..

no option to select dds as the output tho. so do i convert it to dds after its writen or before?

Link to comment
Share on other sites

Just to ensure minimal confusion, models don't need to be named "model.mu" as long as the config file's MODEL node is set up properly, and yours is. I believe the Unity version KSP uses is 4.6.1, but a difference in versions usually doesn't cause too much trouble.

Could you potentially pack your part into a Unitypackage and post it here? Having a look at your part's hierarchy might give us some clues. Give us a shout if you aren't familiar with the process. :)

Edit: I'm not familiar with the .dds format, but it doesn't look like that's the problem since the log you have posted is referring to an error loading the part model.

Link to comment
Share on other sites

Got it working.

seems using dds textures in unity then writing the mu is a no go? which is weird as the stock parts use .dds

instead i need to use a tga or png import to unity and write the mu and it works. (outputs an .mu file and a tga file.

EDIT*

got dds working now too. seems u use png/tga etc in UNITY then write the file. then replace it with the .dds for the texture and that works.

i was trying to use a .dds in unity and write the part that way.

sorted now.

just need to look into bad node definition and learn how to use the nodes properly now :)

Edited by Reax
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...