|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I've got 2 transparent objects (one behind the other) standing inside a
Cornell cube. Now when POVray shoots a ray through the scene, the ray hits
the first object and is refracted. The ray then seems to hit the back wall
of the Cornell cube without being refracted by the second object.
So far I've tried setting max_trace_level to 20 (which should definitely be
enough). I also tried putting both transparent objects very close to
eachother, hoping that somehow the ray would get refracted by the second
object too, but to no avail.
Here's what my "code" looks like:
//draw Cornell box
//draw first transparent object
mesh
{
smooth_triangle
{
...
}
scale -0.3*x
scale 0.3*y
scale 0.3*z
translate -1*z
rotate 180*y
no_shadow
interior { ior 1.2}
pigment {color rgb <1, 1, 1, 1>}
}
//draw second transparent object
mesh
{
smooth_triangle
{
...
}
scale -0.3*x
scale 0.3*y
scale 0.3*z
translate -4*z
rotate 180*y
no_shadow
interior { ior 1.2}
pigment {color rgb <1, 1, 1, 1>}
}
light_source { <0.0, -0.4, 1.0> color rgb<1.5, 1.5, 1.5> }
camera
{
location <0, 0, -3>
look_at <0, 0, 4>
right x
up y
angle 60
}
Does anyone know what could be wrong?
Post a reply to this message
|
|
| |
| |
|
|
From: Alain
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 17 Apr 2007 18:53:55
Message: <46255003$1@news.povray.org>
|
|
|
| |
| |
|
|
Shai nous apporta ses lumieres en ce 17-04-2007 15:35:
> Hi,
> I've got 2 transparent objects (one behind the other) standing inside a
> Cornell cube. Now when POVray shoots a ray through the scene, the ray hits
> the first object and is refracted. The ray then seems to hit the back wall
> of the Cornell cube without being refracted by the second object.
> So far I've tried setting max_trace_level to 20 (which should definitely be
> enough). I also tried putting both transparent objects very close to
> eachother, hoping that somehow the ray would get refracted by the second
> object too, but to no avail.
> Here's what my "code" looks like:
> //draw Cornell box
> //draw first transparent object
> mesh
> {
> smooth_triangle
> {
> ...
> }
> scale -0.3*x
> scale 0.3*y
> scale 0.3*z
it's beter to use: scale<-0.3, 0.3, 0.3>. It also have the side effect of
removing 6 warnings about scaling by zero.
> translate -1*z
> rotate 180*y
> no_shadow
> interior { ior 1.2}
> pigment {color rgb <1, 1, 1, 1>}
It should be rgbt<1,1,1,1> (or rgbt 1) or rgbf<1,1,1,1> (or rgbf 1)
> }
(part removed)
> Does anyone know what could be wrong?
Are your meshes forming closed shapes? If a mesh forms a shaped surface without
any back, any ray entering it get refracted and is considered traveling inside
something with an ior of 1.2. Now, it encounter the second mesh, also having an
ior of 1.2. So, the ior before and after the surface is the same resulting in no
further refraction.
--
Alain
-------------------------------------------------
Remember, half the people you know are below average.
Post a reply to this message
|
|
| |
| |
|
|
From: Tim Attwood
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 17 Apr 2007 19:52:59
Message: <46255ddb$1@news.povray.org>
|
|
|
| |
| |
|
|
> Are your meshes forming closed shapes? If a mesh forms a shaped surface
> without any back, any ray entering it get refracted and is considered
> traveling inside something with an ior of 1.2. Now, it encounter the
> second mesh, also having an ior of 1.2. So, the ior before and after the
> surface is the same resulting in no further refraction.
Probably should have inside_vector in the meshes just to be safe, as well.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Are your meshes forming closed shapes? If a mesh forms a shaped surface without
> any back, any ray entering it get refracted and is considered traveling inside
> something with an ior of 1.2. Now, it encounter the second mesh, also having an
> ior of 1.2. So, the ior before and after the surface is the same resulting in no
> further refraction.
The meshes are not closed. Basically I started with a .OBJ file of the
Stanford Bunny. I then wrote a program that would remove the back of the
bunny, leaving me with only its front.
How could I fix this? Is there any command that allows me to work around
this?
Post a reply to this message
|
|
| |
| |
|
|
From: Warp
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 18 Apr 2007 03:55:07
Message: <4625cedb@news.povray.org>
|
|
|
| |
| |
|
|
Tim Attwood <tim### [at] comcastnet> wrote:
> Probably should have inside_vector in the meshes just to be safe, as well.
"Just to be safe"? Why?
I think it's better to understand what "inside_vector" does instead of
just spreading it around "just to be safe".
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
From: Warp
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 18 Apr 2007 03:56:40
Message: <4625cf38@news.povray.org>
|
|
|
| |
| |
|
|
Shai <rec### [at] hotmailcom> wrote:
> The meshes are not closed. Basically I started with a .OBJ file of the
> Stanford Bunny. I then wrote a program that would remove the back of the
> bunny, leaving me with only its front.
Given that the mesh is transparent how could you expect it to work
correctly if parts of the surface have been removed?
> How could I fix this? Is there any command that allows me to work around
> this?
How do you expect POV-Ray to create a part of the mesh which isn't there?
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
From: Alain
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 18 Apr 2007 17:57:21
Message: <46269441$1@news.povray.org>
|
|
|
| |
| |
|
|
Shai nous apporta ses lumieres en ce 18-04-2007 01:43:
>> Are your meshes forming closed shapes? If a mesh forms a shaped surface without
>> any back, any ray entering it get refracted and is considered traveling inside
>> something with an ior of 1.2. Now, it encounter the second mesh, also having an
>> ior of 1.2. So, the ior before and after the surface is the same resulting in no
>> further refraction.
> The meshes are not closed. Basically I started with a .OBJ file of the
> Stanford Bunny. I then wrote a program that would remove the back of the
> bunny, leaving me with only its front.
It would be beter to use the whole original .OBJ converted into a mesh.
You wrote a programm to remove the back, what a waste of your time :-(
Maybe you can alter it to replace the back with a flat face rather than just
removing part of the object.
> How could I fix this? Is there any command that allows me to work around
> this?
Only "fix" that I can think of is not removing the back, or replacing with some
flat face. That can't be done by POV-Ray, as your choped object is missing some
parts.
--
Alain
-------------------------------------------------
'I never met a piece of chocolate I didn't like.'
Post a reply to this message
|
|
| |
| |
|
|
From: Tim Attwood
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 19 Apr 2007 00:01:58
Message: <4626e9b6$1@news.povray.org>
|
|
|
| |
| |
|
|
> "Just to be safe"? Why?
I guess I wasn't being entirely clear...
> I think it's better to understand what "inside_vector" does instead of
> just spreading it around "just to be safe".
The type of effect he's going for probably will end up requiring CSG,
and then he'll need inside_vector. Inside_vector lets POV know where
the inside of a mesh is.
If you have two surfaces, a front and a rear, and you wish for refraction
to happen on them, one solution is for both of those surfaces to be
part of the same closed object assembled with CSG.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Given that the mesh is transparent how could you expect it to work
> correctly if parts of the surface have been removed?
> --
> - Warp
I only want the ray to refract when it enters the object. The ray should not
be refracted again when it leaves the object through the back side. I didn't
know how to get this effect in POVray, so I thought it would be best if I
just removed the back of the object myself.
Post a reply to this message
|
|
| |
| |
|
|
From: Alain
Subject: Re: refraction with multiple transparent objects behind eachother
Date: 19 Apr 2007 19:07:11
Message: <4627f61f@news.povray.org>
|
|
|
| |
| |
|
|
Shai nous apporta ses lumieres en ce 19-04-2007 16:48:
>> Given that the mesh is transparent how could you expect it to work
>> correctly if parts of the surface have been removed?
>> --
>> - Warp
> I only want the ray to refract when it enters the object. The ray should not
> be refracted again when it leaves the object through the back side. I didn't
> know how to get this effect in POVray, so I thought it would be best if I
> just removed the back of the object myself.
OK, but that is completely unrealistic and contrary to comon sence.
--
Alain
-------------------------------------------------
I abhor war and view it as the greatest scourge of mankind.
Thomas Jefferson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |