Link:INB Home|INB English| INB русский язык|INB العربية|INB Türkiye|INB فارسی|INB Español|INB Français|INB Português|INB Deutsch|INB 國語|INB 中文|INB 日本语|INB 한국어|INB ภาษาไทย|INB tiếng Việt|| Maya 3D Tutorial Review of the application of the normal map
INB English forum
Welcome to (Industry & Native boffin) The industrial age here is full of fighting spirit, you and I both through this network space with Native biological spirit boffin came to the mad labs. home, come and join us Permanent name:
INB English forum

Welcome to (Industry & Native boffin) The industrial age here is full of fighting spirit, you and I both through this network space with Native biological spirit boffin came to the mad labs. home, Permanent name:

You are not connected. Please login or register

《《《《《《《上一页INBforum   Go down

上一页INBforum》》》》》》》View previous topic View next topic Go down  Message [Page 1 of 1]

1 Maya 3D Tutorial Review of the application of the normal map on Thu Oct 09, 2014 1:27 am


[You must be registered and logged in to see this image.]
Recently collected a lot of information and testing, intended to MAYA-France line map (NORMAL MAP) information and thoughts about the idea of ​​a comprehensive look. Take it easy! Smile
Normal map (NORMAL MAP) is a relatively new mapping technology, similar to BUMP MAP, through the normal corrective to the model surface detail and texture to the performance of the model, the effect is better than the latter, can reach BUMP the effect is less than that of MAP, but it does not really surface detail in the model, as opposed to DISPLACEMENT MAP concerned, not as it satisfied. And its production and application of a lot of trouble, a lot of problems, so this technique is not commonly used in CG, but in the game there is considerable room for development. Other much to say, first look at a map:

Why the same model (10 * 10 segment polygon sphere) will come out two effects, I used SOFTEN / HARDEN EDGE command to soften the model on the right side, so sleek looks a lot!
I opened the CUSTOM POLYGON DISPLAY OPTIONS, appear normal to see the difference:

Normal model in two ways: point normals and surface normals. In the face of the center of the face normals are issued, indicating the direction of the surface; but the point is sent from the normal points, depending on the direction of the surface around the point, the model explains the difference between left and right SOFTEN / HARDEN EDGE command works. MAP is also NORMAL basis. (In fact, there is a:. UV COODINATE NORMAL but this concept does not seem MAYA, this stuff is the root of many in the NORMAL MAP application problems, where the temporarily described)

Here we begin. POLYGON establish a sphere, the following parameters.
Then copy the one hidden.

This sphere smoothed two times, with carving tools to make some of the details.

Open HYPERSHADE, giving the ball a new LAMBERT material.
Then create a SAMPLEINFO and SETRANGE nodes connected as follows:

So we put the ball in the normal and camera information input, output it to the material objects COLOR, where the material I chose SURFACESHADER, it does not matter. Just for the convenience of the observed effect.

Adjustable parameters: We will be converted to normal variable color values​​, the need to redefine the value interval from [1,1] into [0,1].

Color change, but you will find that the color rendering hardware display color is not the same!
This is the key to a problem! And no matter how you move or rotate the camera and model, color distribution of objects do not change, the above is green, and blue on the left, the right red. This is not what we want.

This problem is due to the normal vector information is based on the output SAMPLEINFO camera, so the camera is associated with, but not the object itself, but also the normal vector information can not be used so that we get behind.
To solve this problem, we break the link between SAMLPEINFO and SETRANGE, a new VECTOR PRODUCT node, the following connections.

The camera perspective dragged node, enter its world matrix information to VECTOR PRODUCT node operation mode is VECTOR MATRIX PRODUCT, then the output value of connecting to SETRANGE

This is a vector and matrix operations to convert camera coordinates to world coordinates, so that the camera does not affect the color of the object changes in distribution, but if we rotate the object, the problem still occurs. Therefore, changes in the object information should also be added, the world coordinate system is converted to the object coordinate system.
If at this time the color will be converted to maps, we call it the World-space normal map. (Described later in these categories)

As shown then add the following similar nodes, note the choice is WORLD INVERSE MATRIX.
Figure COLORBALL is this model nodes of the sphere, you can find it in OUTLINER, the drag HYPERSHADE years.

Thus, we see consistent color display and rendering, and to render them prevail, so moving the camera or the object, the color distribution on the right as posted on the same object.

Select the sphere and its material, the use CONVERT TO FILE TEXTURE OPTIONS into the color map, the following parameters, resolution, and set your own.

At this point the resulting texture, color, red, green, blue distribution is similar to a rainbow, called
Object- or Local-space normal map. This will look very similar to the above World-space normal map.

Here's how to use this map

Shows that the original low resolution copy of a sphere, is named NORMALBALL. Gives a material, and then connect. The use of such a map is equivalent to the inverse. Needless to say, I want it.

See the effect, I use the SOFTWARE rendering.

Results were pretty good, but the problem is always accompanied, if we keep the camera does not move, rotate objects, you see what will happen?

Details correct, but it is completely wrong light, shadow maps are the same as the "stick" on the model, there is no relationship between the position of the lights, and this is not allowed!
So, we have introduced the NORMBALL nodes, inverse operation again.

Thus, the model details and lighting are normal, and rotate the model and lens are no problems that can be used to build a scene.
However, this all?

We take a look at HARDWARE HIGH QUALITY RENDING rendering and rendering results.

What is this stuff's cook ah?
Obviously, the display is not normal when the Immediate update, which means that for game design is obviously unavailable, the same, MENTALRAY rendering is not enough!
And after that there are bigger problems too!
Press F9 to enter the point element mode, the ball free to some distortion.

Then back to the object model, rendering look. Note that only one light in the scene.

Found yet, light or wrong, is this annoying problem!
This means that if the object to be deformed in the following levels, such as skin, binding, etc., there will be a serious problem.

In MAYA7 after such a set of tools: SURFACE SAMPLER (equivalent MAYA6 in
TRANSFER SURFACE OPTIONS), this tool which contains a lot of useful tools.
/ OBJECT SPACE generated NORMAL MAP is equivalent to World-space normal map
And Object- or Local-space normal map.

There is a TANGENT SPACE So what is it?
TANGENT SPACE is tangent coordinates, ie perpendicular to the direction perpendicular to the normal line, which has a very important feature is that it is the coordinates of each point on the model for, rather than the entire body, which is what we needed features.
The usage of the tool in my previous post said before, very simple. TIF file format commonly used, there are a lot of advantages.

Generated map is called the Tangent-space normal map, which is obviously different tone of color is blue. This should be said to be more perfect, does not appear in front of the problem. Take a look.
MAYA no direct NORMAL MAP channel, using trouble, unlike 3DMAX or LIGHTWAVE, so this article was relatively small, but MAYA7 later joined, it is hidden in the
BUMP2D nodes, as simple to use and BUMP MAP.

Open HIGH QUALITY RENDERING, so we finally see the desired results.
And all angles are normal.

Sometimes hardware real-time display and not quite right, if you do not see results right, you can use
HARDWARE rendering look to see.
But unfortunately, MAYA in this node can only be hardware rendering, and are not supported SOFTWARE and MENTALRAY rendering. But also, had MAYA in this node is born in order to make the game, mostly for the game rendering engine.
Some people use this method to connect:

This method is a direct connection to obtain the same hardware rendering can also be software rendering, but light distortion; does not support MENTALRAY. The biggest problem is this: If you want to be used in conjunction with other BUMP MAP will be very difficult.

Carry on ......
At this point we can first summarize, in order to have a better understanding and application.
World-space normal map
1 color.
2. not rotate objects and use a point-based deformation textures and shadows would otherwise mess
3 applies to stationary objects (eg buildings).
4. fast calculation

Object- or Local-space normal map
1 and World-space normal map as part of the different elements of the game just for the encoding
2 the object can be rotated, but not below the level of deformation of the object.
3 apply to certain elements of a simple mechanical movement (doors, vehicles, machinery, etc.)
4. computing faster

Tangent-space normal map
1 with blue tone
2 objects can be rotated and deformation
3 applies to the deformation of objects (roles, water, cloth, etc.)
3 calculate the slowest (not often).

If we want to render or render MENTALRAY also applied in the software that it had to do?
In general, MAYA, or third-party renderer NORMAL MAP, the need to establish a certain node to simulate, this is not a pleasant thing. I use MAYA software rendering nodes, to see the effect:

Not bad, but it is more complex node. This node from headus (metamorphosis) Pty Ltd. But the coordinates of the original node does not apply MAYA (aimed at ZBRUSH), I will change it to reconnect.
Overall it is to the camera NORMALCAMERA and TANGENTU, V of information output, information and NORMAL MAP output by point multiplication, connect to material objects
NORMALCAMERA. Such software can be collected when rendering the appropriate information.

If necessary, I shared this node in the back, patiently reading my posts, you can find it.
Applicable to any version of the SOFTWARE rendering, slow, does not support hardware rendering.

But MENTALRAY more trouble, the node currently my test as follows:
Equivalent to the software rendering nodes and then with the perspective camera vector matrix operations, output to the material.
Unfortunately, the only support MAYA6.5 following MENTALRAY version of MAYA7 MENTALRAY due to updated rendering and code, invalid!
You can also use Jan Sandstrom's JS_Normalmapper of MENTALRAY nodes. But the same is not supported MAYA7.

Meanwhile, in MENTALRAY rendering can use GLOBAL ILLUMINATION, but turned FINAL GATHER rendered invalid! This is due to the way decisions FG calculation, has yet to have a solution!

Down to us about the joint use NORMAL MAP AND BUMP MAP's.
Essentially speaking, NORMAL MAP closer BUMP MAP instead DISPLACEMENT MAP.
But to say NORMAL MAP wants BUMP MAP combination is hard to find a difference, it will produce the illusion difficult to find errors in the application, which is in the game to use the more cumbersome and often not timely corrected, leading to delay the projects .

First to introduce real-time rendering hardware in combination.
BUMP MAP divided BUMP3D and BUMP2D, had introduced these two bits
BUMP combined effect, you can find in the previous post where. However, the test found that if used in combination, the effect can only be embodied in software rendering, hardware rendering is invalid. Such NORMAL MAP and BUMP MAP directly using this combination, real-time display can not be correct. And we need to make in the game can immediately browse to.
So I used a layer of texture (LAYERED TEXTURE) to mix. Here with a BUMP3D nodes.

Select the layer texture OVER hybrid approach, NORMAL MAP at the top. Bump ALPHA value adjustment to control its effects (or BUMP DEPTH). Watch out! Doing so will in fact weaken the NORMAL MAP results, so ALPHA is not too low. In fact, use the back of SETRANGE nodes can enter an expression by correcting the value associated with the ALPHA weakening phenomenon.
You can also mix the BUMP3D layer on top, you see what happens?

The effect of the emergence of real-time display, but where it seems wrong.
I mentioned earlier, this difference is hard to see, because we are not BUMP texture normal map, but usage is directly connected, but still effective, because it is a 3D texture, this visual difference is almost negligible the.
So how does the actual usage?

Here we use a small plug-in: TranSpace (you can easily find on the Internet)
Its role is to put information into TANGENT NORMAL BUMP information that can be used

As Color Output: make sure the color value range. Should VGH.
Invert Y (V): For some ATI and some other software, to reverse the Y (V) direction. Select VGH
Normalize Output: to ensure the normal value range. Select VGH.
This plug-in can use my previous method simulation, but a lot of trouble.
Here is the HRADWARE rendering.

BUMP2D texture or file textures more trouble. Because most of the time, they can not be correct hardware display! Using the same connection and BUMP3D.

Solve this very simple, as long as the BUMP converted into a normal map texture on it, and then mixed.

In the software rendering easier, and BUMP nesting is the same, 2D and 3D textures are the same can be satisfied with the results.]

View user profile

上一页INBforum   Go down

上一页INBforumView previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

Copyright ©2009-2016 LTD Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.



Free forum | © PunBB | Free forum support | Contact | Report an abuse | Free forum