POV-Ray : Newsgroups : povray.binaries.images : Spherical displacement map : Spherical displacement map Server Time: 22 Sep 2020 15:20:36 GMT
  Spherical displacement map  
From: Bald Eagle
Date: 12 Jul 2020 02:00:01
I stuck with it and disabused my mind of whatever was plaguing it.

Primarily, it was a problem caused by evaluating the latitude using the
cartesian coordinates of the full volume of the isosurface contained_by shape.

That threw everything out of the valid -1 to 1 input range for the acos

Just for future reference:

#declare Length = function (X, Y, Z)  {sqrt(pow(X,2)+pow(Y,2)+pow(Z,2))}
#declare Lat = function (X, Y, Z) {acos ( min(Y/Length(X, Y, Z), 1) )}
#declare Long = function (X, Y, Z) {atan2 (Z, X)}

The displacement-map isosurface is on the left, and the bump_map from the same
image is on the right.


Post a reply to this message

Download 'sphericalheightfieldtest.png' (211 KB)

Preview of image 'sphericalheightfieldtest.png'


Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.