POV-Ray : Newsgroups : povray.general : Photon - Cornell Box : Re: Photon - Cornell Box Server Time
4 Aug 2024 20:20:26 EDT (-0400)
  Re: Photon - Cornell Box  
From: Tim Nikias
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

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