POV-Ray : Newsgroups : povray.general : Radiosity pregeneration question Server Time
4 Aug 2024 16:12:27 EDT (-0400)
  Radiosity pregeneration question (Message 1 to 6 of 6)  
From: RDX
Subject: Radiosity pregeneration question
Date: 21 Apr 2003 14:40:16
Message: <web.3ea43a137101d31e6af4484a0@news.povray.org>
I am working on a perl script that enables me to break up large still
renders into multiple small strips which are shot off to different servers
(or the same server on multi CPU systems) for rendering and then
reassembled after they are all finished.

Naturally this works quite well without antialiasing or radiosity.

So far I've managed to solve the problem of antialiasing artifacts by
rendering the 'strips' with extra pixels on the sides, then cropping these
strips before the final reassembly.  This works quite well and my test
image (1280x1024, 16 strips, antialiasing  +A0.001 +R10) reassembles
flawlessly.

I decided to solve the problem of radiosity by using the load_file,
save_file radiosity block options, and always_sample turned to off (a fair
compromise).  I would then use the radiosity map generated by this stage
when rendering the individual strips.

My question is, how do I get POVRay to exit once it has generated the
radiosity map?  Currently it generates the radiosity information and then
goes on to render the image in it's entirety!  Obviously this defeats the
purpose of what I'm trying to achieve.

Any ideas?

Regards,

-peter


Post a reply to this message

From: George Pantazopoulos
Subject: Re: Radiosity pregeneration question
Date: 21 Apr 2003 15:04:09
Message: <3ea440a9$1@news.povray.org>
Hey Peter,
You have to edit the FrameRender() function in povray.cpp. Heres what I did
for POV-Ray XR, my experimental version of POV-Ray.

Look for the part where it traces the radiosity preview:

// Note that radiosity REQUIRES a mosaic preview prior to main scan
   if ( opts.Radiosity_Enabled && !opts.Radiosity_Preview_Done)
      Start_Tracing_Radiosity_Preview(opts.PreviewGridSize_Start,
opts.PreviewGridSize_End);

   else if((opts.Options & PREVIEW) && (opts.Options & DISPLAY))
      Start_Tracing_Mosaic_Preview(opts.PreviewGridSize_Start,
opts.PreviewGridSize_End);


Then you can add code to conditionally trace the full scene ( I added the
+PTO command line option and the if statement )


 // GJP Parallel radiosity - If we specified we want Pretrace Only (+PTO)
then DONT do regular tracing after the pretrace.

   if ( !opts.Do_Pretrace_Only ) // added by GJP
   {
      switch(opts.Tracing_Method) // this was already in povray.
      {
       case 2:
        Start_Adaptive_Tracing();
        break;
       case 1:
       default:
        Start_Non_Adaptive_Tracing();
      }
   } // GJP

   // We're done.







"RDX" <rdx### [at] warlordsofbeercom> wrote in message
news:web.3ea43a137101d31e6af4484a0@news.povray.org...
> I am working on a perl script that enables me to break up large still
> renders into multiple small strips which are shot off to different servers
> (or the same server on multi CPU systems) for rendering and then
> reassembled after they are all finished.
>
> Naturally this works quite well without antialiasing or radiosity.
>
> So far I've managed to solve the problem of antialiasing artifacts by
> rendering the 'strips' with extra pixels on the sides, then cropping these
> strips before the final reassembly.  This works quite well and my test
> image (1280x1024, 16 strips, antialiasing  +A0.001 +R10) reassembles
> flawlessly.
>
> I decided to solve the problem of radiosity by using the load_file,
> save_file radiosity block options, and always_sample turned to off (a fair
> compromise).  I would then use the radiosity map generated by this stage
> when rendering the individual strips.
>
> My question is, how do I get POVRay to exit once it has generated the
> radiosity map?  Currently it generates the radiosity information and then
> goes on to render the image in it's entirety!  Obviously this defeats the
> purpose of what I'm trying to achieve.
>
> Any ideas?
>
> Regards,
>
> -peter
>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Radiosity pregeneration question
Date: 21 Apr 2003 15:34:24
Message: <3ea447c0$1@news.povray.org>
In article <3ea440a9$1@news.povray.org> , "George Pantazopoulos" 
<the### [at] attbicom*KILLSPAM*> wrote:

> You have to edit the FrameRender() function in povray.cpp. Heres what I did
> for POV-Ray XR, my experimental version of POV-Ray.

No, you don't.  You just wait until POV-Ray output the last radiosity render
progress message on stdout and then terminate it by sending the abort key to
stdin.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: George Pantazopoulos
Subject: Re: Radiosity pregeneration question
Date: 21 Apr 2003 16:01:07
Message: <3ea44e03@news.povray.org>
Thanks Thorsten, thats certainly a more appealing solution!

George


> > You have to edit the FrameRender() function in povray.cpp. Heres what I
did
> > for POV-Ray XR, my experimental version of POV-Ray.
>
> No, you don't.  You just wait until POV-Ray output the last radiosity
render
> progress message on stdout and then terminate it by sending the abort key
to
> stdin.
>
>     Thorsten
>
> ____________________________________________________
> Thorsten Froehlich, Duisburg, Germany
> e-mail: tho### [at] trfde
>
> Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Peter Popov
Subject: Re: Radiosity pregeneration question
Date: 22 Apr 2003 05:23:30
Message: <6e2aavk07aa0c7ekmlt96c1ahepl0nj2j8@4ax.com>
On Mon, 21 Apr 2003 14:36:03 EDT, "RDX" <rdx### [at] warlordsofbeercom>
wrote:

>My question is, how do I get POVRay to exit once it has generated the
>radiosity map?  Currently it generates the radiosity information and then
>goes on to render the image in it's entirety!  Obviously this defeats the
>purpose of what I'm trying to achieve.

Forget what the programmers say, they always think complicated :) Just
run this render with +w1 +h1 -f -d :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: RDX
Subject: Re: Radiosity pregeneration question
Date: 22 Apr 2003 11:45:13
Message: <web.3ea562cbadb9a16f6af4484a0@news.povray.org>
Thanks for the responses all!

Last night I tried sending the abort key once the pre-render had completed,
but depending on the timing of the abort, the file size of the radiosity
map would vary.  It appears as though it keeps adding to the radiosity file
throughout the render, even though I have always_sample set to 'off'.  I'm
not sure I am comfortable with the idea of varying sized radiosity files, I
feel as though it is half complete, even though the pre-render had
completed.

I also tried hacking the povray code as suggested by George.  As a
benchmark, before changing anything I compiled the source base and ran a
comparison of the render times from my binary (both static and dynamically
linked) and the distribution binary.  It seemed that my binaries were 30%
slower than the distribution binaries!  I suspect that this is because I am
using the standard (non optimised) libc libraries, but I am still impressed
at how much better optimised the povray distribution is.  Kudos to the
povray developers!  As I'm only interested in the radiosity pre-render, I'm
not too concerned about the 30% overhead, so I ripped out the calls to the
main tracing, and named the binary povray_prerender.  It seems to work
great for my purposes, but I still need to do some more testing to be
completely sure.

I haven't yet tried Peter Popov's suggestion, I'll give that a try tonight.

Thanks for the help!

-peter


Post a reply to this message

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