Difference between revisions of "Spherical Normal maps"

From Second Life Wiki
Jump to navigation Jump to search
m (sorting paragraphs, fixing and cutting)
 
Line 1: Line 1:
Normal maps are different between Flat faces, Spherical prim faces and Sculpted Prims: Spherical prim faces require a rotation by 90° that can be tricky for some textures, like spherical world normal maps:
Normal maps are different between flat faces, Spherical prim faces and Sculpted Prims. Spherical prim faces require a rotation by 90° that can be tricky for some textures, like normal maps for spherical globes:


== Planar sculpt maps work just fine on all [[PRIM_SCULPT_TYPE_SPHERE]] sculpted prims, but they do not work on prim spheres ==
== Planar sculpt maps work just fine on all [[PRIM_SCULPT_TYPE_SPHERE]] sculpted prims, but they do not work on prim spheres ==


[http://secondlife.com/app/image/3e9211d6-c42d-a9ff-95b9-5c1ab349ed38/2 3e9211d6-c42d-a9ff-95b9-5c1ab349ed38] will not work on prim spheres because they have their poles on the left and right side of an unrotated texture. But rotating a normal map changes the normal map, rotating a normal map by 180° inverts it.
[http://secondlife.com/app/image/3e9211d6-c42d-a9ff-95b9-5c1ab349ed38/2 3e9211d6-c42d-a9ff-95b9-5c1ab349ed38] will NOT work on prim spheres because they have their poles on the left and right side of an unrotated texture. But rotating a normal map changes the normal map, rotating a normal map by 180° inverts it.


Using .werkkzeug3 [https://mega.co.nz/#!s0UHSKTJ!BqybVjWr8wdfYTNePdS5bhonAJkZh3P_2YAvPEtCvVU] to make maps for spherical prims from a height map needs the following command chain:
Using .werkkzeug3 [https://mega.co.nz/#!s0UHSKTJ!BqybVjWr8wdfYTNePdS5bhonAJkZh3P_2YAvPEtCvVU] to make maps for spherical prims from a height map needs the following command chain:
Line 14: Line 14:
* HSCB: With 0.600 as "hue" parameter, making "flat" BLUE.
* HSCB: With 0.600 as "hue" parameter, making "flat" BLUE.
* Rotate: With "angle" set to 0.250, rotating 90° to the left.
* Rotate: With "angle" set to 0.250, rotating 90° to the left.
== This Purple-rotated normal map works on sculpt spheres and prim spheres, but not on flat prim faces: ==
[http://secondlife.com/app/image/1e266b9c-f842-865f-9eb2-39b43e30cb75/2 1e266b9c-f842-865f-9eb2-39b43e30cb75]
* Import: (a .png height map image that has the north pole facing up and that has high parts white and low parts black)
* Color: "Mode" set to "invert" (most normal maps in .werkkzeug need inverted height maps.)
* Rotate: With "angle" set to 0.250, rotating 90° to the left.
* Normal: 3d (flat will be red, hills are green on the lower side)
* HSCB: With 0.800 as "hue" parameter, making "flat" PURPLE. (0.8 is correct here, it is purple after all)
The normal map must be rotated by 270 in second life.


----
----
Line 33: Line 21:
but green must still be on the upper side of a hill like here: [http://secondlife.com/app/image/ab6adc27-e101-9d3a-1097-088104c1f607/2 ab6adc27-e101-9d3a-1097-088104c1f607]  
but green must still be on the upper side of a hill like here: [http://secondlife.com/app/image/ab6adc27-e101-9d3a-1097-088104c1f607/2 ab6adc27-e101-9d3a-1097-088104c1f607]  


Its flat normal-color is bright blue.
green must be on top of ah hill.
red must be in the lower right of a hill.
blue must be in the lower left of a hill.


Using .werkkzeug3 to make these normal maps for spherical prims needs the following command chain:
Using .werkkzeug3 to make these normal maps for spherical prims needs the following command chain:
Line 45: Line 29:
* HSCB: With 0.600 as "hue" parameter, making "flat" blue.
* HSCB: With 0.600 as "hue" parameter, making "flat" blue.


(there is no "Color: invert" here and we rotate AFTER makign the normal map!)
== This Purple-rotated normal map works on sculpt spheres and prim spheres, but not on flat prim faces: ==
 
[http://secondlife.com/app/image/1e266b9c-f842-865f-9eb2-39b43e30cb75/2 1e266b9c-f842-865f-9eb2-39b43e30cb75] if good if you like spheres.
 
* Import: (a .png height map image that has the north pole facing up and that has high parts white and low parts black)
* Color: "Mode" set to "invert" (inverting the height map to make high places black and low places white)
* Rotate: With "angle" set to 0.250, rotating 90° to the left.
* Normal: 3d (flat will be red, hills are green on the lower side)
* HSCB: With 0.800 as "hue" parameter, making "flat" PURPLE. (0.8 is correct here, it is purple after all)
 
The normal map must be rotated by 270 in second life.

Latest revision as of 13:09, 28 August 2014

Normal maps are different between flat faces, Spherical prim faces and Sculpted Prims. Spherical prim faces require a rotation by 90° that can be tricky for some textures, like normal maps for spherical globes:

Planar sculpt maps work just fine on all PRIM_SCULPT_TYPE_SPHERE sculpted prims, but they do not work on prim spheres

3e9211d6-c42d-a9ff-95b9-5c1ab349ed38 will NOT work on prim spheres because they have their poles on the left and right side of an unrotated texture. But rotating a normal map changes the normal map, rotating a normal map by 180° inverts it.

Using .werkkzeug3 [1] to make maps for spherical prims from a height map needs the following command chain:

(double right klick in the lower window to add a function, they are chained from top to bottom loke these functions:)

  • Import: (a .png height map image that has the north pole facing up and that has high parts white and low parts black)
  • Rotate: With "angle" set to -0.250, rotating 90° to the right!
  • Normal: 3d (flat will be red, hills are green on the lower side)
  • HSCB: With 0.600 as "hue" parameter, making "flat" BLUE.
  • Rotate: With "angle" set to 0.250, rotating 90° to the left.

A PRIM_TYPE_SPHERE normal map for a sphere prim must be rotated by 90°:

but green must still be on the upper side of a hill like here: ab6adc27-e101-9d3a-1097-088104c1f607


Using .werkkzeug3 to make these normal maps for spherical prims needs the following command chain:

  • Import: (a .png height map image that has the north pole facing up and that has high parts white and low parts black)
  • Normal: 3d (flat will be red, hills are green on the lower side)
  • Rotate: With "angle" set to 0.250, rotating 90° to the left.
  • HSCB: With 0.600 as "hue" parameter, making "flat" blue.

This Purple-rotated normal map works on sculpt spheres and prim spheres, but not on flat prim faces:

1e266b9c-f842-865f-9eb2-39b43e30cb75 if good if you like spheres.

  • Import: (a .png height map image that has the north pole facing up and that has high parts white and low parts black)
  • Color: "Mode" set to "invert" (inverting the height map to make high places black and low places white)
  • Rotate: With "angle" set to 0.250, rotating 90° to the left.
  • Normal: 3d (flat will be red, hills are green on the lower side)
  • HSCB: With 0.800 as "hue" parameter, making "flat" PURPLE. (0.8 is correct here, it is purple after all)

The normal map must be rotated by 270 in second life.