POV-Ray : Newsgroups : povray.newusers : viewing frustum prediction Server Time
29 Jul 2024 12:25:39 EDT (-0400)
  viewing frustum prediction (Message 1 to 4 of 4)  
From: spl
Subject: viewing frustum prediction
Date: 12 Oct 2005 20:00:00
Message: <web.434da30c5d529832b279c3b00@news.povray.org>
Is there a way of determining whether an object is within the viewing
frustum?

I'd like to avoid loading texture maps for objects outside of the viewing
frustum, which can considerably slow down the parsing of the scene file.


Post a reply to this message

From: Alain
Subject: Re: viewing frustum prediction
Date: 13 Oct 2005 11:21:11
Message: <434e7b67$1@news.povray.org>
spl nous apporta ses lumieres en ce 2005-10-12 19:58:
> Is there a way of determining whether an object is within the viewing
> frustum?
> 
> I'd like to avoid loading texture maps for objects outside of the viewing
> frustum, which can considerably slow down the parsing of the scene file.
> 
> 
> 
> 
The bets thing I came up is to use dummy or development textures. I render with the
dummies, see 
what objects are visible, including in reflections, then apply the final textures.
Have something like #declare UseTestTexture = 1;
Then, in the texture block of your objects you add:
#if(UseTestTexture)
	<your simple dummy texture>
#else
	<your quality texture>
#end
You can also use lower quality (smaller) maps for objects only seen in reflection or
refractions, 
specialy if the reflector is curved.
You can also try using different graphic formats, the smaller the file, the faster it
get. Never use 
BMP or other uncompressed formats. PNG and JPG are good choices.

-- 
Alain
-------------------------------------------------
If Barbie is so popular, why do you have to buy her friends?


Post a reply to this message

From: spl
Subject: Re: viewing frustum prediction
Date: 13 Oct 2005 17:00:01
Message: <web.434ecab5e9a3bb8fb279c3b00@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> The bets thing I came up is to use dummy or development textures. I render with the
dummies, see
> what objects are visible, including in reflections, then apply the final textures.

Is this something which can be done programatically?  I'd like to do this
from an animation script.


Post a reply to this message

From: Slime
Subject: Re: viewing frustum prediction
Date: 13 Oct 2005 17:02:58
Message: <434ecb82$1@news.povray.org>
> Is there a way of determining whether an object is within the viewing
> frustum?


One thing I've done in the past is used screen.inc to create a "screen
plane" - a flat box in front of the camera. Then, by using trace() with this
screen plane from a point to the camera's position, I can determine if the
point is within the camera's viewing frustrum by whether the object is
intersected or not.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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