|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I've created a test image with UVPOV using Photon Mapping. It is an
illustration of a standard class-room experiment showing refraction and
reflection. I wanted to see whether Photon mapping actually could do this,
and the results were quite surprising.
The only problem is that the rays are a bit splotchy and I cannot find good
settings for them.
It was amazing to see that the photons are refracted through the prism and
reflected on the inside, creating a zig-zag pattern as one would expect from
the real world. Rendering time was about 8 mins; 6 mins mapping photons. :/
But I am not quite happy yet. There seems to be some strange phenomena, for
example the forst refracted the stripe suddenly ends!
Any comments welcome!
Simen.
------
// beginnig of source for prism1.jpg
#include "colors.inc"
// settings for photon gathering; as in example in the docs. Lower
// phd gives better results and longer tracing time.
#declare phd=0.35;
global_settings{
photons{
gather 20, 100
radius 0.1*phd, 2, 0.1*phd
//autostop 0
jitter .01
expand_thresholds 0.2, 40
}
max_trace_level 20
}
// an ambient light source
light_source { <-50, 50, -50> color White*0.45 }
// camera - placed on the z-axis then rotated
camera {
location -z*30
direction z
up y
right 4/3*x
angle 40
look_at 0
rotate <47, 30, 0>
}
// some settings:
#declare w = 0.41; // witdh of constraining container
#declare l = 30; // length of containter - bigger gives narrower spreading angle on
the ray
#declare stre = 10; // strenth of light - do not increase this if l is increased -
automatic adjustment here
#declare h = 10; // height of container. Just a formality
union {
light_source {
<0, 2, 0> color White*l*stre
}
difference {
box { <-(w/2+0.5), 0, -(w/2+0.5)>, <l, h+1, w/2+0.5> }
box { <-(w/2), -1, -(w/2)>, <l+1, h+2,
w/2> }
pigment {
color Green
}
}
translate x*-l
rotate y*70
translate <-7, 0, 15>
}
// the prism
box {
-1, 1
scale <5, 1, 3>
translate y*1
pigment {
color rgbf <1, 1, 1, 0.78>
}
finish {
phong 1
phong_size 150
reflection 0.22
ambient 0.4
diffuse 0.6
}
interior {
ior 1.44
}
photons {
separation 0.02*phd
refraction on
reflection on
//ignore_photons
}
}
// graph paper
plane {
y, 0
texture {
pigment {
gradient x
color_map {
[0.0, 0.021 color Blue color Blue]
[0.021, 1.0 color White color White]
}
}
}
texture {
pigment {
gradient z
color_map {
[0.0, 0.021 color Blue color Blue]
[0.021, 1.0 color Clear color Clear]
}
}
finish {
ambient 0.01
diffuse 0.99
}
}
}
// end of source.
Post a reply to this message
Attachments:
Download 'prism1.jpg' (52 KB)
Preview of image 'prism1.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Try these photon settings:
photons{
gather 40, 100
radius 0.3*phd, 1 // increased radius decreases
splotchiness
autostop 1.5
jitter .9 // jitter helps remove that lines effect
expand_thresholds 0.2, 40
range_divider 1000 // there must be a bug... but this is a
work-around for now
adc_bailout 1/(256*40)
}
To greatly decrease trace time, add
photons { reflection off refraction off}
to your ambient light source. You can take it off again for the final,
high-quality, trace once all testing is done, if you so desire.
-Nathan
Simen Kvaal <sim### [at] studentmatnatuiono> wrote in message
news:37ff302a@news.povray.org...
> I've created a test image with UVPOV using Photon Mapping. It is an
> illustration of a standard class-room experiment showing refraction and
> reflection. I wanted to see whether Photon mapping actually could do this,
> and the results were quite surprising.
>
> The only problem is that the rays are a bit splotchy and I cannot find
good
> settings for them.
>
> It was amazing to see that the photons are refracted through the prism and
> reflected on the inside, creating a zig-zag pattern as one would expect
from
> the real world. Rendering time was about 8 mins; 6 mins mapping photons.
:/
>
> But I am not quite happy yet. There seems to be some strange phenomena,
for
> example the forst refracted the stripe suddenly ends!
>
> Any comments welcome!
>
> Simen.
>
> ------
>
> // beginnig of source for prism1.jpg
>
> #include "colors.inc"
>
> // settings for photon gathering; as in example in the docs. Lower
> // phd gives better results and longer tracing time.
>
> #declare phd=0.35;
>
al_settings{
> photons{
> gather 20, 100
> radius 0.1*phd, 2, 0.1*phd
> file://autostop 0
> jitter .01
> expand_threshol
ds 0.2, 40
> }
> max_trace_level 20
> }
>
>
> // an ambient light source
> light_source { <-50, 50, -50> color White*0.45 }
>
> // camera - placed on the z-axis then rotated
> camera {
> location -z*30
> direction z
> up y
> right 4/3*x
> angle 40
> look_at 0
>
> rotate <47, 30, 0>
> }
>
>
> // some settings:
> #declare w = 0.41; // witdh of constraining container
> #declare l = 30; // length of containter - bigger gives narrower spreading
angle on the ray
> #declare stre = 10; // strenth of light - do not increase this if l is
increased - automatic adjustment here
> #declare h = 10; // height of container. Just a formality
>
> union {
> light_source {
> <0, 2, 0> color White*l*stre
> }
>
>
> difference {
>
> box { <-(w/2+0.5), 0, -(w/2+0.5)>, <l, h+1, w/2+0.5> }
> box { <-(w/2), -1, -(w/2)>, <l+1, h+2,
> w/2> }
> pigment {
> color Green
> }
> }
> translate x*-l
> rotate y*70
> translate <-7, 0, 15>
>
> }
>
>
> // the prism
>
> box {
> -1, 1
> scale <5, 1, 3>
> translate y*1
> pigment {
> color rgbf <1, 1, 1, 0.78>
> }
> finish {
> phong 1
> phong_size 150
> reflection 0.22
> ambient 0.4
> diffuse 0.6
> }
> interior {
> ior 1.44
> }
> photons {
> separation 0.02*phd
> refraction on
> reflection on
> file://ignore_photons
> }
> }
>
>
>
>
> // graph paper
> plane {
> y, 0
> texture {
> pigment {
> gradient x
> color_map {
> [0.0, 0.021 color Blue color Blue]
> [0.021, 1.0 color White color White]
> }
> }
> }
>
> texture {
> pigment {
> gradient z
> color_map {
> [0.0, 0.021 color Blue color Blue]
> [0.021, 1.0 color Clear color Clear]
> }
> }
>
>
> finish {
> ambient 0.01
> diffuse 0.99
> }
> }
>
> }
>
> // end of source.
>
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>To greatly decrease trace time, add
> photons { reflection off refraction off}
>to your ambient light source. You can take it off again for the final,
>high-quality, trace once all testing is done, if you so desire.
>
>-Nathan
Thanks! I knew the ambient light sucked up about ten times the rendering
time compared to the "ray-source." But I didn't realize that I could simply
turn photons off for the *light_source.* I thought it only worked on objects
that should *recieve* photons... But great! I'll give it a go!
Simen.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|