Jump to content

Normal maps giving me grief


Recommended Posts

I'm not completely new to normal maps, and I'm going via the grey-scale height map converted to normal in Unity.

And, to a degree it works (although mostly just test cases so far). But every time I apply one, I get faces on my parts extremely white. They're always contiguous faces in the normal map. And usually end up forming white bands or vertical bars on my parts.

I've looked at a bunch of different issues and I'm going round in circles. The same texture without any bump/normals appears just fine. There's no difference in the white faces and non-white faces in the map. Tried import/calculate/none for normals on my part with no difference (I don't really think this is related, but was mentioned in another post).

Yes, it persists in this craziness outside the hanger areas. Yes, it's using a KSP material. In fact, when it's in blender and I use a Blender material, it works fine.

452B9BC6A1470F38097DFB5C1AC4D88F54DE7917

Extra Info; Just checked.

Looks fine in Unity using the material/textures. If I assign a non-KSP material in Unity, in KSP it shows as KSP Diffuse with no bump.

Will try non-specular.

Non-specular does exactly the same, but less specularly.

Edited by TiktaalikDreaming
More More Info
Link to comment
Share on other sites

Without a screenshot all i can say is make sure in blender you've assigned the same material to all of the faces on the model, and if you didn't use materials make sure you selected the same texture for all of the faces in the UV editor. Do both actually if you used one of either of them.

If the above is done correctly in Unity you'll see the mesh render component only have 1 material listed. If it has more than 1 listed you need to go back to blender and fix the materials.

Link to comment
Share on other sites

Better yet is to tell Unity not to import materials. The UV placement is still imported, buf you won't get any funnies from Blender carried through.

After that, create a new material in Unity with one of the KSP shaders and add in your maps.

Link to comment
Share on other sites

Unity screen shots;

157xZVI.png

And

ujM5E9Z.png

Which is basically what I'm after at the moment.

What-ever's going on, it's going on after the part leaves Unity.

I'll try removing the import material though.

- - - Updated - - -

Same stupid .... with a material created from scratch in unity.

In case there's something glaringly wrong with the normal map, posting that here;

9cN9HDS.png

Although, as a test map it's not really particularly detailed or prone to be causing the issues.

Also, material set-up;

Su3iIoX.png

Link to comment
Share on other sites

Okay. Your normal map seems to have a problem.

For basic patterns, I usually don't use normal map generator and prefer the hand made way (using simple shape NormalMap images found on the web).

Nothing really hard once you practiced a bit. It often saved me time ;)

So first (if you're not used to how normal maps work) here's what I know :

- Normal = face orientation.

- A normal map uses RGB color channels to simulate pixel "angle" difference relative to it's normal.

- You can easily translate RGB value to a pixel angle (Red channel=X-orientation ; Green channel=Y-orientation). And Blue channel is related to Z and...is a bit harder to explain.

- RGB ranges are 0 to 255. This define the "incidence" of the pixel angle (still relative to its normal). So values are something like : 0=-90° ; 128=0° ; 255=+90°

- Unafected pixel must face the normal and needs to be x=0°; y=0°. RGB translation is : R=128; G=128; B=255 (And this is the blueish color).

I took 20 min for more visual explanations about Normal and UV (sorry for the "fast written" and not perfectly clear english :s)

-Updated-

JkRsr4E.jpg

Ok I thought UV orientation was important for normal map but Porkjet showed me the other way and proved to be correct. :)

Edited by winn75
mistake
Link to comment
Share on other sites

Awesome info. So, if my background doesn't match 128-128-255 then the angle of the piece in the UV makes a difference, which could very well be the cause. I'll check if this is the issue. The pieces showing very white are separate in the UV map with a 90degree rotation, so I'm hoping this is it.

- - - Updated - - -

128-0-255 background for some reason.

Reloading to check now. I'd just closed out of KSP and added all my mods back in. :-/

- - - Updated - - -

AWESOME!

Good news: Fixed it. Thanks a million.

Bad news: No excuses to not texture my parts now.

- - - Updated - - -

xec8q91.jpg

Link to comment
Share on other sites

I've only ever used the autogenerated Bump maps for various uses and never actually known how they operate. That post, Winn75 is (contrary to your claims of confusing English) incredibly helpful and concise. It was exactly as much info as I needed.

Now layering green/red multiply layers over backgrounds and getting annoyed at the distortion in my UV maps. So seems like I'm moving forward as well with bump maps as normal texture maps now. Cones don't UV map nicely. :-/

Link to comment
Share on other sites

Now layering green/red multiply layers over backgrounds and getting annoyed at the distortion in my UV maps. So seems like I'm moving forward as well with bump maps as normal texture maps now. Cones don't UV map nicely. :-/

You're welcome ;)

I never tried to use layer blend mods for normal mapping. I'll do more researche about that.

For cones, spheres or cylinders (using a repeating pattern !) I'm used to seam them and really work on UV to have something clean to texture on:

MxnWpTa.jpg

Link to comment
Share on other sites

Last thing, here's an example of something I did with 128px textures (actual real scale on the right) and using a lot of UV overlay and UV islands symetry ;)

wzwE10j.jpg

Edited by winn75
Link to comment
Share on other sites

Sry Winn75, but what you're saying about normal maps and UV island orientation is wrong.

Their orientation in the UV space is completely independend of how normal map shading ends up in 3D.

This means you can normal map that basketball just fine.

ElJszEc.jpg

Everything else you said is of course correct, overlaying UV islands is very practical, and they can indeed use normal maps correctly so that makes it even better.

Edited by Porkjet
misread
Link to comment
Share on other sites

And of course, if it's basic rivets & grooves and other discrete elements you can just skip the normal map & add them as mesh. 30 basic pyramidal rivet heads is only 90 polys + the few more you cut in around them, 30 8-sided rivet-heads is 240, etc.

I'd kinda like to know where the break-even between extra mesh detail & the extra call for a map is with this engine, actually.

Link to comment
Share on other sites

Sry Winn75, but what you're saying about normal maps and UV island orientation is wrong.

Their orientation in the UV space is completely independend of how normal map shading ends up in 3D.

Don't be, I just double checked and realized...

1SisgiP.jpg

Ok, I was really wrong. :blush:

The orientation autosolve by quitting the edit mode (don't really know how but this is cool!).

Sorry for my mistake i'll update the previous post.

So...that great, I learned something very useful today (this is gonna save me a lot of time : thanks ;) )

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