Home Technical Talk

Difference between Object Space and World Space normals?

3D4Eva
polycounter lvl 3
Offline / Send Message
3D4Eva polycounter lvl 3
Hi!!! I'm a bit confused on the difference between object and world space normal maps. I was told they will look similar but the difference was object space is based on the orientation of the mesh, and world is based on the scene or something???

I found that in substance designer you can convert world space to tangent space but I dont see anything about object space to tangent. Are these the same??

The wiki just says http://wiki.polycount.com/wiki/Normal_Map_Technical_Details 
 World-space is basically the same as object-space, except it requires the model to remain in its original orientation, neither rotating nor deforming, so it's almost never used.

If you can please help me understand this that would be super! Thanks! :-)

Replies

  • gnoop
    Options
    Offline / Send Message
    gnoop sublime tool
    3D4Eva said:

     World-space is basically the same as object-space, except it requires the model to remain in its original orientation
    Looks like you already answered your question?     No difference if object local XYZ axis look to same direction /aligned to world axis .       So just make sure your object has no rotation in world space  before baking it .  Substance designer  does re-bake  properly from a world space having Y (green) up   . Maya style I am guessing.    

    So if you bake object space in Blender  for example  or any soft with Z up make sure you object have 90 deg rotation   in X axis  if you going to re-bake  in SD   .    

    Also if you  are re-baking to tangent space in Blender directly you could do it without any space rotation troubles.     Also bake your object/world space in 32 bit exr  to avoid any gamma issues .



  • RN
    Options
    Offline / Send Message
    RN sublime tool
    A normal is a 3D vector, and a 3D vector has three components, x, y, z. When you say you have a 3D vector that is "x=3, y=7, z=2", what you mean is that "it travels +3 units along the x axis, +7 units along the y axis and +2 units along the z axis".

    These x, y and z names refer to the "basis vectors". They're a set of three perpendicular vectors that you use to travel in space. That is, to reach a certain point in space, you travel along these vectors (in a positive or negative direction along each), and the combined movement along all those vectors let you reach that 3D point.

    An object-space normal uses the local axes of the object as the x,y,z basis vectors.
    A world-space normal uses the world axes (the global axes) as the x,y,z basis vectors.

    The only situation where this causes a problem is when you expect a normal represented in one space, but it's represented in another and the basis vectors in each space are not aligned.
    So an object-space normal that says "x=1, y=0, z=0" (it only travels +1 on the x axis, so the right of the object), if that object rotates around, that normal always points "x=1, y=0, z=0" in relation to the object, but it definitely won't point the same in world-space -- it will point wherever the right-side-direction of the object is pointing at.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    object, world and tangent spaces are three different reference systems.
    You had the explanations for world and object.
    Tangent space is defined by your vertex normal and vertex UV (U direction), and a third component that is calculated from the previous two.
    Tangent space maps are more reusable (tiling textures for instance), and also work with skinned/deforming objects.
    They are also more prone to artefacts and the lighting calculation is slightly more complex (but neglectable)
    For a non deforming asset with its own normal map, you could use object space.
    For completly static object with its own normal map, you could use world (but no one do this).
    Pretty much everybody use tangent.

  • 3D4Eva
    Options
    Offline / Send Message
    3D4Eva polycounter lvl 3
    Thank you so much for all the explanations. I'll keep these in my notes! :)
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    probably worth pointing out in addition to RNs explanation that normal maps represent direction only and the vectors represented will be normalised (scaled so their length is 1)  when rendered 

Sign In or Register to comment.