Spherical Normal maps

From Second Life Wiki
Revision as of 08:39, 28 August 2014 by Ollj Oh (talk | contribs) (first draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

- 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!

This does not apply for SCULPT_TYPE_SPHERE spherical sculpted prims. You can

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.

- 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.

-examples illustrating the differences:

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.