POV-Ray : Newsgroups : povray.advanced-users : Bounding with a sky_sphere : Re: Bounding with a sky_sphere Server Time
30 Jul 2024 10:17:17 EDT (-0400)
  Re: Bounding with a sky_sphere  
From: David Vincent-Jones
Date: 18 Feb 2000 12:56:07
Message: <38ad87b7@news.povray.org>
Many thanks, good idea .... I will give it a try

Looking at the Histogram is also most revealing.
What I am seeing is that reducing distant objects is not the only criteria
in speeding up the display.

Much time is also spent with surfaces that are quite close to the camera
especially where the height_field passes under, or around, the camera.

David

Disnel <Dis### [at] linuxitamcascz> wrote in message
news:38AC138C.A5645660@linux.itam.cas.cz...
>
> Instead of bounding, try use #if directive and cut off
> objects too distant from camera, something like:
>
> #declare MaximumDistance= something
>
> #declare CameraPos= <bla, bla, bla>
>
> #macro dist(v1, v2)
>   #local dx=v2.x-v1.x;
>   #local dy=v2.y-v1.y;
>   #local dz=v2.z-v1.z;
>   ( sqrt(dx*dx + dy*dy +dz*dz) )
> #end
>
> ...
>
>
> #declare Building1=
> object {
>    ...
> }
> #declare Building1pos= <bla, bla, bla>
>
> #if (dist(CameraPos, Building1Pos) < MaximumDistance)
>    object { Building1 translate Building1pos }
> #end
>
> Maybe I make some mistake in syntax, but idea is clear, hopefully
>
> Or you can enclose entire object definition in #if statement,
> you will then improve parsing time too.
>
> Disnel
>
> E-Mail:   dis### [at] itamcascz
> Homepage: http://www.itam.cas.cz/~disnel
> ICQ:      20126042


Post a reply to this message

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