POV-Ray : Newsgroups : povray.unofficial.patches : REQ: Improved media efficiency : Re: REQ: Improved media efficiency Server Time
2 Sep 2024 08:18:50 EDT (-0400)
  Re: REQ: Improved media efficiency  
From: Chris Huff
Date: 6 Mar 2000 13:40:23
Message: <chrishuff_99-36FA7A.13420506032000@news.povray.org>
In article <NTnDOAGSBzHHoh5uC0Ey4azKVFd+@4ax.com>, Peter Popov 
<pet### [at] usanet> wrote:

> Is it possible to speed up the media calculations where multiple
> densities are involved? More precisely, can some type of bounding be
> used with finite density patterns such as spherical, cylindrical or
> planar? This would be especially beneficial for smoke, fire and steam
> modelled with multiple spherical "puffs".

I don't think it would be possible with spherical or cylinderical, since 
they are basically bounded onion and wood patterns. Planar would be a 
kind of bounded gradient. For example, with spherical, you would have to 
get the distance from the origin, and only evaluate the spherical 
pattern if the distance is below a certain value. However, the spherical 
pattern just returns the distance from the origin if it is below that 
value, so the "bounding" would be redundant and would actually slow 
things down(you would have to calculate the distance and a conditional 
an additional time).

If you have a slow rendering pattern(like proximity) and you want to 
confine it to a certain area, you might want to try "bounding" it with 
the object pattern. That pattern only uses the inside-outside test, so 
it is pretty fast for most primitives.


> If something like this is already implemented, for example in the blob
> pattern, please let me know.

I didn't really understand the pseudo code you showed, but I don't 
understand the media code very well either.
The blob pattern and pigment are very un-optimized. All of the 
components are tested for each evaluation point. I plan to add a list to 
each component which contains pointers to the components it interacts 
with in order to fix this problem, but I haven't had time yet. It is 
still pretty fast as-is, though.(that is one reason I haven't bothered 
to optimize it)

-- 
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.