 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I'm trying to code the cornell box but using Photons Mapping instead of
radiosity. So far, no success. I've got all my photons{} blocs in my
global, light and objects. The scene is very simple but all I get is
essentially the same render as with ray-trace only.
Can anybody suggest something I might have missed?
Thanks.
Here is the scene file:
global_settings {
assumed_gamma 1.0
max_trace_level 5
photons {
count 100000
max_trace_level 9
}
}
#declare Finish=finish{diffuse 0.75 ambient 0}
#declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
#declare Red=texture{pigment{rgb<0.57,0.025,0.025>} finish{Finish}}
#declare Green=texture{pigment{rgb<0.025,0.236,0.025>} finish{Finish}}
#declare LightColor=<1,0.67,0.21>;
light_source{
<27.8,54.88,27.95>
color LightColor
spotlight radius -90 falloff 90 tightness 1 point_at <27.8,0,27.95> // for
cosine falloff
photons {
refraction on
reflection yes
}
}
camera{
location <27.8, 27.3,-80.0>
direction <0, 0, 1>
up <0, 1, 0>
right <-1, 0, 0>
angle 39.5
}
// ------------------------ OBJECTS ----------------------------
// Light Patch
box{
<21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
pigment{rgb<1,1,1>} finish{ambient 0.78 diffuse 1}
photons {
target
refraction off
reflection yes
collect off
}
}
union{
// Floor
triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>}
triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>}
// Ceiling
triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88, 55.92>}
triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88, 0.0>}
// Back wall
triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0, 55.92>}
triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0, 55.92>}
texture {White}
split_union off
photons {
target 1.0
refraction off
reflection yes
collect off
}
}
union {
// Right wall
triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
texture {Green}
split_union off
photons {
target 1.0
refraction off
reflection yes
collect off
}
}
union {
// Left wall
triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88, 55.92>}
triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88, 0.0>}
texture {Red}
split_union off
photons {
target 1.0
refraction off
reflection yes
collect off
}
}
box {
// Short bloc
<-8.35,0,-8.35>,<8.35,16.5,8.35>
rotate <0,-17,0>
translate <18.6,0,16.85>
texture { White }
photons {
target 1.0
refraction off
reflection yes
collect off
}
}
box {
// Tall bloc
<-8.35,0,-8.35>,<8.35,33,8.35>
rotate <0,17,0>
translate <36.85,0,35.15>
texture { White }
photons {
target 1.0
refraction off
reflection yes
collect off
}
}
WhiteZebra
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
WhiteZebra <ypo### [at] cogniscienceinc com> wrote:
> union {
> // Right wall
> triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
> triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
> texture {Green}
> split_union off
> photons {
> target 1.0
> refraction off
> reflection yes
> collect off
> }
> }
How do you expect photons to reflect from these surfaces when they have
no reflection?
Photons only work for reflecting and refracting objects.
(Another mistake: Since you have "collect off", which means that no
photons are stored on the surface of this object, how do you expect it
to receive light reflected from other surfaces?)
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > union {
> > // Right wall
> > triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
> > triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
> > texture {Green}
> > split_union off
> > photons {
> > target 1.0
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
>
> How do you expect photons to reflect from these surfaces when they have
> no reflection?
> Photons only work for reflecting and refracting objects.
Isn't "reflection yes" inside "photons" bloc sufficient? In any case, I just
did
another test by changeing "yes" for "on" just to make sure but still no
photons.
If you are talking about adding a reflection attribute un the finish block,
I
tried that but this is not what I'm looking for. This gives me reflecting
surfaces which reflect the image of the surrounding objects. Normally,
photons
should reflect on pure lambertian surfaces. Just like the "cornell.pov"
scene
that comes with POV-Ray. In other words, Photons mapping should give almost
the
same results as radiosity given the same scene.
> (Another mistake: Since you have "collect off", which means that no
> photons are stored on the surface of this object, how do you expect it
> to receive light reflected from other surfaces?)
I've tried to set "collect on" everywhere (I just did) but still no photons.
Here is what I tried: I tried every combinations of reflection, refraction
and
collect on/off on both objects and lights, I tried high number of
max_trace_level just in case. No avail.
I eventually left "refraction off" because I don't have transparent objects
and
thus no caustics.
Could it be that photons will not reflect from triangles. That's my next
hypothese. What makes me think the triangles are in fault is that I get
black
speckles around shadows on triangle primitives but not on bloc primitives.
WhiteZebra
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <web.3e547aa166b09a13fbe3eac40@news.povray.org>,
"WhiteZebra" <ypo### [at] cogniscienceinc com> wrote:
> I'm trying to code the cornell box but using Photons Mapping instead of
> radiosity. So far, no success. I've got all my photons{} blocs in my
> global, light and objects. The scene is very simple but all I get is
> essentially the same render as with ray-trace only.
This last sentence shows a misunderstanding of how POV works. POV is a
raytracer, there is no "ray-trace only" mode, it is always raytracing.
The radiosity algorithm is not a patch subdivision method, it uses
raytracing to collect samples.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
in news:web.3e547aa166b09a13fbe3eac40@news.povray.org WhiteZebra wrote:
> I'm trying to code the cornell box but using Photons Mapping instead of
> radiosity.
POV-Ray does not (yet?) support photons for global illumination. It only
supports reflected and refracted caustics. So to see these caustics you
have to shoot your photons at something that reflects or refracts (as part
of the finish of an object).
Ingo
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > I'm trying to code the cornell box but using Photons Mapping instead of
> > radiosity. So far, no success. I've got all my photons{} blocs in my
> > global, light and objects. The scene is very simple but all I get is
> > essentially the same render as with ray-trace only.
>
> This last sentence shows a misunderstanding of how POV works. POV is a
> raytracer, there is no "ray-trace only" mode, it is always raytracing.
> The radiosity algorithm is not a patch subdivision method, it uses
> raytracing to collect samples.
What I meant is that I get the same render result as when I remove every
"photons {}" blocks from my global, light and objects descriptions thus
leaving only the regular ray-trace render in action.
While I don't know the implementation details of radiosity in POV-Ray,
radiosity and photon mapping is not quite the same technique. I'm interested
in using the photons mapping technique here. I understand that photons
mapping proceeds in two passes. First pass, shoots and collect photons
either on surfaces on in a kd-tree or on both at the same time using the
raytrace engine. Second pass, renders as usual using raytrace but add the
radiance values computed from stored photons using a sort of area-averaging
procedure.
If I remove the photons {} blocs from a scene, the first pass of photon
shooting will not happen and thus the render pass will not have any radiance
data to add thus render like a normal raytracer.
I hope this removes any confusions as to what I meant.
WhiteZebra
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > I'm trying to code the cornell box but using Photons Mapping instead of
> > radiosity.
>
> POV-Ray does not (yet?) support photons for global illumination. It only
> supports reflected and refracted caustics. So to see these caustics you
> have to shoot your photons at something that reflects or refracts (as part
> of the finish of an object).
Ah!. I see. That explains my results. Thanks.
White Zebra
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
As I've read the other comments on this, here goes:
Photon-light-mapping is used to reflect or refract light
off of either reflecting or refracting (transparent objects
with any ior-value, even the default), so for refraction to
work properly with photons, the object needs to be
transparent or filtering to let some light travel through
the object. In order to reflect photons, the object needs
to have reflection in the finish{} Block.
In order to achieve what you want, it might be possible
to supply two objects, one with no_image and reflection,
the other without reflection and without no_image.
The no_image-object will be the target for photons, but
won't show up on the image itself, thus you're non-reflecting
objects SEEM to reflect photons.
But this might not work. Then you'd have to do two passes:
Render the scene with photons and all objects that reflect
photons have reflection, save the photons. The second
pass will be to load the photons, but keep the object without
reflection.
One of these, at least the last, should work.
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
> I'm trying to code the cornell box but using Photons Mapping instead of
> radiosity. So far, no success. I've got all my photons{} blocs in my
> global, light and objects. The scene is very simple but all I get is
> essentially the same render as with ray-trace only.
>
> Can anybody suggest something I might have missed?
>
> Thanks.
>
> Here is the scene file:
>
> global_settings {
> assumed_gamma 1.0
> max_trace_level 5
> photons {
> count 100000
> max_trace_level 9
> }
> }
>
> #declare Finish=finish{diffuse 0.75 ambient 0}
>
> #declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
> #declare Red=texture{pigment{rgb<0.57,0.025,0.025>} finish{Finish}}
> #declare Green=texture{pigment{rgb<0.025,0.236,0.025>} finish{Finish}}
>
> #declare LightColor=<1,0.67,0.21>;
>
>
> light_source{
> <27.8,54.88,27.95>
> color LightColor
> spotlight radius -90 falloff 90 tightness 1 point_at <27.8,0,27.95> // for
> cosine falloff
> photons {
> refraction on
> reflection yes
> }
> }
>
>
> camera{
> location <27.8, 27.3,-80.0>
> direction <0, 0, 1>
> up <0, 1, 0>
> right <-1, 0, 0>
> angle 39.5
> }
>
>
> // ------------------------ OBJECTS ----------------------------
>
> // Light Patch
> box{
> <21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
> pigment{rgb<1,1,1>} finish{ambient 0.78 diffuse 1}
> photons {
> target
> refraction off
> reflection yes
> collect off
> }
> }
>
> union{
> // Floor
> triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>}
> triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>}
> // Ceiling
> triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88, 55.92>}
> triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88, 0.0>}
> // Back wall
> triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0, 55.92>}
> triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0, 55.92>}
> texture {White}
> split_union off
> photons {
> target 1.0
> refraction off
> reflection yes
> collect off
> }
> }
>
> union {
> // Right wall
> triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
> triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
> texture {Green}
> split_union off
> photons {
> target 1.0
> refraction off
> reflection yes
> collect off
> }
> }
>
> union {
> // Left wall
> triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88, 55.92>}
> triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88, 0.0>}
> texture {Red}
> split_union off
> photons {
> target 1.0
> refraction off
> reflection yes
> collect off
> }
> }
>
> box {
> // Short bloc
> <-8.35,0,-8.35>,<8.35,16.5,8.35>
> rotate <0,-17,0>
> translate <18.6,0,16.85>
> texture { White }
> photons {
> target 1.0
> refraction off
> reflection yes
> collect off
> }
> }
>
>
> box {
> // Tall bloc
> <-8.35,0,-8.35>,<8.35,33,8.35>
> rotate <0,17,0>
> translate <36.85,0,35.15>
> texture { White }
> photons {
> target 1.0
> refraction off
> reflection yes
> collect off
> }
> }
>
> WhiteZebra
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tim,
Global photon mapping isn't implemented in POV-Ray. I've checked in the
source and there are some blocks of codes related to "GLOBAL_PHOTONS" which
are not compiled. I guess that is because it is not flly functional or fully
debugged.
Yoursuggestion wouldn't work because it would produce specular reflections.
I actually tried something similar to what you suggest. What I need is
diffuse reflection.
Thanks for the suggestion. But I guess I'll wait for the global photons to
be fully implemented and debugged.
Black Zebra
"Tim Nikias" <tim### [at] gmx de> wrote in message
news:3e5553c6@news.povray.org...
> As I've read the other comments on this, here goes:
>
> Photon-light-mapping is used to reflect or refract light
> off of either reflecting or refracting (transparent objects
> with any ior-value, even the default), so for refraction to
> work properly with photons, the object needs to be
> transparent or filtering to let some light travel through
> the object. In order to reflect photons, the object needs
> to have reflection in the finish{} Block.
>
> In order to achieve what you want, it might be possible
> to supply two objects, one with no_image and reflection,
> the other without reflection and without no_image.
> The no_image-object will be the target for photons, but
> won't show up on the image itself, thus you're non-reflecting
> objects SEEM to reflect photons.
>
> But this might not work. Then you'd have to do two passes:
> Render the scene with photons and all objects that reflect
> photons have reflection, save the photons. The second
> pass will be to load the photons, but keep the object without
> reflection.
>
> One of these, at least the last, should work.
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmx de
>
> > I'm trying to code the cornell box but using Photons Mapping instead of
> > radiosity. So far, no success. I've got all my photons{} blocs in my
> > global, light and objects. The scene is very simple but all I get is
> > essentially the same render as with ray-trace only.
> >
> > Can anybody suggest something I might have missed?
> >
> > Thanks.
> >
> > Here is the scene file:
> >
> > global_settings {
> > assumed_gamma 1.0
> > max_trace_level 5
> > photons {
> > count 100000
> > max_trace_level 9
> > }
> > }
> >
> > #declare Finish=finish{diffuse 0.75 ambient 0}
> >
> > #declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
> > #declare Red=texture{pigment{rgb<0.57,0.025,0.025>} finish{Finish}}
> > #declare Green=texture{pigment{rgb<0.025,0.236,0.025>} finish{Finish}}
> >
> > #declare LightColor=<1,0.67,0.21>;
> >
> >
> > light_source{
> > <27.8,54.88,27.95>
> > color LightColor
> > spotlight radius -90 falloff 90 tightness 1 point_at <27.8,0,27.95> //
for
> > cosine falloff
> > photons {
> > refraction on
> > reflection yes
> > }
> > }
> >
> >
> > camera{
> > location <27.8, 27.3,-80.0>
> > direction <0, 0, 1>
> > up <0, 1, 0>
> > right <-1, 0, 0>
> > angle 39.5
> > }
> >
> >
> > // ------------------------ OBJECTS ----------------------------
> >
> > // Light Patch
> > box{
> > <21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
> > pigment{rgb<1,1,1>} finish{ambient 0.78 diffuse 1}
> > photons {
> > target
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
> >
> > union{
> > // Floor
> > triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>}
> > triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>}
> > // Ceiling
> > triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88,
55.92>}
> > triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88, 0.0>}
> > // Back wall
> > triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0,
55.92>}
> > triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0, 55.92>}
> > texture {White}
> > split_union off
> > photons {
> > target 1.0
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
> >
> > union {
> > // Right wall
> > triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
> > triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
> > texture {Green}
> > split_union off
> > photons {
> > target 1.0
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
> >
> > union {
> > // Left wall
> > triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88, 55.92>}
> > triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88, 0.0>}
> > texture {Red}
> > split_union off
> > photons {
> > target 1.0
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
> >
> > box {
> > // Short bloc
> > <-8.35,0,-8.35>,<8.35,16.5,8.35>
> > rotate <0,-17,0>
> > translate <18.6,0,16.85>
> > texture { White }
> > photons {
> > target 1.0
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
> >
> >
> > box {
> > // Tall bloc
> > <-8.35,0,-8.35>,<8.35,33,8.35>
> > rotate <0,17,0>
> > translate <36.85,0,35.15>
> > texture { White }
> > photons {
> > target 1.0
> > refraction off
> > reflection yes
> > collect off
> > }
> > }
> >
> > WhiteZebra
> >
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
What I suggested wouldn't give you specular
reflections. Photons will be reflected off of specular-
reflecting objects, which, when using no_image, won't
show up on the final image. Thus, you need to place
the same object, but in this case may change texture,
normal, finish... So you can also leave out the reflection.
You should look up on no_image, no_shadow,
no_reflection for that.
And in case this wouldn't work, you could still save the
photons using specular-reflection, and then load them
into the same scene, but with all specular reflections
turned off.
I'll post a short example when I've finished one.
Regards,
Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
> Tim,
>
> Global photon mapping isn't implemented in POV-Ray. I've checked in the
> source and there are some blocks of codes related to "GLOBAL_PHOTONS" which
> are not compiled. I guess that is because it is not flly functional or fully
> debugged.
>
> Yoursuggestion wouldn't work because it would produce specular reflections.
> I actually tried something similar to what you suggest. What I need is
> diffuse reflection.
>
> Thanks for the suggestion. But I guess I'll wait for the global photons to
> be fully implemented and debugged.
>
> Black Zebra
>
> "Tim Nikias" <tim### [at] gmx de> wrote in message
> news:3e5553c6@news.povray.org...
> > As I've read the other comments on this, here goes:
> >
> > Photon-light-mapping is used to reflect or refract light
> > off of either reflecting or refracting (transparent objects
> > with any ior-value, even the default), so for refraction to
> > work properly with photons, the object needs to be
> > transparent or filtering to let some light travel through
> > the object. In order to reflect photons, the object needs
> > to have reflection in the finish{} Block.
> >
> > In order to achieve what you want, it might be possible
> > to supply two objects, one with no_image and reflection,
> > the other without reflection and without no_image.
> > The no_image-object will be the target for photons, but
> > won't show up on the image itself, thus you're non-reflecting
> > objects SEEM to reflect photons.
> >
> > But this might not work. Then you'd have to do two passes:
> > Render the scene with photons and all objects that reflect
> > photons have reflection, save the photons. The second
> > pass will be to load the photons, but keep the object without
> > reflection.
> >
> > One of these, at least the last, should work.
> >
> > --
> > Tim Nikias
> > Homepage: http://www.digitaltwilight.de/no_lights/index.html
> > Email: Tim### [at] gmx de
> >
> > > I'm trying to code the cornell box but using Photons Mapping instead of
> > > radiosity. So far, no success. I've got all my photons{} blocs in my
> > > global, light and objects. The scene is very simple but all I get is
> > > essentially the same render as with ray-trace only.
> > >
> > > Can anybody suggest something I might have missed?
> > >
> > > Thanks.
> > >
> > > Here is the scene file:
> > >
> > > global_settings {
> > > assumed_gamma 1.0
> > > max_trace_level 5
> > > photons {
> > > count 100000
> > > max_trace_level 9
> > > }
> > > }
> > >
> > > #declare Finish=finish{diffuse 0.75 ambient 0}
> > >
> > > #declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
> > > #declare Red=texture{pigment{rgb<0.57,0.025,0.025>} finish{Finish}}
> > > #declare Green=texture{pigment{rgb<0.025,0.236,0.025>} finish{Finish}}
> > >
> > > #declare LightColor=<1,0.67,0.21>;
> > >
> > >
> > > light_source{
> > > <27.8,54.88,27.95>
> > > color LightColor
> > > spotlight radius -90 falloff 90 tightness 1 point_at <27.8,0,27.95> //
> for
> > > cosine falloff
> > > photons {
> > > refraction on
> > > reflection yes
> > > }
> > > }
> > >
> > >
> > > camera{
> > > location <27.8, 27.3,-80.0>
> > > direction <0, 0, 1>
> > > up <0, 1, 0>
> > > right <-1, 0, 0>
> > > angle 39.5
> > > }
> > >
> > >
> > > // ------------------------ OBJECTS ----------------------------
> > >
> > > // Light Patch
> > > box{
> > > <21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
> > > pigment{rgb<1,1,1>} finish{ambient 0.78 diffuse 1}
> > > photons {
> > > target
> > > refraction off
> > > reflection yes
> > > collect off
> > > }
> > > }
> > >
> > > union{
> > > // Floor
> > > triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>}
> > > triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>}
> > > // Ceiling
> > > triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88,
> 55.92>}
> > > triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88, 0.0>}
> > > // Back wall
> > > triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0,
> 55.92>}
> > > triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0, 55.92>}
> > > texture {White}
> > > split_union off
> > > photons {
> > > target 1.0
> > > refraction off
> > > reflection yes
> > > collect off
> > > }
> > > }
> > >
> > > union {
> > > // Right wall
> > > triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
> > > triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
> > > texture {Green}
> > > split_union off
> > > photons {
> > > target 1.0
> > > refraction off
> > > reflection yes
> > > collect off
> > > }
> > > }
> > >
> > > union {
> > > // Left wall
> > > triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88, 55.92>}
> > > triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88, 0.0>}
> > > texture {Red}
> > > split_union off
> > > photons {
> > > target 1.0
> > > refraction off
> > > reflection yes
> > > collect off
> > > }
> > > }
> > >
> > > box {
> > > // Short bloc
> > > <-8.35,0,-8.35>,<8.35,16.5,8.35>
> > > rotate <0,-17,0>
> > > translate <18.6,0,16.85>
> > > texture { White }
> > > photons {
> > > target 1.0
> > > refraction off
> > > reflection yes
> > > collect off
> > > }
> > > }
> > >
> > >
> > > box {
> > > // Tall bloc
> > > <-8.35,0,-8.35>,<8.35,33,8.35>
> > > rotate <0,17,0>
> > > translate <36.85,0,35.15>
> > > texture { White }
> > > photons {
> > > target 1.0
> > > refraction off
> > > reflection yes
> > > collect off
> > > }
> > > }
> > >
> > > WhiteZebra
> > >
> >
> >
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Okay, I'll post the example scene right after I wrote this
post.
Its actually a little tricky:
First, the object that will cast photons will need no_image,
in order for the object to not show up when rendering.
Still, it will casts shadows and reflect photons.
Then, a second object is needed, which will use
no_shadow (since one is already cast by the first
object) and it has to be slightly larger, since photons
don't like coincident surface (like nothing in POV does ;-).
For this to work, I've also written a macro which takes
care of these things all by itself. You need to supply
an object (without any texturing), a transform that will
be applied to it (like transform{translate <5,11,2>})
and two materials (since materials include everything,
ranging from pigment, normal, finish to interior):
One material which will have an effect on how and
in which color the photons are reflected (and thus needs
some reflection statement), the other can be any kind
of material (but doesn't need reflection, for your intended
diffuse look).
After these four things are declared, you call the macro and
feed it the desired options, and voila!
A diffuse object casting photons!
(see binaries.images)
Regards,
Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tim,
You amaze me.
This is an interesting technique you have there. I've looked at your image
and the specular reflections of photons are currently too obvious as the
caustics on the floor and on the the two walls behing clearly shows. I think
that something that might help diffuse the caustics a little more would be
to add a very rough bump material on the surface of the reflecting objects.
White Zebra
"Tim Nikias" <tim### [at] gmx de> wrote in message
news:3e557c32$1@news.povray.org...
> Okay, I'll post the example scene right after I wrote this
> post.
>
> Its actually a little tricky:
> First, the object that will cast photons will need no_image,
> in order for the object to not show up when rendering.
> Still, it will casts shadows and reflect photons.
> Then, a second object is needed, which will use
> no_shadow (since one is already cast by the first
> object) and it has to be slightly larger, since photons
> don't like coincident surface (like nothing in POV does ;-).
>
> For this to work, I've also written a macro which takes
> care of these things all by itself. You need to supply
> an object (without any texturing), a transform that will
> be applied to it (like transform{translate <5,11,2>})
> and two materials (since materials include everything,
> ranging from pigment, normal, finish to interior):
> One material which will have an effect on how and
> in which color the photons are reflected (and thus needs
> some reflection statement), the other can be any kind
> of material (but doesn't need reflection, for your intended
> diffuse look).
> After these four things are declared, you call the macro and
> feed it the desired options, and voila!
> A diffuse object casting photons!
> (see binaries.images)
>
> Regards,
> Tim
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmx de
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tim,
Sorry for the confusion, I did not use the expression "specular reflection"
in a precise enough manner. What I really meant was that the photons would
be reflected specularly. Not that we would see specular reflection of other
objects in the objects.
The difference is that when a photon is bounced from a specular surface, it
is bounced back *only* in the mirror direction from the surface normal.
While when a photon is bounced from a diffuse surface, it is bounced back in
*all* directions. Because of that, global photons do not produce caustics.
They will just add more radiance to alreadu illuminated objects.
Regards,
White Zebra
"Tim Nikias" <tim### [at] gmx de> wrote in message
news:3e55765e$1@news.povray.org...
> What I suggested wouldn't give you specular
> reflections. Photons will be reflected off of specular-
> reflecting objects, which, when using no_image, won't
> show up on the final image. Thus, you need to place
> the same object, but in this case may change texture,
> normal, finish... So you can also leave out the reflection.
>
> You should look up on no_image, no_shadow,
> no_reflection for that.
>
> And in case this wouldn't work, you could still save the
> photons using specular-reflection, and then load them
> into the same scene, but with all specular reflections
> turned off.
>
> I'll post a short example when I've finished one.
>
> Regards,
> Tim
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmx de
>
> > Tim,
> >
> > Global photon mapping isn't implemented in POV-Ray. I've checked in the
> > source and there are some blocks of codes related to "GLOBAL_PHOTONS"
which
> > are not compiled. I guess that is because it is not flly functional or
fully
> > debugged.
> >
> > Yoursuggestion wouldn't work because it would produce specular
reflections.
> > I actually tried something similar to what you suggest. What I need is
> > diffuse reflection.
> >
> > Thanks for the suggestion. But I guess I'll wait for the global photons
to
> > be fully implemented and debugged.
> >
> > Black Zebra
> >
> > "Tim Nikias" <tim### [at] gmx de> wrote in message
> > news:3e5553c6@news.povray.org...
> > > As I've read the other comments on this, here goes:
> > >
> > > Photon-light-mapping is used to reflect or refract light
> > > off of either reflecting or refracting (transparent objects
> > > with any ior-value, even the default), so for refraction to
> > > work properly with photons, the object needs to be
> > > transparent or filtering to let some light travel through
> > > the object. In order to reflect photons, the object needs
> > > to have reflection in the finish{} Block.
> > >
> > > In order to achieve what you want, it might be possible
> > > to supply two objects, one with no_image and reflection,
> > > the other without reflection and without no_image.
> > > The no_image-object will be the target for photons, but
> > > won't show up on the image itself, thus you're non-reflecting
> > > objects SEEM to reflect photons.
> > >
> > > But this might not work. Then you'd have to do two passes:
> > > Render the scene with photons and all objects that reflect
> > > photons have reflection, save the photons. The second
> > > pass will be to load the photons, but keep the object without
> > > reflection.
> > >
> > > One of these, at least the last, should work.
> > >
> > > --
> > > Tim Nikias
> > > Homepage: http://www.digitaltwilight.de/no_lights/index.html
> > > Email: Tim### [at] gmx de
> > >
> > > > I'm trying to code the cornell box but using Photons Mapping instead
of
> > > > radiosity. So far, no success. I've got all my photons{} blocs in my
> > > > global, light and objects. The scene is very simple but all I get is
> > > > essentially the same render as with ray-trace only.
> > > >
> > > > Can anybody suggest something I might have missed?
> > > >
> > > > Thanks.
> > > >
> > > > Here is the scene file:
> > > >
> > > > global_settings {
> > > > assumed_gamma 1.0
> > > > max_trace_level 5
> > > > photons {
> > > > count 100000
> > > > max_trace_level 9
> > > > }
> > > > }
> > > >
> > > > #declare Finish=finish{diffuse 0.75 ambient 0}
> > > >
> > > > #declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
> > > > #declare Red=texture{pigment{rgb<0.57,0.025,0.025>} finish{Finish}}
> > > > #declare Green=texture{pigment{rgb<0.025,0.236,0.025>}
finish{Finish}}
> > > >
> > > > #declare LightColor=<1,0.67,0.21>;
> > > >
> > > >
> > > > light_source{
> > > > <27.8,54.88,27.95>
> > > > color LightColor
> > > > spotlight radius -90 falloff 90 tightness 1 point_at
<27.8,0,27.95> //
> > for
> > > > cosine falloff
> > > > photons {
> > > > refraction on
> > > > reflection yes
> > > > }
> > > > }
> > > >
> > > >
> > > > camera{
> > > > location <27.8, 27.3,-80.0>
> > > > direction <0, 0, 1>
> > > > up <0, 1, 0>
> > > > right <-1, 0, 0>
> > > > angle 39.5
> > > > }
> > > >
> > > >
> > > > // ------------------------ OBJECTS ----------------------------
> > > >
> > > > // Light Patch
> > > > box{
> > > > <21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
> > > > pigment{rgb<1,1,1>} finish{ambient 0.78 diffuse 1}
> > > > photons {
> > > > target
> > > > refraction off
> > > > reflection yes
> > > > collect off
> > > > }
> > > > }
> > > >
> > > > union{
> > > > // Floor
> > > > triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 0.0>,<0.0, 0.0, 55.92>}
> > > > triangle{<55.28, 0.0, 0.0>,<0.0, 0.0, 55.92>,<54.96, 0.0, 55.92>}
> > > > // Ceiling
> > > > triangle{<55.60, 54.88, 0.0>,<55.60, 54.88, 55.92>,<0.0, 54.88,
> > 55.92>}
> > > > triangle{<55.60, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 54.88,
0.0>}
> > > > // Back wall
> > > > triangle{<0.0, 54.88, 55.92>,<55.60, 54.88, 55.92>,<54.96, 0.0,
> > 55.92>}
> > > > triangle{<0.0, 54.88, 55.92>,<54.96, 0.0, 55.92>,<0.0, 0.0,
55.92>}
> > > > texture {White}
> > > > split_union off
> > > > photons {
> > > > target 1.0
> > > > refraction off
> > > > reflection yes
> > > > collect off
> > > > }
> > > > }
> > > >
> > > > union {
> > > > // Right wall
> > > > triangle{<0.0, 54.88, 0.0>,<0.0, 54.88, 55.92>,<0.0, 0.0, 55.92>}
> > > > triangle{<0.0, 54.88, 0.0>,<0.0, 0.0, 55.92>,<0.0, 0.0, 0.0>}
> > > > texture {Green}
> > > > split_union off
> > > > photons {
> > > > target 1.0
> > > > refraction off
> > > > reflection yes
> > > > collect off
> > > > }
> > > > }
> > > >
> > > > union {
> > > > // Left wall
> > > > triangle{<55.28, 0.0, 0.0>,<54.96, 0.0, 55.92>,<55.60, 54.88,
55.92>}
> > > > triangle{<55.28, 0.0, 0.0>,<55.60, 54.88, 55.92>,<55.60, 54.88,
0.0>}
> > > > texture {Red}
> > > > split_union off
> > > > photons {
> > > > target 1.0
> > > > refraction off
> > > > reflection yes
> > > > collect off
> > > > }
> > > > }
> > > >
> > > > box {
> > > > // Short bloc
> > > > <-8.35,0,-8.35>,<8.35,16.5,8.35>
> > > > rotate <0,-17,0>
> > > > translate <18.6,0,16.85>
> > > > texture { White }
> > > > photons {
> > > > target 1.0
> > > > refraction off
> > > > reflection yes
> > > > collect off
> > > > }
> > > > }
> > > >
> > > >
> > > > box {
> > > > // Tall bloc
> > > > <-8.35,0,-8.35>,<8.35,33,8.35>
> > > > rotate <0,17,0>
> > > > translate <36.85,0,35.15>
> > > > texture { White }
> > > > photons {
> > > > target 1.0
> > > > refraction off
> > > > reflection yes
> > > > collect off
> > > > }
> > > > }
> > > >
> > > > WhiteZebra
> > > >
> > >
> > >
> >
> >
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
WhiteZebra <ypo### [at] cogniscienceinc com> wrote:
> If you are talking about adding a reflection attribute un the finish block,
> I
> tried that but this is not what I'm looking for.
Well, that's precisely what I was implying: What you want is not possible
with photons (not in POV-Ray).
> I've tried to set "collect on" everywhere (I just did) but still no photons.
That's because you have no reflecting nor refracting surfaces. My point
was that even if you had reflecting/refracting surfaces, you would not see
any photons because no surface was collecting them.
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> You amaze me.
Nah, just experience and a nack for experimenting.
What might work for every surface to collect photons
and every surface to reflect photons, would be to put
them all inside a union{} and make them a target. Photons
will be generated with all objects using reflection, but won't
show up in the final image due to no_image.
But, in this occasion, if you want the entire scene to be
light by photons, it would probably really be easier to put
something like
#declare Reflect_Photons=yes;
at the beginning and
finish{ #if (Reflect_Photons) reflection 1 #end [other finishes]}
inside every finish for every material.
Then render the scene with reflections on, and save the photons
using "save_file" inside the photon{} Block of the global
settings.
Then, switch Reflect_Photons to no/off/0 and use
load_file instead of save_file. Thus, no specular reflections,
but photons all over the place. This would get quiet parsing
and memory intensive though.
Let me see if I can cook up a small scene for that.
Regards,
Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
> Tim,
>
> You amaze me.
>
> This is an interesting technique you have there. I've looked at your image
> and the specular reflections of photons are currently too obvious as the
> caustics on the floor and on the the two walls behing clearly shows. I think
> that something that might help diffuse the caustics a little more would be
> to add a very rough bump material on the surface of the reflecting objects.
>
> White Zebra
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Doesn't look too good. I'll post the scene as a reply
to the other one, but the effects aren't really satsifying.
For one, I've tried to use the blurred-reflections-technique
(as described on my homepage), and the texture is still
in the scene, though not in use.
Problem is, the photons get reflected too directly, and
as such, we get very sharp shadows. It works for some
parts of the scene, but not quiet satisfying. It seems
photons would have a long way to go to simulate global-
illumination.
Anyway, you can have a look at the scene and toy around.
Was a neat idea, but the experiments show that the effort
is futile. It would get ridiculously slow in parsing and
memory for an amount of photons using blurred-reflections
to get the desired global-illumination-look.
Anyways, perhaps some might get more insight into this
issue of using photons...
Regards,
Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
"Tim Nikias" <tim### [at] gmx de> schrieb im Newsbeitrag
news:3e56088b@news.povray.org...
> > You amaze me.
>
> Nah, just experience and a nack for experimenting.
>
> What might work for every surface to collect photons
> and every surface to reflect photons, would be to put
> them all inside a union{} and make them a target. Photons
> will be generated with all objects using reflection, but won't
> show up in the final image due to no_image.
>
> But, in this occasion, if you want the entire scene to be
> light by photons, it would probably really be easier to put
> something like
> #declare Reflect_Photons=yes;
> at the beginning and
> finish{ #if (Reflect_Photons) reflection 1 #end [other finishes]}
> inside every finish for every material.
> Then render the scene with reflections on, and save the photons
> using "save_file" inside the photon{} Block of the global
> settings.
> Then, switch Reflect_Photons to no/off/0 and use
> load_file instead of save_file. Thus, no specular reflections,
> but photons all over the place. This would get quiet parsing
> and memory intensive though.
>
> Let me see if I can cook up a small scene for that.
>
> Regards,
> Tim
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmx de
>
> > Tim,
> >
> > You amaze me.
> >
> > This is an interesting technique you have there. I've looked at your image
> > and the specular reflections of photons are currently too obvious as the
> > caustics on the floor and on the the two walls behing clearly shows. I think
> > that something that might help diffuse the caustics a little more would be
> > to add a very rough bump material on the surface of the reflecting objects.
> >
> > White Zebra
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tim Nikias" <tim### [at] gmx de> wrote in message
news:3e5629c5$1@news.povray.org...
> Anyways, perhaps some might get more insight into this
> issue of using photons...
"Doctor, it hurts when I do this."
"Then don't do it."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
:-)
I meant that like: People who don't know a lot about
photons might get some information from it, which they
don't understand from the documentation. Sometimes
examples do help, you know. ;-)
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
>
> "Doctor, it hurts when I do this."
> "Then don't do it."
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 20 Feb 2003 22:56:50 -0500, "White Zebra"
<ypo### [at] cogniscienceinc com> wrote:
>The difference is that when a photon is bounced from a specular surface, it
>is bounced back *only* in the mirror direction from the surface normal.
>While when a photon is bounced from a diffuse surface, it is bounced back in
>*all* directions. Because of that, global photons do not produce caustics.
>They will just add more radiance to alreadu illuminated objects.
Ouch...
Even in a polygon-based renderer (which POV is not), I can smell some
very bad integrals involved to determine the energy distribution. In
POV's case, all I smell is a LOT of sampling should this technique
ever be implemented.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |