Jump to content

Bump Maps -- working in Unity, not visible in game


Recommended Posts

I've been working on a radial aircraft engine model. I just got it into KSP and found that the bump mapping on the cylinders doesn't show up.

This album shows the process I used and the problem:

Javascript is disabled. View full album

Any idea what the problem is? I'm probably doing something simple wrong -- I haven't used bump maps before.

Link to comment
Share on other sites

Is there something special you have to do to make a normal map? I just looked at a normal map from the Retro Future pack and used the same colors to indicate edges. I had tried creating from grayscale in unity before, but it did not seem to work. Do I have to use a specific file type?

Also, I noticed that the unity screenshot is too lo-res to see the mapping unless you view full resolution.

Link to comment
Share on other sites

Naming the normal map files with _NRM made the cowl normal mapping work, however it did not fix the cylinders. I went back to Blender and unwrapped the cylinder again, thinking I might have changed the mesh after unwrapping it. Unwrapping the cylinder model again did not fix the normal mapping though. When I get back I will try the cylinder mesh with the working normal map to see if that works.

Link to comment
Share on other sites

Are you setting the 'texture type' to normal map in Unity? When you select the texture image in the asset panel of unity, one of the inspector options allows you to mark it as a normal map. Sometimes unity will ask you when you start to import it if it's a normal map and mark it for you... but it's one thing that could be going wrong. Also, is your model set to calculate and split tangents? I don't claim to fully understand how the engine uses the tangent information... but I HAVE had a normal mapped object not display correctly when I had tangents set to import... but there weren't any in the file to import.

Link to comment
Share on other sites

artwhaley: Yes, the texture type is normal map and the model is set to calculate and split tangents.

Oddly, when I used a random normal map from Retrofuture it worked fine (in-game). I've tried making a different map as grayscale and importing it into Unity, but when I wrote the .mu it exported the map as a solid color! It had been shown as a proper normal map in unity, so I'm not sure why that happened.

I believe the problem is not in the model or my application of normal maps to it, since the Retrofuture one worked. I have no idea why this map is only working in the unity editor. The map for another part of the model works fine.

- - - Updated - - -

Okay, just tried a different bump map. It works now! Apparently KSP is more selective about what a normal map is than the Unity editor. Changing value or hue both work in the editor, but KSP only likes changing hues.

Link to comment
Share on other sites

use the "Create from Grayscale" option and use the new slider to adjust amount of bump. It's difficult to paint a normal map by hand without knowing how tangent space normal maps work. best option is use Unity to generate one, 3rd party plugin, or directly from 3d app.

Link to comment
Share on other sites

The problem's probably got to do with you trying to hand paint a normalmap; you can do it but not in the way you're going about it unless you've got a fairly supernatural ability to imagine and render, by hand, 3D directional data.

If you want to make a normalmap from a handmade image you can work in greyscale as nli2work said, nice and simple - from black to white, low to high. From that you can convert it to a normalmap in Unity, or there are plugins for Photoshop and one for GIMP somewhere too (but I've forgotten where I found it).

Couple of handy programs you could look at would be CrazyBump or NDO2.

You can also bake normalmaps from high to low poly meshes, it really depends on the type of detail or shape you want to get.

Link to comment
Share on other sites

What are good free program options for bump and normal map baking? I am primarily interested in high to low poly normal maps (did I say that right? :P).

I was looking at Xnormal, but the site seems very down.

Edited by Camacha
Link to comment
Share on other sites

I don't know about baking, but if you want to generate normal maps from bump maps you can use the NormalMap plugin for GIMP. Link in the dev sticky.

I understood that normals maps can do more than bump maps. Does that not mean that generating a normal map from a bump map yields a result that could be more optimal? I figured that making a normal map directly from the model would produce the best end product.

Link to comment
Share on other sites

for baking (sometimes called projecting) you need a 3d app, Max; Maya; Modo; Blender; etc. You need a game mesh with UV set, plus a high poly detail mesh (uv is unimportant). baking has the advantage of letting you quickly generate base maps for diffuse, specular, ambient occlusion, etc, at the same time as you generate your normal map. it can speed up your texture process quite a bit.

for converting, you need some image editor like PS or GIMP and appropriate plugin like nDo, or http://cpetry.github.io/NormalMap-Online/, or nVidia's PS tools. a lot of options. advantage is speed in iteration. you can see changes in the normal map output very quickly by updating your source image.

Edited by nli2work
Link to comment
Share on other sites

Both methods have advantages.

If you bake from a high res model you can have more control over the normal map down to individual pixels but only if you add your details and unwrap them veeeeery meticulously paying attention to where those details would fall on the UV layout. That's obviously very tedious and difficult to get right, but it's there if you want.

Generating normal maps from bump maps with the GIMP plugin gives you slightly less control, but makes up for it by being much much easier.

e.g. below you see what you get by creating a single raised pixel in a bump map, and the resulting normal map. The plugin needs to define normals for the surrounding pixels and goes a little over the top imo.

A2lF165.png

Link to comment
Share on other sites

for converting, you need some image editor like PS or GIMP and appropriate plugin like nDo, or http://cpetry.github.io/NormalMap-Online/, or nVidia's PS tools. a lot of options.

I will go the baking route and will try the Nvidia tools. Thanks for the tip!

That's obviously very tedious and difficult to get right, but it's there if you want. [...] Generating normal maps from bump maps with the GIMP plugin gives you slightly less control, but makes up for it by being much much easier.

Producing the highest quality product I can is my goal. We will see how doing the work pans out and go from there :)

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