Jump to content
Leadwerks Community

Recommended Posts

Posted

When lighting normal mapped objects something is wrong. This is using the default diffuse bumpmap shader, tested in 2.3 and 2.31.

 

Notice that the lit side of the bumps changes as the cube rotates. This makes them look like bumps sometimes and holes at other times.

 

The camera is at roughly the same location as the light. The light you see in the background is an ambient light.

 

The same model and normal map in Unity doesn't exhibit this problem.

 

Demonstration:

 

http://vimeo.com/9433786

 

Anyone have any ideas?

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Posted

I updated the files with the X and Y swapped in SwizzleTest.zip on the other thread (http://leadwerks.com/werkspace/index.php?/topic/1172-dxt5nm-and-3dc-dds-compression/page__st__20). It seems to fix the problem.

 

This topic has always caused me grief in the past since it varies with each engine (which might explain why the normal looked correct in Unity) and with different software apps you use to bake normals.

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Posted

I remember moose saying that you need to invert the green color (Y axis) in the normal map.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

I remember moose saying that you need to invert the green color (Y axis) in the normal map.

 

That did it! Thanks Loomja, I was pulling my hair out trying different combinations, swizzling, etc.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

  • 2 weeks later...
Posted

I remember moose saying that you need to invert the green color (Y axis) in the normal map.

 

Does this mean I need to invert the Y every time I make normal maps for LE? (in photoshop with Nvidia plugin in my case)

 

Edit: I did some tests and yeah.. seems like I've got to redo all my normal maps :) I didn't spot this fact anywhere in the wiki.

Core i5-750 - GTX 460 1GB - 12GB DDR3 - Win 7 x64

Posted

I think there's an option in most exporters because some people use upside down normal maps. Ours are the correct way.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

I think there's an option in most exporters because some people use upside down normal maps. Ours are the correct way.

 

While it may be so I think this should be mentioned somewhere in the wiki.

Core i5-750 - GTX 460 1GB - 12GB DDR3 - Win 7 x64

Posted

DX uses +Y, OpenGL uses -Y. If you have a lot of things already done +Y, then you can modify the shader to invert the Y instead of redoing your normal maps.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Posted

DX uses +Y, OpenGL uses -Y. If you have a lot of things already done +Y, then you can modify the shader to invert the Y instead of redoing your normal maps.

 

My project is only week old right now so I've already remade all my normal maps :blink:

Core i5-750 - GTX 460 1GB - 12GB DDR3 - Win 7 x64

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