|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I just experimented a bit with glass, water and photons. For making
a glass filled with water, the documentation recommends to make a
hollow container using CSG, and filling it with a liquid object
scaled down a bit to avoid coincident surfaces. I'm a bit unsure
about this, as the extra transitions through a thin air slice would
seem to cause unnecessary calculations, and yield incorrect results
as well (e.g., I think it is possible that the expected refraction
at a water/glass transition turns into a total internal reflection
at a water/air transition). A problem like this was discussed some
time ago in povray.newusers regarding "Refraction in the eye":
http://news.povray.org/povray.newusers/thread/%3Cweb.45642420c0c6e74c618bf8930@news.povray.org%3E/
So, I made three images:
1. Uses the recommended technique
2. Embeds the liquid in a solid glass block (in the hope that
the IOR specified in the second object takes precedence)
3. Is a variation of 1., with the liquid scaled *up* a tiny
bit and the "merge"-d with the glass container to remove
the inner surface (but no idea how POV-Ray handles the
differing IORs in a merge).
As a result, the total brightness of the glass seems to be a
bit exaggerated in the first version. I like the second result
best, but the behavior appears to be rather undefined (when
combining two objects with differing IORs, what is the IOR in
the intersection supposed to be?). Also note that there seems
to be problem with seeing the lemon slice through the water
when using this method. The third image looks rather dull.
Also, the version with the embedded liquid took a lot longer
to render (although it should be much less work calculating
the refraction).
And no praise for the lemon texture please,
it's a photo - of an orange, actually ;)
You know you've been raytracing to long when ...
... you start photographing your breakfast with a
mobile phone to reuse it as a texture.
Post a reply to this message
Attachments:
Download 'bubbles-800.jpg' (20 KB)
Download 'bubbles-800-embed.jpg' (20 KB)
Download 'bubbles-800-scaleplus.jpg' (19 KB)
Preview of image 'bubbles-800.jpg'
Preview of image 'bubbles-800-embed.jpg'
Preview of image 'bubbles-800-scaleplus.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christian Froeschlin <chr### [at] chrfrde> wrote:
> I just experimented a bit with glass, water and photons. For making
> a glass filled with water, the documentation recommends to make a
> hollow container using CSG, and filling it with a liquid object
> scaled down a bit to avoid coincident surfaces. I'm a bit unsure
> about this, as the extra transitions through a thin air slice would
> seem to cause unnecessary calculations, and yield incorrect results
> as well (e.g., I think it is possible that the expected refraction
> at a water/glass transition turns into a total internal reflection
> at a water/air transition). A problem like this was discussed some
> time ago in povray.newusers regarding "Refraction in the eye":
I've had an idea for quite a while, but i've never tested it. It is similar
to the recommended technique: scale the water slightly, but then reduce the
reflection on those parts of the glass and the water that are in contact.
The idea is to have a well-defined ior transition (which is achieved by the
recommended technique), without the surface-to-air reflections.
You'll want to keep some of the reflection, though, for the imaginary
glass-to-water surface. The air will not significantly affect regular
high-angle reflections; the distortion of the angle of incidence caused by
the air layer will be cancelled out by the return trip through the air
layer. However, i haven't tried to figure out the effect on internal
reflections from low angles of incidence. Low-angle internal reflections
depend on the ior of the outer material, and a reflected ray would never
know that it was supposed to hit water, not glass.
> 2. Embeds the liquid in a solid glass block (in the hope that
> the IOR specified in the second object takes precedence)
I don't see why not. Unlike in image #3, the 2nd object has a defined
surface where an ior switch can be made.
> 3. Is a variation of 1., with the liquid scaled *up* a tiny
> bit and the "merge"-d with the glass container to remove
> the inner surface (but no idea how POV-Ray handles the
> differing IORs in a merge).
When you remove the internal surfaces, you are effectively left with a
variable ior. A quick glance through the documentation reveals that
variable ior is deliberatedly unsupported, so i would imagine that the
behavior of the light in image #3 is quite undefined.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Oh, nice! Reminds me of my quite recent Gin and Tonic picture:
http://img74.imageshack.us/img74/4818/gatxj8.jpg
Your orange/lemon proved to be a better solution,
even though I didnt make the one in my image myself so I take no blame for
that... ;)
My version is more or less exactly the documentations version btw.
Dont forget to adjust the max trace level though.
Cheers
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Cousin Ricky wrote:
>>2. Embeds the liquid in a solid glass block (in the hope that
>> the IOR specified in the second object takes precedence)
>
> I don't see why not. Unlike in image #3, the 2nd object has a defined
> surface where an ior switch can be made.
Yes, just that there doesn't seem to be a well-defined way of specifying
the intended result. It would be as consistent for POV-Ray to assume
that the ior is that of glass everywhere. And the disappearing bit
of lemon does seem to hint that something is not 100% ok.
Also, since I want an open glass instead of enclosed water in a glass
block, I need to remove some glass from the top of the block, which
means there is probably some sort of bogus glass surface right below
the water level (although it might not cause refraction if the ior
is considered to be that of water on both sides).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
RusHHouR wrote:
> Oh, nice! Reminds me of my quite recent Gin and Tonic picture:
> http://img74.imageshack.us/img74/4818/gatxj8.jpg
Nice one. Seems to have a more realistic level of light.
Hmm ... I just realized that my transmit and reflection added up to
slightly more than 1, so that's the extra brightness taken care of.
Although this doesn't change that there was a lot of difference
between the embedded and the classic version (and I still don't
quite trust the latter). One might see a more significant effect
of total internal reflection with the camera inside the glass ;)
> Dont forget to adjust the max trace level though.
I had to crank it up to 50 before the last spots went away ....
Post a reply to this message
Attachments:
Download 'bubbles-800-fixed-transmit.jpg' (19 KB)
Preview of image 'bubbles-800-fixed-transmit.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christian Froeschlin wrote:
> Hmm ... I just realized that my transmit and reflection added up to
> slightly more than 1,
POV-Ray can deal with this for you. Add the "conserve_energy" keyword
to your finish statement, and POV will adjust the transmitted light
according to the amount that is reflected.
...Chambers
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ben Chambers wrote:
>
> POV-Ray can deal with this for you. Add the "conserve_energy" keyword
> to your finish statement, and POV will adjust the transmitted light
> according to the amount that is reflected.
Sounds useful, thank you for the pointer.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christian Froeschlin wrote:
> Ben Chambers wrote:
>>
>> POV-Ray can deal with this for you. Add the "conserve_energy" keyword
>> to your finish statement, and POV will adjust the transmitted light
>> according to the amount that is reflected.
>
> Sounds useful, thank you for the pointer.
Don't forget, you are now obligated to post another render featuring
this trick so we can see how it really affects things :)
Or else we'll send the RSCops to hunt you down and force you to do all
of your future renders on a TI calculator!
...Chambers
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ben Chambers" <ben### [at] pacificwebguycom> schreef in bericht
news:45d26963@news.povray.org...
>
> Don't forget, you are now obligated to post another render featuring this
> trick so we can see how it really affects things :)
>
> Or else we'll send the RSCops to hunt you down and force you to do all of
> your future renders on a TI calculator!
>
Yeah! Yeah!
Or worse yet, on an abacus!
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ben Chambers wrote:
> Don't forget, you are now obligated to post another render featuring
> this trick so we can see how it really affects things :)
>
> Or else we'll send the RSCops to hunt you down and force you to do all
> of your future renders on a TI calculator!
That's blackmail!
But seriously, I tried it and posting that render is unnecessary.
As was to be expected from the documentation of conserve_energy,
the render result of
"pigment {color rgbt 1} finish {reflection 0.1 conserve_energy}"
turned out absolutely identical to my previous manual fix of
"pigment {color rgbt 0.9} finish {reflection 0.1}",
excepting, of course, the random jitter.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |