Author Topic: Shaders  (Read 9388 times)

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Shaders
« on: September 19, 2016, 11:22:52 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Shaders
« Reply #1 on: September 20, 2016, 07:50:03 am »
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]

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: Shaders
« Reply #2 on: September 21, 2016, 11:09:35 pm »
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.