|
|
Alright ... I just don't understand photons, I guess.
If I have read correctly, the use of photons will allow light to be focused
by a lens
I have tried, but failed! Below is a transparent 'fog box' with a red light
shining through it. There is a convex lens in the center.
If I set the photon 'target' value of the lens to anything except 0, it
blocks the light entirely. If I set the target value to 0, then light
passes through without refraction.
What am I doing wrong, folks?
Alan Walkington
----------------------------------------------
#version 3.5;
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
global_settings {
photons {
count 20000
autostop 0
jitter .4
gather 20, 100 //100, 100
expand_thresholds 0.2, 30
}
}
camera
{ orthographic
location <-60 *.7, 60 * .7, -60 *.7>
look_at <0, 0, 0>
}
box { // fog box
<-30,-15,30>,<30,15,-30>
pigment { White filter 1 }
hollow on
interior{
media {
scattering { 1, rgb 0.03}
intervals 1
samples 5
method 3
}
}
}
light_source {
0*x
color Red * 20
spotlight
translate <-60, 0 ,0>
point_at <0, 0, 0>
radius .1
tightness 85
falloff 5
photons {
refraction on
reflection on
}
}
light_source
{
0*x
color White * .8
translate <0, 100, 0>
}
intersection {// lens
sphere {
<0, 49.25, 0>, 50
}
sphere {
<0, -49.25, 0>, 50
}
cylinder {
<0, 3, 0>,
<0, -3, 0>,
7.05
}
material {M_NB_Glass}
photons {
target 0
refraction on
reflection on
collect off
}
rotate z*90
}
----------------------------------------------
Post a reply to this message
|
|
|
|
Alan Walkington wrote:
>Alright ... I just don't understand photons, I guess.
>If I have read correctly, the use of photons will allow light to be focused
>by a lens
>
>I have tried, but failed! Below is a transparent 'fog box' with a red light
>shining through it. There is a convex lens in the center.
>
>If I set the photon 'target' value of the lens to anything except 0, it
>blocks the light entirely. If I set the target value to 0, then light
>passes through without refraction.
>
>What am I doing wrong, folks?
Leaving out the 0 on the target line would help. The reason why it seems to
block the light, is that the light is actuallly bent and focused to a
point, and then spreads out from there. The light rays cross over like
this:
/
=====OX
\
=== incoming light rays
O lens
X light cross over
/, \ light rays going off
Try taking a look at the sample images in the help files. You can see the
shadow behind the objects, and the bright spots in the shadows.
The reason why you're not getting the light appearing in your media, is that
you don't have any media photons specified. Your global_settings block
should look like this:
global_settings {
photons {
count 20000
autostop 0
jitter .4
media 1000
gather 20, 100 //100, 100
expand_thresholds 0.2, 30
}
}
A word of warning though: media photons _really_ slow down the scene,
especially when you've got large numbers of them.
Why are you using an orthographic camera? I've never found any use for it, I
just stick to the standard perspective camera. Judging from the sample
scene of the orthographic camera, I'd say it makes the scene look
unrealistic (of course that might be your goal).
Oh well, good luck.
Rohan _e_ii
Post a reply to this message
|
|