Jump to content

How would I go about this?


Recommended Posts

I believe .3DS meshes can be imported into Unity. So, in theory, load the file into Unity, set it up like any other part model (with collision mesh, etc.), export it as a .mu. Set up your part.cfg. Done.

Though the Galileo 3Ds model I imported as a test had some tweaks needed to the mesh I think. So I would probably import into Blender first, fix up whatever mesh tweaks needed to be done, then export it as a .dae or .fbx, import that Unity, then follow the Unity part creation process.

Nice find, by the way. I see they have a mix of file formats there.. 3DS, Blender, etc.

(Polygon count on some of their models seem a bit high, though that's me)

Link to comment
Share on other sites

@ DarthVader: Sorry. Was attempting to figure out what GregoryOwen had experienced with the Juno model. Er, how step-by-step? Like a Blender-Unity tutorial of sorts or just what steps were done to get it in (generally)?

What I did (briefly, but I could expand on it):

1. Loaded the blend file into Blender (Juno). If it's a OBJ, Blender can load those up too.

2. In my case, with the Juno model, it was a blend file. So I just checked to make sure the UV maps were referencing the textures OK (found I had to re-reference the PNGs in a couple cases, primarily the main body of Juno while GregoryOwen said were invisible in KSP).

3. Made sure the Scene units were set to Metric, and the scale/rotation were set properly (select all objects, hit CTRL-A, scale/rotation option.. sets the scale/rotation to 1/0).

3. Exported the file as a .FBX (you could use a .DAE, but if you want to animations later on, .FBX is handy).

4. Opened up Unity, set up the Unity project as per the KSP/Wiki/Forum tutorials (set up the project, "install" the PartTool scripts, set up the empty GameObject and attach the PartTools scripts to it).

5. Imported the .FBX, making sure the import was set to Scale 1.0 rather than 0.01 (unless you like ant-sized parts).

6. Assigned the KSP shaders to the materials for each mesh that was imported, tweaked textures on the materials (or assigned textures to the materials where needed). Set the _root (cube) part to a default texture and set its Opacity to 0 (or you could outright delete it), otherwise KSP will render it. Not sure if all the NASA models have this root object or not.

6A. Added a collision mesh component, made it convex. In the Juno model, I just used the silver_foil mesh as the base. Didn't feel like creating a real collision mesh.)

7. Configured the PartTools components on the GameObject to point to where I wanted the .MU file exported to, and also set the texture settings to .MBM format (instead of smallest-TGA). Clicked on the button to kick off the .MU export.

8. Set up a generic part file, referencing the .MU file that was created, off in my play GameData directory. Launched KSP.

--

@GregoryOwen: Yeah, I see what you mean about the textures being weird. I wasn't sure how the KSP bump and specular shaders handle textures that don't have an alpha channel (Does it default to "not transparent" or does it assume the lack of an alpha channel means "transparent"?). Either way, the goil and silver foil PNGs didn't have an alpha channel.

I did two things to get the main body of the silver/gold to show up (though I'm still trying to figure out why the third texture on the silver_foil mesh [which should be mapping to the Juno_Texture for the external panels] isn't showing up.). One, I dropped on alpha channel on the foil PNGs thinking it had something to do with it. Didn't really. Two, I went through the meshes in Blender to see what images the UVmaps were referencing -- noticed the gold foil/black_krinkle/silver foil UVmaps weren't mapped to the gold/silver/some sort of black texture, but their normal maps instead. I'm not sure if that had anything to do with it, but I just re-referenced those UVmaps to the actual gold/silver PNGs (and created a quick black-matte PNG for the black_krinkle mesh could reference instead of its normal map).

So.. it could just be a check of the UV maps and what image they are referencing.. or a combination of that and having an alpha channel on the foil PNG files. I haven't gone back to try "just" re-referencing the UVmaps to the texture PNG files vs. their normal maps (without the alpha channel on the gold/silver foil PNGs) to confirm if it's only that step that does the trick. I'm fairly new to Blender/Unity/KSP thing, though. So there is probably a reasonable explanation for it.

I saw what you mean about the fixing up the shaders in Unity.

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