Main Menu

Shaders

Started by Gatobot14, September 19, 2016, 11:22:52 PM

Previous topic - Next topic

Gatobot14

hi everyone
im using the bump shader from the wiki, the shader works fine looks good but as you can see in the picture attached, the different objects of the level are clearly visible, its not a uniform lighting,
the question, is this normal behavior?? i know that merging the objects could get rid of the problem but i though that shader are capable of creating a uniform lighting

thanks in advance

EgonOlsen

The shader's results are based on the the vertex normals and if you create a level from different blocks, this might be what you end up with, because the normals on the edges are pointing all away from the center of the block. It's the same thing with normal vertex lighting. If you don't want that, you have multiple options:


  • manipulate the normals afterwards so that they are pointing into another direction. This can be tricky, because by default, vertices are sharing normals.
  • Model such a block in a 3D modeller where you have more control about the normals.
  • Compose the level out of thin walls instead of large blocks (that's what I did with Naroth).
[li]
[/li][/list]

Gatobot14

im using wings3d, it show that the model has normals, but apparently wrong , searching the web i discover the option "hard loops" in wings3d and this apparently get rid of the normals problem.