Maxwell Render

Maxwell Render Information Repository
It is currently Tue May 21, 2013 11:34 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: •FAQ• Normal Mapping
PostPosted: Thu Jul 06, 2006 2:32 am 
User avatar

Joined: Wed Oct 19, 2005 7:06 am
Posts: 1708
Location: Leeds, UK
My normal mapping tests with V1.1.

In each case the HexagonalNormal.jpg map was used from the texture folder, with no other maps used, just a base yellow colour. However I did put the Normal map into both bsdf layers and each one matched the other layer for values and flip type.

I think the rest is self explanatory, although I don't understand the flip system and how it's relevant to a certain type of normal map.

I didn't do a negative X or Z flip as they didn't look as convincing as the Y flip version.

Which type of normal map does M~R accept?

Anyway here are my preview window quick renders to check things are okay.


Image

Image


Tim.

_________________
http://emp3d.com
-------------------------------------
Next Limit Certified Training Centre for Maxwell Render.
Maxwell Render Training & consultancy. A-Team tester.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 10:41 am 
User avatar

Joined: Mon Jan 10, 2005 11:53 am
Posts: 7607
--------------------> X
|
|
|
|
|
|
V

Y

When using data from texture, the above is screen coordinates and origin is at the top-left. However some applications creates map like:

Y

A
|
|
|
|
|
-----------------> X

So, in the code the formula is based on screen coordinates and you should interpret Y as flipped, which is green channel in fact.

Example:
Encoding of a bumpy (outwards) sphere taking care of screen coordinates would look like this.

NORMAL MAP (encoded topleft as origin)
Image

RED
Image

GREEN
Image

See the red channel gradient (0-255) goes from left to right and the green channel gradient goes from up to down. Because the origin is top-left and this kind of normal map will be rendered without flipping any axis by the core.

And for most common packages like C4D, ZBrush etc, the same bumpy (outwards) sphere is encoded like the following:

NORMAL MAP (encoded bottomleft as origin)
Image


RED
Image

GREEN
Image

See now the origin is based on bottom left and so the green gradient is going from down to up. Which means, such maps' Y direction have to be treated invert according to screen coordinates. So, the flipped interpretation comes. Here, the word "Flip" doesn't mean flipping the map itself. It's about interpretation of the map by the core. This could be done internally and default checkboxes could be left as unchecked but we want to keep the origin intact as screen based.

There are basically the above 2 kind of encodings are present in terms of Y directions but you may find several other maps which has invert encoded red (x) axis too. Thus, we provided rendering of all possibilities. Therefore, if you toggle both flags, you'll have the effect inverted. But if you toggle just one of them, it will look incorrect. This is for special cases when one axis of the map is outof standards. Why? Because the normal map creation applications let this, so we should...

Hope this helps.

btw...here's Kabe's scene with 1.05 using Flip Y checked.
Image

Further reading:
http://www.pinwire.com/article82.html
...and if you wonder Wide Z, it's here for Blender maps.
http://blender3d.org/cms/Normal_Maps.491.0.html

_________________
Next Limit Team


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 7:47 pm 
User avatar

Joined: Thu Apr 14, 2005 12:06 am
Posts: 1384
Location: Munich
tom wrote:
...and if you wonder Wide Z, it's here for Blender maps.
http://blender3d.org/cms/Normal_Maps.491.0.html


:?: So... does "wide Z" mean that

a) Blue maps from (0-255) to Z (0.0 to 1.0)

or

b) Blue maps from (0-255) to Z (-1.0 to 1.0)

Thanks

Kabe

_________________
Maxwell Render Calculator 0.9.8 - http://www.klausbusse.de/mxc/
MXM Checker 0.9.0 - http://www.klausbusse.de/mxmchecker/
Cinema 4D R11, 2x2.66, 4 GB RAM


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 10:51 pm 
User avatar

Joined: Mon Jan 10, 2005 11:53 am
Posts: 7607
It's (0 to 1.0). Maybe you'll say it's for more precision at front half and it should be called Half Z instead of Wide Z but here the naming is truly relative. It depends on where you want to look. Like in LDR/HDR, it means a wide range of Z for the frontal half which makes sense in output since they already call it "full blue range". :)

_________________
Next Limit Team


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 3:05 am 
User avatar

Joined: Wed Oct 19, 2005 7:06 am
Posts: 1708
Location: Leeds, UK
Thankyou for the great explaination Tom & the links. Image

I must try this method you have shown with Blender, didn't think of making them that way. I've been using coloured lights in Max.


Cheers,

Tim.

_________________
http://emp3d.com
-------------------------------------
Next Limit Certified Training Centre for Maxwell Render.
Maxwell Render Training & consultancy. A-Team tester.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 9:18 am 
User avatar

Joined: Thu Apr 14, 2005 12:06 am
Posts: 1384
Location: Munich
tom wrote:
It's (0 to 1.0). Maybe you'll say it's for more precision at front half and it should be called Half Z instead of Wide Z but here the naming is truly relative.


Yep, that was why I was asking. This posting should be added to the manual ;-)

Kabe

_________________
Maxwell Render Calculator 0.9.8 - http://www.klausbusse.de/mxc/
MXM Checker 0.9.0 - http://www.klausbusse.de/mxmchecker/
Cinema 4D R11, 2x2.66, 4 GB RAM


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group