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