Difference between revisions of "Spherical Normal maps"

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


----
----
Line 6: Line 6:


'''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!
'''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.
This also applies for [[PRIM_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.
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.
Line 18: Line 18:


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 faces/prims and [[PRIM_SCULPT_TYPE_SPHERE]] spherical sculpted prims.


----
----
Line 26: Line 26:
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 270 (or 90) within SL's normal map settings. [http://i.imgur.com/g1hm0cz.jpg]
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 [[PRIM_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:26, 28 August 2014

Normal maps for spherical prims/faces and spherical sculpted prims PRIM_SCULPT_TYPE_SPHERE 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 PRIM_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 faces/prims and PRIM_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 PRIM_SCULPT_TYPE_SPHERE, you just have to rotate the normal map by 270 (or 90) within SL's normal map settings. [2]