POV-Ray : Newsgroups : povray.binaries.images : high resolution height_field functions : Re: high resolution height_field functions Server Time
4 Nov 2024 13:16:52 EST (-0500)
  Re: high resolution height_field functions  
From: scott
Date: 17 Mar 2010 11:21:21
Message: <4ba0f371$1@news.povray.org>
> I noticed that if I make a height field like this...
>
> height_field
> {
>   function nPoints, nPoints {fn_X(x,0,y)}
>   smooth
> }
>
> as you increase "nPoints" the normals get messed up somehow (visible 
> easily
> if you have specular or reflection enabled) both with and without 
> "smooth".
> Check the attached images, notice how the grid texture becomes better with
> nPoints at 1000, but then the normals get screwed up.  Is it a bug?

I found the problem.  Height_field values *and normals* are stored as 16 bit 
integers internally at parse time, even if you specify a function pattern as 
I did.  Thus when zooming in (or scaling) you will see the discrete nature 
of these values, the same problem if you use an image.  I did a quick hack 
in the source to use floating point rather than integers, and it seems to 
fix this problem at the cost of memory usage.


Post a reply to this message

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