POV-Ray : Newsgroups : povray.pov4.discussion.general : daylight Server Time
21 Nov 2024 07:02:37 EST (-0500)
  daylight (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Nathalie
Subject: daylight
Date: 3 Feb 2013 04:25:02
Message: <web.510e2ca99d57c19a9ecf6b7c0@news.povray.org>
Hi,

Is it possible to calculate daylight according to different methods in POV-ray?
I would like to try ray-tracing, radiosity and photon mapping. Can anyone help
me with this?

Nathalie


Post a reply to this message

From: clipka
Subject: Re: daylight
Date: 3 Feb 2013 05:08:32
Message: <510e3720$1@news.povray.org>
Am 03.02.2013 10:23, schrieb Nathalie:

> Is it possible to calculate daylight according to different methods in POV-ray?
> I would like to try ray-tracing, radiosity and photon mapping. Can anyone help
> me with this?

For proper looking daylight you'll need global illumination, to simulate 
the indirect light from the blue sky. Classic raytracing alone won't 
give you that, and POV-Ray's Photons implementation doesn't do GI 
either. That leaves you with radiosity only.

You might try MCPov as an alternative, which uses stochastic ray tracing 
instead of radiosity to compute GI. (Beware of a bug in MCPov though: 
You'll need to set the "diffuse" parameter to twice the value you'd use 
in POV-Ray.)


Post a reply to this message

From: MichaelJF
Subject: Re: daylight
Date: 3 Feb 2013 13:10:01
Message: <web.510ea7828f43b6279b9378020@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 03.02.2013 10:23, schrieb Nathalie:
>
> > Is it possible to calculate daylight according to different methods in POV-ray?
> > I would like to try ray-tracing, radiosity and photon mapping. Can anyone help
> > me with this?
>
> For proper looking daylight you'll need global illumination, to simulate
> the indirect light from the blue sky. Classic raytracing alone won't
> give you that, and POV-Ray's Photons implementation doesn't do GI
> either. That leaves you with radiosity only.
>
> You might try MCPov as an alternative, which uses stochastic ray tracing
> instead of radiosity to compute GI. (Beware of a bug in MCPov though:
> You'll need to set the "diffuse" parameter to twice the value you'd use
> in POV-Ray.)

I am not quiet sure if Christophs answer really meets your request. As ever he
is completelly right - he corrected me a lot of times, and I'm really thankful
for that. E.g. photons are mainly used to calculate caustics from glasses or
gems. But I have the impression that he had misinterpreted your request here.
Can you name the different methods to calculate daylight? Can you give us an
idea of the scene you have in your mind? That would be most helpful to answer
your request IMO.

Bes regards,
Michael


Post a reply to this message

From: clipka
Subject: Re: daylight
Date: 3 Feb 2013 14:45:05
Message: <510ebe41$1@news.povray.org>
Am 03.02.2013 19:08, schrieb MichaelJF:

> I am not quiet sure if Christophs answer really meets your request. As ever he
> is completelly right - he corrected me a lot of times, and I'm really thankful
> for that. E.g. photons are mainly used to calculate caustics from glasses or

For some strange reason I first read "... and I'm really hateful for 
that" :-P


Post a reply to this message

From: Nathalie
Subject: Re: daylight
Date: 4 Feb 2013 08:00:01
Message: <web.510fafcd8f43b6279ecf6b7c0@news.povray.org>
I would like to try raytracing, radiosity and photon mapping to calculate and
render the daylight inside a church.
Nathalie


Post a reply to this message

From: MichaelJF
Subject: Re: daylight
Date: 4 Feb 2013 16:15:01
Message: <web.511023cc8f43b627f979af530@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 03.02.2013 19:08, schrieb MichaelJF:
>
> > I am not quiet sure if Christophs answer really meets your request. As ever he
> > is completelly right - he corrected me a lot of times, and I'm really thankful
> > for that. E.g. photons are mainly used to calculate caustics from glasses or
>
> For some strange reason I first read "... and I'm really hateful for
> that" :-P

So, a Freudian slip... I will notice that ;-)

Michael


Post a reply to this message

From: MichaelJF
Subject: Re: daylight
Date: 4 Feb 2013 16:55:00
Message: <web.51102d678f43b627f979af530@news.povray.org>
"Nathalie" <nomail@nomail> wrote:
> I would like to try raytracing, radiosity and photon mapping to calculate and
> render the daylight inside a church.
> Nathalie

This can prove a real challenge. Radiosity is needed of course in such a scene,
about photons I'm not quiet sure, may be they can add a little bit to the
ambience, but better leave them out for the first WIPs since they are very time
consuming. But most likely you will have light beams visiby falling from the
windows to the earth (or the altar). Then you must use a suitable scattering
media. The radiosity tutorial with the POV-docs is fine, about scattering media
you must do your own experiments (The POV doc is very sparse about it and it can
be hard to find the right parameters, I learned). But feel free to publish your
efforts at the p.b.i (the newsgroup with the name povray-binary-images) and I'm
sure that you will get the one or other comment to help improve your image. But
one of all: you will need patience and a lot of time to accomplish such an
image.

Best regards,
Michael


Post a reply to this message

From: Nathalie
Subject: Re: daylight
Date: 18 Feb 2013 11:30:02
Message: <web.512256558f43b627966e3d4c0@news.povray.org>
Hi,

I would like to reformulate my question a bit. It is not my intention to make a
perfect rendering of a church interior. It is rather my intention to render a
part of a church interior (let's say a niche with a statue) according to three
daylight calculation methods (ray-tracing, radiosity and photon mapping), with
the aim of comparing these three methods. I tought POV-ray was the best choice
to do this, because it makes control over the algorithms possible. Effects to
improve the rendering (like glow,...) are only interesting insofar as they are
applicable to the three calculation methods. Is this possible with POV-Ray?
Because from the previous answers I deducted that only radiosity was possible...
Please correct me if I'm wrong.

best regards,

Nathalie


Post a reply to this message

From: MichaelJF
Subject: Re: daylight
Date: 18 Feb 2013 15:25:00
Message: <web.51228d488f43b627802d06440@news.povray.org>
"Nathalie" <nomail@nomail> wrote:
> Hi,
>
> I would like to reformulate my question a bit. It is not my intention to make a
> perfect rendering of a church interior. It is rather my intention to render a
> part of a church interior (let's say a niche with a statue) according to three
> daylight calculation methods (ray-tracing, radiosity and photon mapping), with
> the aim of comparing these three methods. I tought POV-ray was the best choice
> to do this, because it makes control over the algorithms possible. Effects to
> improve the rendering (like glow,...) are only interesting insofar as they are
> applicable to the three calculation methods. Is this possible with POV-Ray?
> Because from the previous answers I deducted that only radiosity was possible...
> Please correct me if I'm wrong.
>
> best regards,
>
> Nathalie

From the first postings here I had the impression that there is a little bit
misunderstanding between the entrants here. I hope I can clarify the one or
other issue.


Nathalie, you have three items in your list: ray tracing, radiosity and photons.

Ray tracing: The idea is to trace a ray, but backwards. Imagine a usual camera.
It samples the rays that hit the lense and make a photograph of it. Ray tracing
is the other way round. You are looking from the film (or a sensor nowadays)
throught the lens into the world trying to find a way to a light. (That is why
"ray tracing" is sometimes more precisely called "backward ray tracing"). This
works fine, if you hit a light. And this is that what POV always does. So if you
are using POV you can rule out the first item of your list. POV is created to do
ray tracing.

Radiosity: Often the ray from the camera cannot find a light at a direct course.
That is simply because you are in a shadow. The work around here is to snoop
around in some other directions to find a light from this point at an indirect
path. That is not trivial since you have to specify a lot of parameters how this
should be done, but fortunatelly there is the include-file "rad_defs.inc" with
provides a lot of parametrisations under names, one can understand.
"Radiosity_OudoorLQ" e.g., with gives a low quality (LQ) setting for outdoor
scenes. There is a HQ (high quality) setting as well, but first try the LQ since
the HQ renders much longer than the LQ. (LQ may cost some hours, HQ some days -
or weeks).

Photons: If you are looking backwards from the camera to the lights you cannot
see direct effects of the lights like reflections on a wall or reflected and
refracted light by a water glass. Photons are a precalculating step to work
aorund this. You need a lot of experience or a lot of experiments to achieve a
fine result (no include file can be created for this issue).

Ray tracing is the nature of POV, for radiosity I will propose you to work
through the tutorial which came with POV (within the help-files). A fine
reference picture for photons is an entry to the POVComp contest by Tilo Helmig

http://www.povcomp.com/entries/173.php

Source codes are included there.

Best regards,
Michael


Post a reply to this message

From: clipka
Subject: Re: daylight
Date: 18 Feb 2013 16:45:44
Message: <5122a108@news.povray.org>
Am 18.02.2013 17:27, schrieb Nathalie:

> I would like to reformulate my question a bit. It is not my intention to make a
> perfect rendering of a church interior. It is rather my intention to render a
> part of a church interior (let's say a niche with a statue) according to three
> daylight calculation methods (ray-tracing, radiosity and photon mapping), with
> the aim of comparing these three methods.

There is room for misunderstanding here, as the three terms - 
ray-tracing, radiosity and photon mapping - may each mean different 
things depending on context.


"Ray-tracing" for instance, may either mean...

(A) forward raytracing, which traces more or less random rays from the 
light sources, bouncing them around the scene according to the laws of 
optics, until they happen hit the camera sensor (or become attenuated so 
much that it's not worth tracing them further). This is pretty tedious 
work and seldom done, because most light rays miss the camera, but it 
can simulate virtually all there is in the realm of optics.

(B) pure backward raytracing, which traces rays in the opposite 
direction, from a camera back, bouncing them around the scene according 
to the laws of optics as well, until they happen to hit a light emitter 
(or, again, become attenuated so much that it's not worth tracing them 
further). This, too, is pretty tedious work, because a good deal of 
light rays miss the emitters, but it can also simulate virtually all 
there is in the realm of optics. This is exactly what MCPov does.

(C) backward raytracing with a short-cut for diffuse surfaces (classic 
raytracing): Whenever a diffuse surface is encountered, the direct line 
between the surface point and any light source is tested for shadowing 
objects, and if there aren't any the resulting contribution of that ligt 
to the surface brightness is calculated. This is pretty fast compared to 
the other approaches, but can't handle light paths that involve any 
refraction or reflection bewtween the light source and the diffuse 
surface ("caustics"), nor can it handle light paths involving two or 
more diffuse surfaces ("diffuse interreflection"). This is exactly what 
POV-Ray does.


"Photon mapping" is actually always an extension of classic raytracing 
to fix its shortcomings. In its fullest implementation, photon mapping 
can handle both caustics and diffuse interreflection (plus subsurface 
scattering).

BUT: POV-Ray uses photon mapping /exclusively/ for caustics. Plans to 
also support diffuse interreflection seem to have existed, and POV-Ray 
does contain some (dead) code for it, but it seems that it was never 
really implemented.


Last not least, "radiosity" may either be used to denote:

(A) one particular algorithm developed in 1984 at Cornell University to 
compute diffuse interreflection; this algorithm /only/ accounts for 
light paths that involve nothing but diffuse surfaces, i.e. it can't 
account for reflection, refraction, or even specular highlights (which 
in fact are a special case of reflection).

(B) in general any algorithm to compute diffuse interreflection; one 
such algorithm was described by Gregory J. Ward et al. in "A Ray Tracing 
Solution for Diffuse Interreflection", and this is essentially what 
POV-Ray is using. In POV-Ray, radiosity can be used independently (by 
simply not including any classic point light sources, using a bright sky 
sphere as the only source of illumination), but is typically combined 
with classic raytracing.

(C) even more generally any rendering algorithm that, among other 
effects, accounts for diffuse interreflection.


So, whether you can achieve what you want to do with POV-Ray depends a 
lot on what you actually mean by "raytracing", "photon-mapping" and 
"radiosity".


> I tought POV-ray was the best choice
> to do this, because it makes control over the algorithms possible. Effects to
> improve the rendering (like glow,...) are only interesting insofar as they are
> applicable to the three calculation methods. Is this possible with POV-Ray?

In the worst case, you might be able to patch POV-Ray to implement the 
desired algorithm; but you'd need C++ programming skills, and it may be 
difficult to implement some of the algorithms (radiosity, for instance, 
is easier to implement in a rendering framework that uses only meshes).


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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