POV-Ray : Newsgroups : povray.off-topic : I know I could try this myself, but... Server Time
6 Sep 2024 17:20:29 EDT (-0400)
  I know I could try this myself, but... (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Darren New
Subject: I know I could try this myself, but...
Date: 14 Dec 2008 18:27:58
Message: <4945967e$1@news.povray.org>
... I figured someone would have an answer more easily.

If I have a bunch of lights inside a box, one light outside of a box, one 
object to illuminate outside the box, and one camera outside the box, the 
trace goes much faster if I remove the lights inside the box from the scene. 
Apparently, POV isn't clever enough to know that the lights inside the solid 
opaque box don't affect the scene outside the box.

If I put the lights inside the box inside a light group that includes only 
the other objects inside the box, will it be faster when the camera is 
outside the box? Or will I still be better off commenting out the lights 
inside the box?  I.e., how fast does using lights in a lightgroups speed up 
a scene (where you can't see any of the objects in the lightgroup) compared 
to not having the lights at all?

I just don't want to go thru the work of rewriting a bunch of macros if I'm 
not going to get a significant speed-up.

-- 
   Darren New, San Diego CA, USA (PST)
   The NFL should go international. I'd pay to
   see the Detroit Lions vs the Roman Catholics.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: I know I could try this myself, but...
Date: 14 Dec 2008 19:15:46
Message: <4945a1b1@news.povray.org>
Is it just me, or is this off-topic for the off-topic group? :)


Post a reply to this message

From: Darren New
Subject: Re: I know I could try this myself, but...
Date: 14 Dec 2008 19:19:28
Message: <4945a290@news.povray.org>
Nicolas Alvarez wrote:
> Is it just me, or is this off-topic for the off-topic group? :)

Oops.

-- 
   Darren New, San Diego CA, USA (PST)
   The NFL should go international. I'd pay to
   see the Detroit Lions vs the Roman Catholics.


Post a reply to this message

From: Warp
Subject: Re: I know I could try this myself, but...
Date: 14 Dec 2008 19:49:02
Message: <4945a97e@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> If I have a bunch of lights inside a box, one light outside of a box, one 
> object to illuminate outside the box, and one camera outside the box, the 
> trace goes much faster if I remove the lights inside the box from the scene. 
> Apparently, POV isn't clever enough to know that the lights inside the solid 
> opaque box don't affect the scene outside the box.

  How about simply enclosing those light sources inside #if blocks?
If the camera is outside, don't create the inside light sources at all.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: I know I could try this myself, but...
Date: 14 Dec 2008 22:25:34
Message: <4945ce2e$1@news.povray.org>
Warp wrote:
>   How about simply enclosing those light sources inside #if blocks?
> If the camera is outside, don't create the inside light sources at all.

That's what I essentially wound up doing. I have my own macro preprocessor 
(instead of using SDL).  I was hoping to be able to (for example) describe 
the shape of the outside walls once and reuse it on every floor, but POV's 
bounding boxes aren't magically clever.  Then I realized if I have a 
five-story building with 50 light bulbs on each floor, I'll be dead before 
it renders, so I essentially put in my own version of "light groups" to 
simply not expand the lights in the macro expansions unless the camera was 
in "the same room", but it's all manual at the moment. I was hoping I could 
have basically one expansion of the macro work for all the different traces. 
(I take dozens of traces of each room and make a walk-thru. I had to put 
closed doors between the rooms so I could turn off lights in a way that kept 
  you from seeing they're off.)

I was just wondering if it was worth modifying my macros to allow lights in 
lightgroups, or whether leaving it as "the camera and light are in the same 
room so include the light" bit is the best I can do. (Which implies 
re-expanding the macros for each room, which takes several minutes because 
the macro expander is not written with efficiency in mind.)

Honestly, it was at least as much curiosity as practicality. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   The NFL should go international. I'd pay to
   see the Detroit Lions vs the Roman Catholics.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: I know I could try this myself, but...
Date: 14 Dec 2008 23:05:59
Message: <4945d7a6@news.povray.org>
Darren New wrote:
> That's what I essentially wound up doing. I have my own macro preprocessor
> (instead of using SDL).  I was hoping to be able to (for example) describe
> the shape of the outside walls once and reuse it on every floor, but POV's
> bounding boxes aren't magically clever.  Then I realized if I have a
> five-story building with 50 light bulbs on each floor, I'll be dead before
> it renders, so I essentially put in my own version of "light groups" to
> simply not expand the lights in the macro expansions unless the camera was
> in "the same room", but it's all manual at the moment. I was hoping I
> could have basically one expansion of the macro work for all the different
> traces. (I take dozens of traces of each room and make a walk-thru. I had
> to put closed doors between the rooms so I could turn off lights in a way
> that kept you from seeing they're off.)
> 
> I was just wondering if it was worth modifying my macros to allow lights
> in lightgroups, or whether leaving it as "the camera and light are in the
> same room so include the light" bit is the best I can do. (Which implies
> re-expanding the macros for each room, which takes several minutes because
> the macro expander is not written with efficiency in mind.)

I don't know if this is at all relevant for what you're doing, but I'll say
it anyway :)

A generic way to see if a light affects a scene:
Render a very small image for each light; each image having only one light
turned on. Take the images that aren't completely black. Those are the
relevant lights :)

I thought about it for re-renders of long animations. Render the whole
animation at a tiny size, compare the tiny images with the ones I did
before the last change, take the differing ones, re-render only those at
full size.


Post a reply to this message

From: Darren New
Subject: Re: I know I could try this myself, but...
Date: 15 Dec 2008 00:22:35
Message: <4945e99b$1@news.povray.org>
Nicolas Alvarez wrote:
> A generic way to see if a light affects a scene:
> Render a very small image for each light; each image having only one light
> turned on. Take the images that aren't completely black. Those are the
> relevant lights :)

I know which lights affect a scene. The problem is I have hundreds of 
lights, and hundreds of frames.

http://darren.s3.amazonaws.com/Castle/SavedOUT/index.html

Take a look at the "floor plan" link near the bottom. That's one floor. The 
big room in the middle has (about) 30 light sources and needs probably 200+ 
images, depending on which way you're facing and where you're standing. That 
floorplan image with all the lights for just one of the six floors turning 
on rendered in the pixels-per-minute timeframe. Turning off those lights 
while rendering (for example) the bedrooms (or the other floors, for that 
matter) speeds things up immensely, which is why you see so many curtains 
hanging there.

Right now, I run the macro expansion once for each room, then render all the 
images for that room. It would certainly be more convenient to run the 
expansion once and render the whole building, but that's not going to work 
unless lightgroups can very efficiently interact with bounding boxes to 
ensure the blocked lights don't take up a lot of time. It took about half as 
long to run one expansion as it does to render one frame of the smaller 
rooms, so it would have to be very efficient to make it worthwhile.

> I thought about it for re-renders of long animations. Render the whole
> animation at a tiny size, compare the tiny images with the ones I did
> before the last change, take the differing ones, re-render only those at
> full size.

Not a bad idea.

-- 
   Darren New, San Diego CA, USA (PST)
   The NFL should go international. I'd pay to
   see the Detroit Lions vs the Roman Catholics.


Post a reply to this message

From: Invisible
Subject: Re: I know I could try this myself, but...
Date: 15 Dec 2008 05:18:42
Message: <49462f02$1@news.povray.org>
Darren New wrote:

> If I have a bunch of lights inside a box, one light outside of a box, 
> one object to illuminate outside the box, and one camera outside the 
> box, the trace goes much faster if I remove the lights inside the box 
> from the scene. Apparently, POV isn't clever enough to know that the 
> lights inside the solid opaque box don't affect the scene outside the box.

More exactly: POV-Ray figuring out which lights should affect stuff 
outside the box is *why* it goes slower. :-P


Post a reply to this message

From: m a r c
Subject: Re: I know I could try this myself, but...
Date: 15 Dec 2008 06:10:12
Message: <49463b14@news.povray.org>

4945a97e@news.povray.org...
>  How about simply enclosing those light sources inside #if blocks?
> If the camera is outside, don't create the inside light sources at all.
>
> -- 
>                                                          - Warp
Don't even answer : he just deserve to get canned for on-topic in off-topic 
 >:->

Marc


Post a reply to this message

From: m a r c
Subject: Re: I know I could try this myself, but...
Date: 15 Dec 2008 06:11:37
Message: <49463b69$1@news.povray.org>

4945967e$1@news.povray.org...
> ... I figured someone would have an answer more easily.
>
> If I have a bunch of lights inside a box, one light outside of a box, one 
> object to illuminate outside the box, and one camera outside the box, the 
> trace goes much faster if I remove the lights inside the box from the 
> scene. Apparently, POV isn't clever enough to know that the lights inside 
> the solid opaque box don't affect the scene outside the box.
>
POV is clever but wondering if the cat is dead or alive !

Marc


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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