POV-Ray : Newsgroups : povray.advanced-users : Height field mapping onto a sphere using hf_sphere : Re: Height field mapping onto a sphere using hf_sphere Server Time
30 Jun 2024 02:06:24 EDT (-0400)
  Re: Height field mapping onto a sphere using hf_sphere  
From: Warp
Date: 9 Apr 2010 01:57:02
Message: <4bbec1ae@news.povray.org>
Jim O'Donnell <nomail@nomail> wrote:
> I'm sure folks have asked this many a time, but I am stuck. All (!) I want to do
> is wrap a height field around a sphere to make a planet-like object. I can make
> a successful height field object no problem, but am stalled completely on
> getting the hf_sphere bit to work.

> Any clues/examples?

  HF_Sphere only takes a user-defined function as parameter. Perhaps
someone should make a version which takes an image file name as parameter
in order to make it easier to create a spherical heightfield from an image
file.

  The process itself goes like:

  You create a pigment function (a function containing a pigment), and the
pigment should have your image as an image_map. You create another function
which calls that pigment function and chooses one of its components, or the
'gray' component, depending on what you want to do (ie. something like
#declare HFFunction = function { that_pigment_function(x,y,z).x };) Then
you give that as parameter to HF_Sphere.

-- 
                                                          - Warp


Post a reply to this message

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