Difference between revisions of "Spherical Normal maps"

From Second Life Wiki
Jump to navigation Jump to search
(first draft)
 
Line 1: Line 1:
Normal maps for spherical prims/faces and spherical sculpted prims are different and involve some more/different steps:
Normal maps for spherical prims/faces and spherical sculpted prims are different and involve some more/different steps: [http://i.imgur.com/g1hm0cz.jpg]


- Your texture must be sideways to work with a spherical prim:
----


'''To work on a spherical prim, the height map for your normal map needs to be rotated rotated by -90° counter clockwise''' (clockwise may work as well, not tested) before you turn it into a normal map. Otherwise the north pole of an earth map on a spherical prim would not be on the north pole of a spherical prim! You can not rotate a normal map on a prim in post without changing the way that it reflects light. A 180° rotation of a normal map within SL turns a hill into a valley!
==  Your texture must be rotated 90° sideways to work with a spherical prim and SCULPT_TYPE_SPHERE: ==


This does not apply for SCULPT_TYPE_SPHERE spherical sculpted prims. You can
'''To work on a spherical prim, the height map for your normal map needs to be rotated rotated by 90°''' counter clockwise before you turn it into a normal map. (90° clockwise may work as well) Otherwise the north pole of an earth map on a spherical prim would not be on the pole of a spherical prim face! You can not rotate a normal map on a prim in post without changing the way that it reflects light. A 180° rotation of a normal map within SL turns a hill into a valley!
This also applies for SCULPT_TYPE_SPHERE spherical sculpted prims.


A bump/hill on your (unfinished) normal map should have green on the upper side, blue on the left side and flat terrain should be bright red. This map would work nicely on a flat texture.
A bump/hill on your (unfinished) normal map should have green on the upper side, blue on the left side and flat terrain should be bright red. This map would work nicely on a flat texture. But it will not work on spherical faces.


- all spherical normal maps need hue shifted by -90
----
''' To work on a spherical face or on a spherical sculpted prim, a normal maps image needs to be shifted in its HUE by -90''' (-1/4 of a full hue rotation).
 
 
== All spherical normal maps need hue-shifted by -90: ==
 
''' To work on a spherical face or on a (spherical) sculpted prim, a normal maps image needs to be shifted in its HUE by -90''', -1/4 of a full hue rotation.


Flat terrain should now be purple, the upper left side of a bump should now be green, the upper right side should be red and the lower side should be blue.
Flat terrain should now be purple, the upper left side of a bump should now be green, the upper right side should be red and the lower side should be blue.
This is necessary for spherical prims and SCULPT_TYPE_SPHERE spherical sculpted prims.
This is necessary for spherical prims and SCULPT_TYPE_SPHERE spherical sculpted prims.


-examples illustrating the differences:
----
 
== illustrating example: ==


A flat normal map (1a6c1313-8042-62cb-8b59-5f30bbfbc47e) on a prim-sphere will have a light source cast no light "south" of it (assuming an earth-map and mostly flat terrain) and have all flat/ocean terrain north of it 100% illuminated.
A flat normal map (1a6c1313-8042-62cb-8b59-5f30bbfbc47e) on a prim-sphere will have a light source cast no light "south" of it (assuming an earth-map and mostly flat terrain) and have all flat/ocean terrain north of it 100% illuminated.


A spherical normal map on a prim-sphere (1e266b9c-f842-865f-9eb2-39b43e30cb75) on a sphere will work properly. The same spherical normal map will work on SCULPT_TYPE_SPHERE, you just have to rotate the normal map by 90 or 270 within SL's normal map settings.
A spherical normal map on a prim-sphere (1e266b9c-f842-865f-9eb2-39b43e30cb75) on a sphere will work properly. The same spherical normal map will work on SCULPT_TYPE_SPHERE, you just have to rotate the normal map by 270 (or 90) within SL's normal map settings. [http://i.imgur.com/g1hm0cz.jpg]

Revision as of 09:20, 28 August 2014

Normal maps for spherical prims/faces and spherical sculpted prims are different and involve some more/different steps: [1]


Your texture must be rotated 90° sideways to work with a spherical prim and SCULPT_TYPE_SPHERE:

To work on a spherical prim, the height map for your normal map needs to be rotated rotated by 90° counter clockwise before you turn it into a normal map. (90° clockwise may work as well) Otherwise the north pole of an earth map on a spherical prim would not be on the pole of a spherical prim face! You can not rotate a normal map on a prim in post without changing the way that it reflects light. A 180° rotation of a normal map within SL turns a hill into a valley! This also applies for SCULPT_TYPE_SPHERE spherical sculpted prims.

A bump/hill on your (unfinished) normal map should have green on the upper side, blue on the left side and flat terrain should be bright red. This map would work nicely on a flat texture. But it will not work on spherical faces.



All spherical normal maps need hue-shifted by -90:

To work on a spherical face or on a (spherical) sculpted prim, a normal maps image needs to be shifted in its HUE by -90, -1/4 of a full hue rotation.

Flat terrain should now be purple, the upper left side of a bump should now be green, the upper right side should be red and the lower side should be blue. This is necessary for spherical prims and SCULPT_TYPE_SPHERE spherical sculpted prims.


illustrating example:

A flat normal map (1a6c1313-8042-62cb-8b59-5f30bbfbc47e) on a prim-sphere will have a light source cast no light "south" of it (assuming an earth-map and mostly flat terrain) and have all flat/ocean terrain north of it 100% illuminated.

A spherical normal map on a prim-sphere (1e266b9c-f842-865f-9eb2-39b43e30cb75) on a sphere will work properly. The same spherical normal map will work on SCULPT_TYPE_SPHERE, you just have to rotate the normal map by 270 (or 90) within SL's normal map settings. [2]