POV-Ray : Newsgroups : povray.beta-test : Radiosity Status: Giving Up... Server Time
29 Jul 2024 22:26:38 EDT (-0400)
  Radiosity Status: Giving Up... (Message 35 to 44 of 194)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Severi Salminen
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:19:53
Message: <49595b19$1@news.povray.org>
Severi Salminen wrote:

> There you have it: a random vector inside a hemishere.

With cosine weighting...


Post a reply to this message

From: clipka
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:20:00
Message: <web.495959f6cd9d1e75ab169ede0@news.povray.org>
Severi Salminen <sev### [at] NOTTHISsaunalahtifiinvalid> wrote:
> In my Monte-Carlo path tracing renderer the above method was faster than
> those using polar coordinates (random phi and theta describing the
> angles).

How did you pick phi and theta? Did you pick uniform random numbers and map them
using straightforward functions (needs trigonometry I guess), or did you
monte-carlo them as well?

> It was very clearly faster.

I'd actually expect so, but you never know until you test it :)

> I have Core2Duo so things might be
> different on other platforms / with other compilers. I use GCC.

Don't think so. Not significantly at least.


Post a reply to this message

From: clipka
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:25:00
Message: <web.49595b64cd9d1e75ab169ede0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>
>   The whole idea of the given algorithm (ie. get a random point evenly
> distributed on a disc and then parallel-project it to a hemisphere
> correspondent to that disc) is that you don't need any trigonometry
> anymore, and the points will be automatically distributed on the
> hemisphere according to the cosine function. (Square root of multiplications
> is equivalent to sin/cos.)

Yeah, I know that. That's all the point I'm trying to make. Well, except that I
wasn't aware that it even gets you rid of any trigonometrics at all.


Post a reply to this message

From: Warp
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:25:49
Message: <49595c7d@news.povray.org>
Severi Salminen <sev### [at] notthissaunalahtifiinvalid> wrote:
> And this is the code I use:


>     double x,y,z;

>     do{
>         x = 2.0 * rNG.randomNumberClosed() - 1.0;
>         z = 2.0 * rNG.randomNumberClosed() - 1.0;
>     }
>     while(x*x + z*z > 1.0);

>     y = sqrt(1.0 - (x*x + z*z));


> There you have it: a random vector inside a hemishere.

  You still have to rotate it so that the hemisphere is tangential to
the surface. Probably requires multiplication with a matrix.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:27:41
Message: <49595ced@news.povray.org>
clipka <nomail@nomail> wrote:
> The idea is simple: Make all light sources actually visible. Make all your
> surfaces somewhat reflective, and rough them up using a "bump" normal, scaled
> to dimensions much smaller than two adjacent pixels on screen. Render the
> thing, making sure Antialiasing or focal blur take many samples per pixel.
> Voila: Blurred highlights done just the same way as mother nature does.

> Works great with HDR light probes for sky or backdrop.

> Takes a lot of samples though to get flat and comparatively rough surfaces to
> look good, so be prepared for overnight renders.

  Not very feasible with very complex scenes which may have other
slow-to-render elements, unless you have a couple of years to wait for
the render to finish.

-- 
                                                          - Warp


Post a reply to this message

From: Severi Salminen
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:28:12
Message: <49595d0c$1@news.povray.org>
>   You still have to rotate it so that the hemisphere is tangential to
> the surface. Probably requires multiplication with a matrix.
> 

Yes, it has to be transformed properly. Transformation matrix is a
common way to do it.


Post a reply to this message

From: clipka
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:45:00
Message: <web.49595ff0cd9d1e75ab169ede0@news.povray.org>
Severi Salminen <sev### [at] NOTTHISsaunalahtifiinvalid> wrote:
>
>     double x,y,z;
>
>     do{
>         x = 2.0 * rNG.randomNumberClosed() - 1.0;
>         z = 2.0 * rNG.randomNumberClosed() - 1.0;
>     }
>     while(x*x + z*z > 1.0);
>
>     y = sqrt(1.0 - (x*x + z*z));

This can be optimized to:

    double x,y,z,rSquare;

    do{
        x = 2.0 * rNG.randomNumberClosed() - 1.0;
        z = 2.0 * rNG.randomNumberClosed() - 1.0;
        rSquare = x*x + z*z;
    }
    while(rSquare > 1.0);

    y = sqrt(1.0 - rSquare);

Or maybe this is even a bit faster (and actually a tiny bit more defensively
coded):

    double x,y,z,ySquare;

    do{
        x = 2.0 * rNG.randomNumberClosed() - 1.0;
        z = 2.0 * rNG.randomNumberClosed() - 1.0;
        ySquare = 1.0 - (x*x + z*z);
    }
    while(ySquare < 0.0);

    y = sqrt(ySquare);

(I guess comparing two floats is roughly as expensive as computing their
difference; at least this is the case for integers; and comparing a float with
zero is a piece of cake.)

I also fancy that it would be favorable from a performance point of view to pull
*signed* floats in the range of [-1..1] directly out of the random stream,
because it would just be a matter of filling in one more random bit (namely the
sign bit). It would double the chance of getting a zero, but we can probably
invest some of the time saved by the elimination of a multiplication and
subtraction to filter out negative-zero values (which would occur once in 2^24
rolls for single-precision floats).

But that's probably a RNG design thing.


Post a reply to this message

From: clipka
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:45:01
Message: <web.4959607dcd9d1e75ab169ede0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   You still have to rotate it so that the hemisphere is tangential to
> the surface. Probably requires multiplication with a matrix.

POV uses two cross-product operations for that.


Post a reply to this message

From: clipka
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 18:50:00
Message: <web.495961b4cd9d1e75ab169ede0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> > Takes a lot of samples though to get flat and comparatively rough surfaces to
> > look good, so be prepared for overnight renders.
>
>   Not very feasible with very complex scenes which may have other
> slow-to-render elements, unless you have a couple of years to wait for
> the render to finish.

It gets less dramatic if your other slow-to-render elements can be boiled down
to jitter as well; e.g. for media effects, you can crank down the quality and
rely on a lot of jitter, too.

You'll admittedly run into problems when your slow-to-render elements are
geometric shapes, like isosurfaces for instance.


Post a reply to this message

From: Alain
Subject: Re: Radiosity Status: Giving Up...
Date: 29 Dec 2008 21:11:29
Message: <49598351$1@news.povray.org>
clipka nous illumina en ce 2008-12-29 01:06 -->
> .... no, don't panic - I'll keep working on the radiosity as such.
> 
> But I definitely give up trying to get 3.7 radiosity exactly reproduce 3.6
> functionality.
> 
> I have dug through the code multiple times, discovered several discrepancies
> between 3.7.beta.29 and 3.6 causing differences in output, identified several
> others that didn't seem to make a change, stumbled across some old flaws I
> intend to fix, and for sentimentality's sake even re-introduced one flaw that
> wasn't there in 3.7 due to slight differences in the software architecture
> (don't worry, I'll take it back out again :)), all to try and re-create the
> same output as 3.6.
> 
> I have come to the point now that plowing through the whole code over and over
> again has ceased to surface any further discrepancies. And I definitely do
> *not* intend to go through *all* the POV code and revert it back to exact 3.6
> functionality (and after all, maybe some modifications may actually be in there
> for good already :)).
> 
> So I conclude that any residual differences must be rooted in changes to some
> other parts of POV-ray code: Media, photons, area lights, multi-layered
> textures - whatever.
> 
> The remaining discrepancies with the scenes I used for testing are:
> 
> - minor difference in brightness on one of the cube's corners in "cornell.pov"
> 
> - differences in brightness on the object-mapped portion of the pill containers
> in "object_pattern.pov"; tests strongly indicate that these are caused by the
> object-mapped texture, not the radiosity per se
> 
> - differences in brightness of various shadowed parts in "balcony.pov"; tests
> were not conclusive about the true origin of the differences.
> 
> - differences in a self-made scene designed to provoke black-splotch artifacts,
> probably related to differences in trace-level counting (note that the
> black-splotch artifacts will be eliminated anyway)
> 
> - differences in another self-made scene (the "Claustrophobia" shot), probably
> related to black-splotch artifacts and therefore of similar origin
> 
> - totally different results with a self-made, very demanding radiosity scene
> which hasn't actually worked as intended with any POV version at all - again,
> possibly due to differences in trace-level counting.
> 
> 
> From what I see, none of these differences do any general harm to the picture
> (except for the pill-container issus); the pictures simply look different, and
> I find it hard to judge which version is more realistic. I'd usually prefer the
> new output.
> 
> 
> Aside from visual differences, the most notable ones are differences in speed.
> Compared with the MegaPOV 64-bit Linux binaries, some scenes take a bit longer
> with the current code, some render a bit faster. It seems that overall,
> radiosity-only scenes benefit, while non-radiosity scenes all render slightly
> slower, and mixed scenes are somewhat indecisive. This is all pure CPU time
> though, and real-time speed benefits a lot on multicore systems.
> 
> 
> If it was my call, I'd say let's just fix the black-splotch thing, get a few
> details more towards the original Ward paper, make a new beta of it, and see
> what reports come in.
> 
> 
> Main remaining issues:
> 
> - Loading/saving of radiosity samples simply doesn't work yet
> 
> - Radiosity shots are currently not 100% reproduci... duca... um... I mean, you
> can't reproduce the 100% same result on every run.
> 
> 
> 
 From version 3.6 for any radiosity scene: (also for photons)
"Cleanup Parse Warning: This rendering uses the following experimental 
feature(s): radiosity. The desing and implementation of these features is likely 
to change in future version of POV-Ray. Full backward compatibility with the 
current implementation is NOT guarenteed."

This tells me that, in future versions, the way to handle radiosity may change.

This also tels me that the result may change from version to version, even if 
the parameters do stay the same.

So, after seeing that warning, if any scene using radiosity, or photons, don't 
give the same final image between 3.6 end 3.7, i'd say that it's NORMAL and 
EXPECTED.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you have ever said "I don't need 
no steenking modellers!!!"
Stephan Ahonen


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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