|
|
In POV-Ray 3.7, when a cylindrical beam of light is passed through a
refracting object in a media environment with photons enabled, sometimes
the beam is split into two parts, one of which is refracted and the
other not. This did not happen in POV-Ray 3.6.
(If photons are not enabled, the beam does not show any refraction at
all in the media, whether in 3.7 or 3.6.)
The following code illustrates the problem:
____________________________________________________________________
#version 3.6; //[sic]
global_settings
{ assumed_gamma 1
max_trace_level 15
photons { spacing 0.005 autostop 0 media 200 }
}
camera
{ orthographic
location -28 * z
right 28 * x
up 21 * y
}
// Medium to reveal the path of the light beam:
box
{ -0.5, 0.5 hollow
scale <28, 21, 0.1005>
pigment { rgbt 1 }
finish { specular 0 reflection 0 }
interior
{ media
{ scattering { 1, 1 extinction 0 }
samples 3, 3
aa_level 2
}
}
photons { pass_through collect off }
}
// The light beam:
light_source
{ <-10, -10, 0>, rgb 10
cylinder radius 0.025 falloff 0.05 point_at 0
parallel point_at 0
}
// Refracting block:
box
{ -1, 1 scale <5, 10, 0.05>
hollow
pigment { rgbf 1 }
finish { reflection { 0 1 fresnel } conserve_energy specular 0.2 }
interior { ior 1.5 }
photons { target refraction on reflection on collect off }
}
// Environmental light to make the refracting block visible:
light_source
{ <-1, 1, -1> * 28000, rgb 1
parallel point_at 0
media_interaction off
photons { reflection off refraction off }
}
____________________________________________________________________
The images split_beam_37bug-36run.png and split_beam_37bug-37run.png
show this file rendered in POV-Ray 3.6.1 and 3.7, respectively.
Oddly enough, the test scene for BeamTest (in the Object Collection)
renders perfectly, but anything else I try--even slight modifications to
the BeamTest test scene--reveals the problem.
POV-Ray version: POV-Ray 3.7.0
Operating system: openSUSE 13.1 GNU/Linux
Hardware: Dell Inspiron 17R, Intel Core i7
Post a reply to this message
Attachments:
Download 'split_beam_37bug-36run.png' (5 KB)
Download 'split_beam_37bug-37run.png' (5 KB)
Preview of image 'split_beam_37bug-36run.png'
Preview of image 'split_beam_37bug-37run.png'
|
|
|
|
On 10/24/2014 03:14 PM, Cousin Ricky wrote:
> In POV-Ray 3.7, when a cylindrical beam of light is passed through a
> refracting object in a media environment with photons enabled, sometimes
> the beam is split into two parts, one of which is refracted and the
> other not. This did not happen in POV-Ray 3.6.
>
> (If photons are not enabled, the beam does not show any refraction at
> all in the media, whether in 3.7 or 3.6.)
>
> The following code illustrates the problem:
...
>
> The images split_beam_37bug-36run.png and split_beam_37bug-37run.png
> show this file rendered in POV-Ray 3.6.1 and 3.7, respectively.
>
> Oddly enough, the test scene for BeamTest (in the Object Collection)
> renders perfectly, but anything else I try--even slight modifications to
> the BeamTest test scene--reveals the problem.
>
> POV-Ray version: POV-Ray 3.7.0
> Operating system: openSUSE 13.1 GNU/Linux
> Hardware: Dell Inspiron 17R, Intel Core i7
I was able to render the attached image by making the changes outlined
in the in-lined patch file. Indeed it looks like we need collect to be
on in the refraction block and this doesn't match the recommendation in
the documentation for glass-like objects as I understand it.
This wasn't the only cause for the extra beam as part of it seemed to be
coming from the refracting box being scaled inside the media box ever so
slightly. I set the scale so it was well outside the media box.
The thin, full white rays I think were due the falloff value <1.0 for
the light. Further, I got some very strange thicker all white
light-traces after some surface transitions different & wider than your
image. Anything >1.0 for the falloff seems to work - not sure why this
is. Oh, and you left in a point_at and so had one before and after your
parallel statement. The parallel keyword is supposed to come before any
point_at.
Bill P.
--------------- Start cut for patch here --------------------------
25c25
< { scattering { 1, 1 extinction 0 }
---
> { scattering { 1, 1 extinction 0.05 }
35,36c35,36
< { <-10, -10, 0>, rgb 10
< cylinder radius 0.025 falloff 0.05 point_at 0
---
> { <-10, -10, 0>, rgb 1
> cylinder radius 0.025 falloff 1.25
42c42
< { -1, 1 scale <5, 10, 0.05>
---
> { -1, 1 scale <5, 10, 5.05>
45c45
< finish { reflection { 0 1 fresnel } conserve_energy specular 0.2 }
---
> finish { reflection { 0.1 0.9 fresnel } conserve_energy }
47c47
< photons { target refraction on reflection on collect off }
---
> photons { target refraction on reflection on collect on }
50,56c50,56
< // Environmental light to make the refracting block visible:
< light_source
< { <-1, 1, -1> * 28000, rgb 1
< parallel point_at 0
< media_interaction off
< photons { reflection off refraction off }
< }
---
> // // Environmental light to make the refracting block visible:
> // light_source
> // { <-1, 1, -1> * 28000, rgb 1
> // parallel point_at 0
> // media_interaction off
> // photons { reflection off refraction off }
> // }
----------------- End cut for patch here --------------------------
Post a reply to this message
Attachments:
Download 'better.jpg' (7 KB)
Preview of image 'better.jpg'
|
|