POV-Ray : Newsgroups : povray.general : Photon - Cornell Box Server Time
17 Nov 2024 15:14:48 EST (-0500)
  Photon - Cornell Box (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: WhiteZebra
Subject: Photon - Cornell Box
Date: 20 Feb 2003 01:55:08
Message: <web.3e547aa166b09a13fbe3eac40@news.povray.org>
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

From: Warp
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 03:51:04
Message: <3e5496f8@news.povray.org>
WhiteZebra <ypo### [at] cogniscienceinccom> 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

From: WhiteZebra
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 11:41:47
Message: <3e55054b$1@news.povray.org>
> > 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

From: Christopher James Huff
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 11:48:18
Message: <cjameshuff-01207F.11454420022003@netplex.aussie.org>
In article <web.3e547aa166b09a13fbe3eac40@news.povray.org>,
 "WhiteZebra" <ypo### [at] cogniscienceinccom> 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] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: ingo
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 12:34:00
Message: <Xns9328BD36A5D45seed7@povray.org>
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

From: WhiteZebra
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 12:36:01
Message: <3e551201$1@news.povray.org>
> > 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

From: White Zebra
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 15:34:55
Message: <3e553bef$1@news.povray.org>
> > 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

From: Tim Nikias
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 17:16:38
Message: <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] gmxde

> 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

From: White Zebra
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 18:32:26
Message: <3e55658a$1@news.povray.org>
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] gmxde> 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] gmxde
>
> > 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

From: Tim Nikias
Subject: Re: Photon - Cornell Box
Date: 20 Feb 2003 19:44:14
Message: <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] gmxde

> 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] gmxde> 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] gmxde
> >
> > > 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

Goto Latest 10 Messages Next 9 Messages >>>

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