 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I've been trying too figure out if PovRay renders glass correctly or not.
If you have a glass sphere that is slightly green (like normal window
glass). With most ray tracers and renderers they just map a colour too the
surface of the glass resulting in an even distribution of transparent green
when rendered(like a balloon), with of course refraction added. In real life
the centre of the sphere is actually darker because the light travels a
longer distance through the middle of the sphere than near the edge.
If PovRay doesn't do this, I think it should be easy too make something to
do this: the longer the distance that the light travels through the object,
the more light is absorbed. But I know nothing about programming or
scripting(yet). I don't want to use it only in spheres but in other shapes
as well.
Is there someone that can help me with this?
Thanks
Nekar Xenos
_____________
'E xapis meta sou.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 9 Jan 2001 08:34:39 +0200, "J-Print News" <vir### [at] icon co za>
wrote:
>I've been trying too figure out if PovRay renders glass correctly or not.
To an extent :)
>If you have a glass sphere that is slightly green (like normal window
>glass). With most ray tracers and renderers they just map a colour too the
>surface of the glass resulting in an even distribution of transparent green
>when rendered(like a balloon), with of course refraction added. In real life
>the centre of the sphere is actually darker because the light travels a
>longer distance through the middle of the sphere than near the edge.
In real life glass is green because it absorbs some blue and red. To
achieve the same effect, make your sphere clear white and add a
magenta absorbing media. It behaves in the exact same way as you are
asking. The surface does not need to have a color as it is infinitely
thin (in POV's way of thinking); think of it as coating. You can give
it a finish with reflection and specular highlights, of course.
>If PovRay doesn't do this, I think it should be easy too make something to
>do this: the longer the distance that the light travels through the object,
>the more light is absorbed.
This is exactly what absorbing media does.
You can also use light attenuation which is faster. In official POV it
is not very accurate, I think, but MegaPOV offers an alternative
formula which is real-life based.
Note: I may be thining of light fading here but I don't have Mega
installed yet to check out (did a full reinstall just yesterday).
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks
Is MegaPov free? Where can I get it?
Nekar
Peter Popov <pet### [at] vip bg> wrote in message
news:c7el5tc1ci9jj2lg2mtj4gsn4qk3q81o6c@4ax.com...
> On Tue, 9 Jan 2001 08:34:39 +0200, "J-Print News" <vir### [at] icon co za>
> wrote:
>
> >I've been trying too figure out if PovRay renders glass correctly or not.
>
> To an extent :)
>
> >If you have a glass sphere that is slightly green (like normal window
> >glass). With most ray tracers and renderers they just map a colour too
the
> >surface of the glass resulting in an even distribution of transparent
green
> >when rendered(like a balloon), with of course refraction added. In real
life
> >the centre of the sphere is actually darker because the light travels a
> >longer distance through the middle of the sphere than near the edge.
>
> In real life glass is green because it absorbs some blue and red. To
> achieve the same effect, make your sphere clear white and add
> it a finish with reflection and specular highlights, of course.
>
> >If PovRay doesn't do this, I think it should be easy too make something
to
> >do this: the longer the distance that the light travels through the
object,
> >the more light is absorbed.
>
> This is exactly what absorbing media does.
>
> You can also use light attenuation which is faster. In official POV it
> is not very accurate, I think, but MegaPOV offers an alternative
> formula which is real-life based.
>
> Note: I may be thining of light fading here but I don't have Mega
> installed yet to check out (did a full reinstall just yesterday).
>
>
> Peter Popov ICQ : 15002700
> Personal e-mail : pet### [at] vip bg
> TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
J-Print News wrote:
> Is MegaPov free? Where can I get it?
Yes, and right here:
http://nathan.kopp.com/patched.htm
--
Lance.
http://come.to/the.zone
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <c7el5tc1ci9jj2lg2mtj4gsn4qk3q81o6c@4ax.com>, Peter Popov
<pet### [at] vip bg> wrote:
> Note: I may be thining of light fading here but I don't have Mega
> installed yet to check out (did a full reinstall just yesterday).
It sounds like you mean the fade_color addition...it lets you specify
the color that light passing through the object attenuates to, and adds
an attenuation calculation that is supposed to be more realistic. And it
has nothing to do with light source fading, it is more of a solid-color
media-like effect.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
J-Print News wrote:
> I've been trying too figure out if PovRay renders glass correctly or not.
Yes and no. That answer your question? ;)
(looks like Peter's explained it already)
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
interior
{ fade_distance ...
fade_power ...
}
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a5c3edb@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> interior
> { fade_distance ...
> fade_power ...
> }
And don't forget the fade_color available in MegaPOV.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I just thought of something else. Glass reflects not only on the outside but
on the inside as well. If you look carefully at a window pane at night
you'll notice there is actually a double reflection.
Can this be done in Pov?
Thanks
Nekar
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 09 Jan 2001 12:09:44 -0500, Chris Huff <chr### [at] mac com>
wrote:
>It sounds like you mean the fade_color addition...it lets you specify
>the color that light passing through the object attenuates to, and adds
>an attenuation calculation that is supposed to be more realistic. And it
>has nothing to do with light source fading, it is more of a solid-color
>media-like effect.
I actually mean this:
>:: 7.2. Realistic attenuation
>:: If you set fade_power in the interior of an object at 1000 or above,
>:: MegaPov will use a realistic exponential attenuation function:
>::
>:: Attenuation = exp(-depth/fade_dist)
>::
>:: Colored attenuation does work with this exponential attenuation also.
Sorry abouit not being precise before but I just finished installing.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
J-Print News <vir### [at] icon co za> wrote:
: Can this be done in Pov?
The question would better be "could this be avoided with povray?".
Povray does this by design. Trying to avoid this would be the hard thing
(I can't think of any way right now). Of course there's no reason to avoid
it...
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?putchar('\n'):m)for(_
=(c>>2)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"J-Print News" <vir### [at] icon co za> wrote in message
news:3a5c77fc@news.povray.org...
> I just thought of something else. Glass reflects not only on the outside
but
> on the inside as well. If you look carefully at a window pane at night
> you'll notice there is actually a double reflection.
>
> Can this be done in Pov?
>
I wasn't sure so I tried it. This behaviour as far as I can see is
reproduced by default in both pov and mp. Try the following code:
#include "colors.inc"
light_source{<0,0,0> color rgb<1,1,1>*2 translate <0, 30, 0>}
light_source{<0,0,0> color rgb<1,1,1>*2 translate <0, -30, 0>}
camera{location <5.0, 0.0, -5.0> look_at <0.0, 0.0, 0.0>}
box{
<-10,-10,0>,<10,10,1>
pigment{rgbf 1}
finish{reflection 1/2 ambient 0 diffuse 0}
}
sphere{0, 1 translate<-5,0,-5> pigment{Red}}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a5c7ef2@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> The question would better be "could this be avoided with povray?".
>
> Povray does this by design. Trying to avoid this would be the hard thing
> (I can't think of any way right now). Of course there's no reason to avoid
> it...
In the official version, textures affect both sides of each surface the
same way, so glass panes will have that double-reflection effect
(actually, many more than two reflections, depending on
max_trace_level). MegaPOV allows you to override the texture of the
"interior" side of the surface with the interior_texture feature. This
feature also works with objects like bezier patches or triangles, which
don't have an "interior" but clearly have two sides.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> The question would better be "could this be avoided with povray?".
[snip]
Easy. Define two textures for the glass, one with reflection, and one
with none.
Construct your pane of glass as a CSG difference of two cubes, one taking
a face off the other. Assign the textures, one to each cube, and viola!
You have a pane of glass which has one face which eiother reflects or
does not reflect, depending on how you assigned the textures.
Bye for now,
Jamie.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 10 Jan 2001 20:54:04 -0000, Jamie Davison wrote:
>Construct your pane of glass as a CSG difference of two cubes, one taking
>a face off the other. Assign the textures, one to each cube, and viola!
>You have a pane of glass which has one face which eiother reflects or
>does not reflect, depending on how you assigned the textures.
Maybe, maybe not. There's also TIR, which is solely dependent on the
IOR of the object.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> >Construct your pane of glass as a CSG difference of two cubes, one taking
> >a face off the other. Assign the textures, one to each cube, and viola!
> >You have a pane of glass which has one face which eiother reflects or
> >does not reflect, depending on how you assigned the textures.
>
> Maybe, maybe not. There's also TIR, which is solely dependent on the
> IOR of the object.
True enough I suppose. Then you could always just use a clipped plane as
a single face of a pane of glass, and fake it. (the great maxim of
computer graphics as far as I'm concerned, if it's too tricky to do the
real way, fake it. <grin>)
Although thinking about it, assuming that both textures were identical
apart from the reflection settings (Interior etc.) then surely the non-
reflective face would work to kill any TIR that might be taking place?
I'll try playing with it tomorrow night, as I need to hit the shower and
get to bed since I'm knackered.
Bye for now,
Jamie.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jamie Davison <jam### [at] dh70qd u-net com> wrote:
: Construct your pane of glass as a CSG difference of two cubes, one taking
: a face off the other. Assign the textures, one to each cube, and viola!
: You have a pane of glass which has one face which eiother reflects or
: does not reflect, depending on how you assigned the textures.
This works only when looking from one side of the glass, but not the other
side.
Suppose that we are also seeing the other side of the glass at the same
time through a mirror...
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?putchar('\n'):m)for(_
=(c>>2)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff <chr### [at] mac com> wrote:
: with the interior_texture feature
Is the bug about this feature, which I reported long ago, already fixed?-)
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?putchar('\n'):m)for(_
=(c>>2)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a5d99e2@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> : with the interior_texture feature
>
> Is the bug about this feature, which I reported long ago, already
> fixed?-)
Hmm, probably not...I remember looking at the lighting code, but
couldn't figure it out. It was some problem with filtering textures,
right?
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |