SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Lighting & Rendering / Normal Map definitions

Lighting & Rendering General Lighting, Camera & Rendering Related Topics

Join the conversation. Reply to post
 
Thread Tools
25-05-2012, 10:37 AM   #1
djwaterman
Registered User
 
djwaterman's Avatar
 
Join Date: Nov 2011
Location: Sydney
Posts: 196
Normal Map definitions
I'm using Vray normal map channel and wondering what exactly is the difference between the types of Normal map options available.

Object space, tangent space, screen space and world space.

What means it?

Haven't found any good easy to understand definitions of what they are or why to use which type.
  Reply with quote
25-05-2012, 11:04 AM   #2
jsprogg
Lifetime Member
 
jsprogg's Avatar
 
Join Date: Feb 2004
Location: Chicago
Posts: 1,709
The easiest explanation is in the Maya help files but if you are using a normal map for detail and planning to animate the object then in order for the deformation to remain relative in position you should use tangent space ...

Object space versus world space

Every object in Maya has its own local coordinate system called object space. Imagine a scene with 1000 instances of a chair, and you know that all the chairs are of the same shape. The vertex on top of the chair is at the same location for each chair. The vertices on the wheel of one chair are in the same location as the vertices on the wheel of other chairs.

Whether you realize it or not, your mind is comparing the shape of these chairs in their object spaces. You are ignoring the fact that one chair is here and the other is there. You’re ignoring the world space position of each chair. The world space is the absolute position of an object or vertex in the whole scene. In world space, the vertex at the top of each chair is not in the same location, because world space includes the fact that you have translated the chair throughout the scene. However, in object space, which ignores the translation of the whole object, the vertices at the top of each chair are in the same location.
Therefore, in the context of transfer maps (or transfer attributes, or copy skin weights, and so forth), if you want to transfer data between two chairs that are of the same shape, but are not superimposed on top of each other, you would transfer data using their object spaces. If, on the other hand, you have two objects that are literally superimposed on top of each other, you would use world space. Can you use object space in this case? Sometimes, you can. Note, however, that object space ignores the translation of the object, and it also ignores its rotation and scaling. Therefore, if you want to transfer data from a big object to a little object, you can scale the little object up, offset it a bit, rotate it to line up, and then transfer the data in world space. In other words, you are telling Maya that you have made all the adjustments to align these objects and it should do the transfer exactly how they line up in your scene view.

Object space versus tangent space

Object space is the local 3D space of the object. Up is always up and left is always left. It is a uniform space that you understand really well because that is what the world is really like. Tangent space, on the other hand, is best thought of as surface space. In tangent space, up is always away from the surface (in other words, along the normal). Left, right, back and forward slide you along the surface. Imagine that you have a metallic teapot and you are holding a little magnet that’s stuck to the teapot. As you slide it around, you are following tangent space. When you’re on the bottom of the teapot, it’s actually upside down, When you’re on the sides, it’s sideways.

Object space versus tangent space in the context of normal maps

The differences become obvious when you start doing advanced work with your normal map. Recall that a tangent space is the surface of the object. Therefore, if you describe a brick pattern as a pattern relative to the surface, you can take a brick pattern and apply it anywhere and it will still look like a brick. If the brick pattern is on the bottom of the teapot, the bricks will stick out facing down (recall that the magnet is upside down). If the brick is on the side, it will stick out sideways. You can therefore mirror a tangent space normal map – you can just create a normal map for half of your character and glue it on to both sides of the model and it will work. In object space (where up is always up), however, this does not work. If the object space normal map says the ear sticks out on the left, then both of the character’s ears will be shaded as if they’re sticking out on the left. The same goes for the brick pattern (not only will the bricks on the bottom be sticking up into the object, but they’ll be shaded upside down – so the bottom of the object will light up when you shine a light down from the top.
The other very popular use for tangent space normal maps is the deforming of characters. Because the tangent space normal map defines the details of a character relative to the surface, you can stretch, move and deform your character, and those normal mapped veins on his arm will deform right along with the character. If his arm is turned upside down, the veins will appear as it they are upside down, and so forth. You cannot achieve the same effect with an object space normal map.
You can see this just by looking at the normal map itself: an object space normal map is really colorful, because it contains vectors that point in lots of different directions, while a tangent space normal map just has variations on up, which makes the whole map shades of blue and purple.
__________________


2 x Modeling Challenge Winner

Last edited by jsprogg; 25-05-2012 at 11:09 AM.
  Reply with quote
25-05-2012, 12:50 PM   #3
djwaterman
Registered User
 
djwaterman's Avatar
 
Join Date: Nov 2011
Location: Sydney
Posts: 196
Thank you for that detailed account, that really needs to be in a book it's so good. I had been doing some render tests between asking the question and your answer.



The tangent space one is my favorite and according to your description it is actually the correct one for this type of surface. So now I can feel confident about my choice whereas before I wasn't sure if it was correct.
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MR Normal map & Reflection Problem! Help! martingilbert3d Lighting & Rendering 3 29-06-2015 05:39 AM
Maya Normal Map from Zbrush issue shadowmanjack Maya Technical Issues 9 16-06-2011 07:21 PM
Normal Map Mayastatic Maya Basics & Newbie Lounge 2 17-09-2007 04:02 AM
Normal Map Woes SpaceGoat Maya Basics & Newbie Lounge 4 16-09-2006 01:35 AM
Normal Map mystery Velusion Maya Materials & Textures 4 14-09-2006 07:50 PM