POV-Ray : Newsgroups : povray.advanced-users : Bounding Question #2 Server Time
4 Nov 2024 17:38:13 EST (-0500)
  Bounding Question #2 (Message 1 to 7 of 7)  
From: Remco de Korte
Subject: Bounding Question #2
Date: 12 Aug 1999 05:14:20
Message: <37B29014.E5722D1A@xs4all.nl>
I've never really used manual bounding (not in POV) but as I understand it it
can have advantages. I'm wondering if it can help me here:
I have a series of planes with a hole cut out lined up in front of each other so
the camera looks through the holes. This is quite slow to render. Is there a way
to speed it up with bounding?
I know part of the reason why it it slow is in the light_sources I use. 
I need them to get a flat light. I didn't want the planes to cast shadows on
each other. Obviously this was before I knew of the no_shadow keyword 8-] 
Here is the code:

global_settings{max_trace_level 32}

camera {location<0,0,-20> look_at<0,0,0> angle 30}

sky_sphere {pigment{gradient y 
  color_map{[0 rgb<.7,.1,0>][.2 rgb<1,.9,.3>][1 rgb<.1,.15,.2>]}}}   

light_source{<-20,20,-.9> color rgb .4}
light_source{<20,20,-.9> color rgb .3 shadowless}
light_source{<-20,-20,-.9> color rgb .2 shadowless}
light_source{<20,-20,-.9> color rgb .1 shadowless}
light_source{<-20,20,5> color rgb .2 shadowless}
light_source{<20,20,5> color rgb .15 shadowless}
light_source{<-20,-20,5> color rgb .1 shadowless}
light_source{<20,-20,5> color rgb .05 shadowless}

#declare diam=1.28;
#declare tt=0;
#while (tt<10)
  difference{
  box{<-100,-100,0><100,100,.01>}
  sphere{0,diam+tt/4}           
  pigment{rgb<.4-tt*.045,.3-tt*.0275,.25-tt*.0225>} 
  translate<0,0,-6.25-tt>}
  #declare tt=tt+1;
#end

light_source{0*x color rgb 2.5
  area_light  <8, 0, 0> <0, 8,0>
  10, 10 jitter adaptive 3 translate <0,0,-20>}

Regards,

Remco


Post a reply to this message

From: Nieminen Mika
Subject: Re: Bounding Question #2
Date: 12 Aug 1999 08:07:17
Message: <37b2b8f5@news.povray.org>
Remco de Korte <rem### [at] xs4allnl> wrote:
: I have a series of planes with a hole cut out lined up in front of each other so
: the camera looks through the holes. This is quite slow to render. Is there a way
: to speed it up with bounding?

  If you only see the first plane completely and only a little of the other
planes through the hole, you could bound those planes with one box which
covers the hole in the first plane.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Remco de Korte
Subject: Re: Bounding Question #2
Date: 12 Aug 1999 11:57:04
Message: <37B2EEE3.7B5EAF63@xs4all.nl>
Nieminen Mika wrote:
> 
> Remco de Korte <rem### [at] xs4allnl> wrote:
> : I have a series of planes with a hole cut out lined up in front of each other so
> : the camera looks through the holes. This is quite slow to render. Is there a way
> : to speed it up with bounding?
> 
>   If you only see the first plane completely and only a little of the other
> planes through the hole, you could bound those planes with one box which
> covers the hole in the first plane.
> 

I noticed my story wasn't quite accurate. I talked about planes, but in the code
you can see I used (thin) boxes for that. Would that make any difference?
Anyway, thanks for the suggestion, I'll give it a try.

Remco


Post a reply to this message

From: Mark Wagner
Subject: Re: Bounding Question #2
Date: 13 Aug 1999 01:15:47
Message: <37b3aa03@news.povray.org>
Remco de Korte wrote in message <37B29014.E5722D1A@xs4all.nl>...
>I've never really used manual bounding (not in POV) but as I understand it
it
>can have advantages. I'm wondering if it can help me here:
>I have a series of planes with a hole cut out lined up in front of each
other so
>the camera looks through the holes. This is quite slow to render. Is there
a way
>to speed it up with bounding?
>I know part of the reason why it it slow is in the light_sources I use.
>I need them to get a flat light. I didn't want the planes to cast shadows
on
>each other. Obviously this was before I knew of the no_shadow keyword 8-]
>Here is the code:


>light_source{<-20,20,-.9> color rgb .4}
>light_source{<20,20,-.9> color rgb .3 shadowless}
>light_source{<-20,-20,-.9> color rgb .2 shadowless}
>light_source{<20,-20,-.9> color rgb .1 shadowless}
>light_source{<-20,20,5> color rgb .2 shadowless}
>light_source{<20,20,5> color rgb .15 shadowless}
>light_source{<-20,-20,5> color rgb .1 shadowless}
>light_source{<20,-20,5> color rgb .05 shadowless}


One significant speedup would be to reduce the number of light sources, as
each ray from the camera that hits a plane will get checked against each of
these lights to determine the color contribution from the lights.

>light_source{0*x color rgb 2.5
>  area_light  <8, 0, 0> <0, 8,0>
>  10, 10 jitter adaptive 3 translate <0,0,-20>}


This is another major slowdown, as it is the equivalent of up to 100 light
sources.

Mark


Post a reply to this message

From: Nieminen Mika
Subject: Re: Bounding Question #2
Date: 13 Aug 1999 02:53:44
Message: <37b3c0f8@news.povray.org>
Remco de Korte <rem### [at] xs4allnl> wrote:
: I noticed my story wasn't quite accurate. I talked about planes, but in the code
: you can see I used (thin) boxes for that. Would that make any difference?

  I think yes.
  My idea more exactly: Leave the first plane/box alone but make a union
from all the planes/boxes behind it and bound this union with a box (or
cylinder) which is located at the hole in the first plane/box and which
covers this hole.
  Now povray will test intersections with the first plane/box and the
bounding box everywhere but in the hole, where it tests intesections with
all the planes/boxes (instead of testing intersections with all the
planes/boxes everywhere).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Remco de Korte
Subject: Re: Bounding Question #2
Date: 13 Aug 1999 06:04:12
Message: <37B3E852.D2D94907@xs4all.nl>
Mark Wagner wrote:
> 
> Remco de Korte wrote in message <37B29014.E5722D1A@xs4all.nl>...
> >I've never really used manual bounding (not in POV) but as I understand it
> it
> >can have advantages. I'm wondering if it can help me here:
> >I have a series of planes with a hole cut out lined up in front of each
> other so
> >the camera looks through the holes. This is quite slow to render. Is there
> a way
> >to speed it up with bounding?
> >I know part of the reason why it it slow is in the light_sources I use.
> >I need them to get a flat light. I didn't want the planes to cast shadows
> on
> >each other. Obviously this was before I knew of the no_shadow keyword 8-]
> >Here is the code:
> 
> >light_source{<-20,20,-.9> color rgb .4}
> >light_source{<20,20,-.9> color rgb .3 shadowless}
> >light_source{<-20,-20,-.9> color rgb .2 shadowless}
> >light_source{<20,-20,-.9> color rgb .1 shadowless}
> >light_source{<-20,20,5> color rgb .2 shadowless}
> >light_source{<20,20,5> color rgb .15 shadowless}
> >light_source{<-20,-20,5> color rgb .1 shadowless}
> >light_source{<20,-20,5> color rgb .05 shadowless}
> 
> One significant speedup would be to reduce the number of light sources, as
> each ray from the camera that hits a plane will get checked against each of
> these lights to determine the color contribution from the lights.
> 
> >light_source{0*x color rgb 2.5
> >  area_light  <8, 0, 0> <0, 8,0>
> >  10, 10 jitter adaptive 3 translate <0,0,-20>}
> 
> This is another major slowdown, as it is the equivalent of up to 100 light
> sources.
> 
> Mark

Thanks, but as I explained in my message I need the lightsources, unlikely as it
may seem. Even the area light, and even with this much lights and the settings.
I want a flat light, coming from the camera. I tried no_shadow but that doesn't
work the way I wanted. So, I actually need a shadow but it has to be the same
all over. Try rendering it if you want to know what I'm rambling about.

Regards,

Remco


Post a reply to this message

From: Remco de Korte
Subject: Re: Bounding Question #2
Date: 13 Aug 1999 06:04:13
Message: <37B3E87E.D9B0D018@xs4all.nl>
Nieminen Mika wrote:
> 
> Remco de Korte <rem### [at] xs4allnl> wrote:
> : I noticed my story wasn't quite accurate. I talked about planes, but in the code
> : you can see I used (thin) boxes for that. Would that make any difference?
> 
>   I think yes.
>   My idea more exactly: Leave the first plane/box alone but make a union
> from all the planes/boxes behind it and bound this union with a box (or
> cylinder) which is located at the hole in the first plane/box and which
> covers this hole.
>   Now povray will test intersections with the first plane/box and the
> bounding box everywhere but in the hole, where it tests intesections with
> all the planes/boxes (instead of testing intersections with all the
> planes/boxes everywhere).
> 
Thanks, I'll give it a try. I wonder how significant the speed difference will
be.

Remco


Post a reply to this message

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