POV-Ray : Newsgroups : povray.unofficial.patches : Isosurface feature request : Re: Isosurface feature request Server Time
2 Sep 2024 14:18:13 EDT (-0400)
  Re: Isosurface feature request  
From: Matthew Corey Brown
Date: 1 Jan 2000 17:19:09
Message: <386E7D29.2BAD5F3B@xenoarch.com>
First Thing, yes using patterns directly would be slightly faster
by removing per lookup approximately 

10 multipulcations / divisions
5 add/subs
2 compares
1 or 2 function calls

(this is done from my color conversion so you can use red/green hf
images, and blending of colors of evalpigment, this is off the top of my
head so 
for sake of argument lets triple these numbers)

How ever most patterns use noise which is a couple of magnitudes of more
adds and muls.

so depending on how much turbulence and which pattern you gain anywhere
from 0.01% to 50% gain, the 50% gain is if you use gradient with
no turbulence, might as well use y-floor(y) and possibly get an even
faster speed gain. but i would stay 99% of the functions the speed gain
would be less then %1

note on precision: colors do use floats, but some compilers reduce
doubles
to floats when they are told todo fast math, personally i compile
without fast math.

without the source in front of me i'm not sure if eval pattern does the
turbulence or not, however i don't see it a hard addition, just a
tedious
one. (as pattern in heightfields uses pigments too if i remember right
when i was trying to add a cap to 0..1 capability to use my fractal
terrains i haven't yet ben able to make sure it returns values between 0
and 1 .. i degress)

Chris Huff wrote:
> 
> In article <386c87de@news.povray.org>, Nieminen Juha
> <war### [at] punarastascstutfi> wrote:
> 
> > Chris Huff <chr### [at] yahoocom> wrote:
> > : Another advantage could be the increased precision, aren't color_maps
> > : limited to 255 levels of color?
> >
> >   Says who?
> 
> I don't know. Which is why I didn't state it as a fact. :-)
> I know they are limited to 255 entries, but I don't know how much
> precision a float value derived from a color_map would have. I haven't
> taken a close look at that part of the code. But the patterns can return
> double precision values, and they don't have to interpret a color_map to
> do so. This makes slightly less flexibility, you can't alter the
> waveform with a color_map, but could be a lot faster.
> 
> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/


Post a reply to this message

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