POV-Ray : Newsgroups : povray.binaries.images : high resolution height_field functions : Re: high resolution height_field functions Server Time
31 Jul 2024 06:25:09 EDT (-0400)
  Re: high resolution height_field functions  
From: scott
Date: 18 Mar 2010 03:24:56
Message: <4ba1d548$1@news.povray.org>
> As far as workarounds go, I currently know none, except for using a 
> totally different primitive; if you don't need a solid, the parametric 
> primitive may be the way to go, using f(u,v)=u and f(u,v)=v for the x and 
> z coordinates respectively. If you absolutely need a solid, you may want 
> to try the isosurface primitive, using f(x,y,z)=y-g(x,z) (with g being 
> your own function) and the default threshold of 0. Or you can use SDL to 
> create a mesh primitive from the function.

Thanks for the detailed analysis, after a rough look through the source for 
the height field I assumed something similar was happening - I couldn't 
believe it when I saw the normals were stored as 16 bit integers!  I guess 
the code was written in a time where every byte counted.  The code seems to 
be written in such a way that changing it to use floating point numbers is 
straightforward (I guess the original author suspected that in the future 
someone might want to change it).

I had used an isosurface originally but it was painfully slow to render. 
I'll take a look at the parametric primitive, I always forget about that 
one.  Thanks.


Post a reply to this message

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