Jump to content

Some questions about engine models


Recommended Posts

So I finally managed to create a basic Model, create a UV map and a texture from that, and get it into unity. It's missing some important bits, but it's leaps and bounds ahead of what I could do a week ago. I find the more I get into it, the more questions I have.

Should I be creating collider models in Blender or in Unity? I've seen both, though admittedly the unity created collider was not for an engine.

Same question for thrust transform and attach nodes, unity or blender?

And finally (for now), any suggestions on programs to create a normal map without the nvidia scripts for photoshop? Because photoshop wants a monthly fee, and that's lunacy.

Link to comment
Share on other sites

All of that should probably be done in Unity, though you can use blender empty objects to make the transforms and nodes too. You can also make simple cylinder colliders for engines and just turn it into a physics->mesh collider in Unity; you can also do that to the actual engine models too, as long as you check "concave" it'll fill in the polygons needed to make a solid shape physX will recognize. The third option is to add Unity primitive colliders (capsules or cubes) to your hierarchy. I've done all three, there's a right time for all of them.

As for normal maps, there are normal map generators out there, but if you need an image editor you can try "gimp" which is a free open source "photoshop" type program, and there's a clone of the nvidia plugin for it: https://code.google.com/p/gimp-normalmap/

Never used it though; Personally I use Corel Paintshop Pro, which is an old competitor of Photoshop and most photoshop plugins are compatible with it, including the Nviidia one. It's much much cheaper than Photoshop and a one time fee, but its also different in a few ways so you might want to do some research.

Link to comment
Share on other sites

Thanks for the tips!

Your tutorial helped me out a lot. Between yours and the coffee cup (totally related, I know) tutorial on youtube, the whole mess just clicked in my brain. It was literally in a space of maybe five minutes that it went from trying to decipher an alien language to making (relative) sense.

Link to comment
Share on other sites

Well, I managed to get a working engine in-game, with some minor issues. I even put a fairing on it! =D

There was some minor hilarity due to the rotation of my thrustTransform node at first.

Only lingering issues seem to revolve around Blender/Unity. For some reason, objects that have two "facings" (such as the fairing, the outsidewall and the inner wall) are getting their textures flipped between Blender and Unity, IE the inside wall texture gets placed on the outside wall, and the outside wall is semi-transparent so you can actually see the inner wall. Does the same thing for on my engine nozzle as well.

Link to comment
Share on other sites

IN blender, make sure you're in edit mode, then hit "N" to open the properties of your model (in a vertical meny inset in the main window) then scroll to the bottom until you find "Normals"

Normals determine which side of a 2d face reflects lighting and is thus visible, if they are flipped backwards then the outward facing side will be transparent, but it will show up through the model on the other side.

In the normals section you'll want to click on the small button that has the face highlighted, if you hover it says "Display face normals as lines" - click that and then adjust the length so you can tell which way each line points. You'll see that the troublesome faces have no lines (they're actually pointing "inward")

There are a couple of ways to fix them. The way I do it is via the left tool panel (the one with the vertical tabs) Click on the Shading/UVs tab and you'll see another "Normals" heading with 2 buttons; Flip and recalculate. Flip works by flipping all faces you currently have selected, so you can use sift+right click on the model to select the incorrect faces and then hit Flip to fix them. Recalculate takes the whole model and tries to decide which faces should be visible and adjusts the normals accordingly. Recalculate works in MOST cases but it won't handle some complex geometry quite right. Be ready to Undo and try the other method if you don't like the outcome.

Once that is done you can save and the changes should appear in Unity for you to re-export to KSP.

This post has some more info in it; he and I may be using different versions of Blender so the tools may be in different places. (I am using 2.70)

Link to comment
Share on other sites

I always had to ckeck the normals one by one in Blender. it's an art. you can flip and recalculate all you want, yo still have to check them individually.

(educate me) why do you need a script to do normal maps? In GIMP, I just select the texture i want use and map it. almost trivial.

Here's something i did in Sketchup a while back. You can import into Unity as dae file. (i've done it). Sketchup is way easier.

http://spaceart1.ning.com/photo/photo/listForContributor?screenName=25b6ragusca5d

Edited by mjl1966
Link to comment
Share on other sites

I always had to ckeck the normals one by one in Blender. it's an art. you can flip and recalculate all you want, yo still have to check them individually.

(educate me) why do you need a script to do normal maps? In GIMP, I just select the texture i want use and map it. almost trivial.

Here's something i did in Sketchup a while back. You can import into Unity as dae file. (i've done it). Sketchup is way easier.

http://spaceart1.ning.com/photo/photo/listForContributor?screenName=25b6ragusca5d

And how do you map the texture? The bump map tool doesn't generate a normal map that I can use in unity, it just bumps the image in GIMP.

And as it turns out, I created a very introspective engine. All of it's faces were looking inward...

Thanks again! By the time I put anything out, it'll require a byline for Tiberion. heh

Edited by Randazzo
Link to comment
Share on other sites

Once you have a normal map image created (the NVIDIA script takes your regular texture, called the diffuse texture and turns it into a normal map) you save it in the Unity asset folder next to your diffuse and your model. Then find it in the Unity assets list, click on it and in its info panel change the texture type to Normal Map, then uncheck Create from Greyscale if its checked, the other defaults are normally okay to begin with. Hit Apply.

Once that is done you need to click on the Material for your model and make sure the shader is set to KSP/Bumped or Bumped Specular, this adds the 2nd texture slot for the normal map, select it and you should see the added detail on your model in the scene right away, and now when you export it will put both texture files in there.

You might want to adopt a naming convention for your normal maps, the standard one for KSP mods is using the same name as your diffuse texture and then added _NRM; so like engineTex.dds and engineTex_NRM.dds

(Note: if you use KSP/Bumped Specular you might want to add a specular map to your diffuse texture to tell it where it should be shiny/reflective and where it should be matte/dull. You can also change the settings on the material to change exactly how shiny the part is overall. That's a bit more advanced, so get the basics down first.

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