POV-Ray : Newsgroups : povray.binaries.images : Spherical displacement map : Spherical displacement map Server Time
19 Apr 2024 06:23:56 EDT (-0400)
  Spherical displacement map  
From: Bald Eagle
Date: 11 Jul 2020 22:00:01
Message: <web.5f0a6d9a6f747b6fb0b41570@news.povray.org>
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
function.

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.

{whew}


Post a reply to this message


Attachments:
Download 'sphericalheightfieldtest.png' (211 KB)

Preview of image 'sphericalheightfieldtest.png'
sphericalheightfieldtest.png


 

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