POV-Ray : Newsgroups : povray.advanced-users : milky glass problem Server Time
29 Jul 2024 18:23:31 EDT (-0400)
  milky glass problem (Message 11 to 20 of 42)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From:
Subject: Re: milky glass problem
Date: 20 Feb 2002 03:49:52
Message: <3c736330$1@news.povray.org>
> Well, you are trying to simulate an effect over the interior of the
> object, on an object without an interior...maybe you should explain more

Exactly. Similar as normal patterns simulate bumps on a surface which is
modelled absolutley, mathematically smooth.

> clearly what you want to do. The double_illuminate flag will let the
> surface be lit from the other side, which might be enough for your
> purposes.

I'll have a look on this flag. I never heard about it.
The approach I have now is a small amount of filtering. Therefore you might
"see through a bit" which brings up lit objects of the background, giving
the illusion the light comes from the mesh. Doesn't work too bad but in some
cases you can see the contours of objects which I dont really like.

Thanks and regards
SY


Post a reply to this message

From: Ken
Subject: Re: milky glass problem
Date: 20 Feb 2002 09:50:55
Message: <3C73B7CA.B1ECBB35@pacbell.net>

> 
> > Truth is you CAN apply media to the interior of a triangle. The problem
> 
> How? I thought a triangle / smooth_triangle doesn't have interiors?

Au contraire!  Try it and see. Consider the following example and
note the difference in defraction between the triangle on the left
and the defraction of the triangle on the right.

camera{location<0,1,-3>look_at 0}
light_source{<0,5,-20> rgb 1}

triangle{<-1,0,0>,<-.5,1,0>,< 0,0,0>pigment{rgbf .5}interior{ior 1.0}}
triangle{< 0,0,0>,< .5,1,0>,< 1,0,0>pigment{rgbf .5}interior{ior 2.0}}

plane{y,0 pigment{checker color rgb 1 color rgb 0 scale .5}finish{ambient .5}}

-- 
Ken Tyler


Post a reply to this message

From:
Subject: Re: milky glass problem
Date: 20 Feb 2002 10:16:51
Message: <3c73bde3@news.povray.org>
> Au contraire!  Try it and see. Consider the following example and
> note the difference in defraction between the triangle on the left
> and the defraction of the triangle on the right.

Coooolll!
I never tried it since I was so convinced that it doesn't work ( I always
thought only textures are possible on triangles).
Let's see what I can achive with the interior. But I guess it's much better
than the rgbf thing it has now. Very nice chance to adapt it by the level of
detail: triangles in the background are sufficiently described with rgbf,
closer to the camera the interior comes into action.
I really like this.

Thank you very much!
regards
SY


Post a reply to this message

From: Ron Parker
Subject: Re: milky glass problem
Date: 20 Feb 2002 11:06:43
Message: <slrna77ick.g7q.ron.parker@fwi.com>
On Wed, 20 Feb 2002 06:50:50 -0800, Ken wrote:
> 
> 

>> 
>> > Truth is you CAN apply media to the interior of a triangle. The problem
>> 
>> How? I thought a triangle / smooth_triangle doesn't have interiors?
> 
> Au contraire!  Try it and see. Consider the following example and
> note the difference in defraction between the triangle on the left
> and the defraction of the triangle on the right.

Media is different, though, because the ray has to exit the triangle to get
media calculated.  This only happens when the ray hits another object after
having passed through the triangle, so you get media that obscures other
objects but that doesn't exist in areas where the background shows through.
A containing sphere can fix this effect to some extent, though.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Christopher James Huff
Subject: Re: milky glass problem
Date: 20 Feb 2002 11:22:59
Message: <chrishuff-9CC13E.11224520022002@netplex.aussie.org>
In article <3c736330$1@news.povray.org>,


> The approach I have now is a small amount of filtering. Therefore you might
> "see through a bit" which brings up lit objects of the background, giving
> the illusion the light comes from the mesh. Doesn't work too bad but in some
> cases you can see the contours of objects which I dont really like.

The same problem will occur with media, it won't blur the background at 
all. Maybe if you used a normal and ior...look up the postings about 
blurring textures in POV 3.5.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From:
Subject: Re: milky glass problem
Date: 24 Feb 2002 07:53:39
Message: <3c78e253$1@news.povray.org>
I did some tests on the interior stuff of triangles which were first quite
sucessful but the turned out to be useles. :-(

In summary:

.) Interior on triangles only works on single triangles and not on mesh
members. This was the reason why I couldn't work with it previously since I
always built meshes rather than with unions of triangles.

.) However, an union of triangles behaves a bit differently than a mesh
built up from the same triangles.
-Several dropped pixels occur and stay even when using AA which is not the
case in a mesh.
-Additionally POV reports degenerate triangles when using an union although
they are definitvely NOT degenerate as debug output shows clearly. When
using a meshe there is no message although the triangles are identical.
-The borders of the triangles which build up a closed shape do not match
exactly anymore and you can see black lines across the object (along the
triangle borders). Using a mesh solves this.

.) The first tests using scattering media seemed to work fine even for
back-light, until I moved the camera. Scattering media isn't really a
scattering media, it is still some kind of filter. If you look through the
media you only see the effect if there is something behind it, but not if
there is black background. Scattering media would be visible whenever it is
lit by some light-source regardless of the objects behind it. So this is
unforunately useless since I can do filtering already on the texture and
don't need slow media for this.

For now I will have to use standard texture features only. :(
Thanks for your hints anyway!

best regards
SY


Post a reply to this message

From: Ron Parker
Subject: Re: milky glass problem
Date: 25 Feb 2002 13:40:52
Message: <slrna7l19n.84j.ron.parker@fwi.com>

> .) Interior on triangles only works on single triangles and not on mesh
> members. This was the reason why I couldn't work with it previously since I
> always built meshes rather than with unions of triangles.

It will, however, work on the mesh as a whole, won't it?

> -Additionally POV reports degenerate triangles when using an union although
> they are definitvely NOT degenerate as debug output shows clearly. When
> using a meshe there is no message although the triangles are identical.

Meshes silently drop degenerate triangles.  Keep in mind that there's more
ways for a triangle - especially a smooth triangle - to be degenerate than 
just the obvious "collinear vertices" one.

> .) The first tests using scattering media seemed to work fine even for
> back-light, until I moved the camera. Scattering media isn't really a
> scattering media, it is still some kind of filter. If you look through the
> media you only see the effect if there is something behind it, but not if
> there is black background. Scattering media would be visible whenever it is
> lit by some light-source regardless of the objects behind it. So this is
> unforunately useless since I can do filtering already on the texture and
> don't need slow media for this.

I seem to recall having mentioned this in one of my posts on the subject.
If you enclose your entire scene in a big black sphere, it will work as you
might expect.  However, it still won't be "right" because the mesh has an
infinite interior.  The right way to do this, like it or not, is to make
your object actually look like something you could make in real life.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From:
Subject: Re: milky glass problem
Date: 25 Feb 2002 16:39:48
Message: <3c7aaf24@news.povray.org>
Hi,

> It will, however, work on the mesh as a whole, won't it?

Possibly. But this is not of interest since almost each triangle in the mesh
has a different texture and (would have) therefore different interiors.

> Meshes silently drop degenerate triangles.  Keep in mind that there's more
> ways for a triangle - especially a smooth triangle - to be degenerate than
> just the obvious "collinear vertices" one.

Like?

> I seem to recall having mentioned this in one of my posts on the subject.
> If you enclose your entire scene in a big black sphere, it will work as
you
> might expect.  However, it still won't be "right" because the mesh has an

I don't understand why the same effect (called interior and it's media)
behaves completely different on different primitives. In a hollow sphere it
works as expected. If POV allows the same statement in a triangle, I expect
this behavior too. But nope. It's completely different.
See the attached pic for that: It is base on the scene posted by Ken. In the
foreground you see two smooth_triangles. Left one with media interior, right
one has just rgbf texture. The two spheres in the background also have
interior with media. The scene is lit from the background.
As you can see clearly: in case of the triangle the media is only visible if
there is something BEHIND it. This is not the case for the spheres.
Where's the clue?

> infinite interior.  The right way to do this, like it or not, is to make
> your object actually look like something you could make in real life.

Unfortunately this would overload my PC. And possibly even yours. Nature is
more complex than any computer avaliable today could handle.... So I need
some simplification. And in fact we all use simplifications like normals,
textures and all the nice POV features. Normals are used to replace
tiny-detail-modelling (every object should have the SHAPE and not a
mathematical shape with normals stick on it). Similar situation for
textures.

However.... obviously for me it is just not possible to manage. Maybe I can
tune the texture so that it is sufficient.
Thanks,
regards
SY


Post a reply to this message


Attachments:
Download 'media.jpg' (9 KB)

Preview of image 'media.jpg'
media.jpg


 

From: Christopher James Huff
Subject: Re: milky glass problem
Date: 25 Feb 2002 23:36:12
Message: <chrishuff-73F8B7.23360425022002@netplex.aussie.org>
In article <3c7aaf24@news.povray.org>,


> Possibly. But this is not of interest since almost each triangle in the mesh
> has a different texture and (would have) therefore different interiors.

Think about what this object would be like...there is nothing in the 
real world remotely like this. The closest thing would be an ior 
variable over space, which POV is incapable of doing (and which would 
take a huge amount of time if it was capable). Are you sure you need for 
each triangle to have its own interior?


> I don't understand why the same effect (called interior and it's media)
> behaves completely different on different primitives. In a hollow sphere it
> works as expected. If POV allows the same statement in a triangle, I expect
> this behavior too. But nope. It's completely different.

Actually, the problem is that it's the same. Media operates over the 
interior of the object. A sphere has a finite interior, defined by the 
area between the point where the ray enters the sphere and where it 
exits. Triangles don't...after the ray enters the triangle, it is 
inside. Meshes are in the middle, after hitting the mesh, the ray is 
inside until it hits another part of the mesh.


> As you can see clearly: in case of the triangle the media is only visible if
> there is something BEHIND it. This is not the case for the spheres.
> Where's the clue?

There is an object behind it. That gives POV a finite interval to sample 
the media in. In the areas where only the background is visible, the ray 
goes off into infinity, and POV can't sample it. Put a big, hollow 
sphere around your scene, and things will be more predictable, though 
still not realistic...lone triangles aren't very useful for media 
containers.


> Unfortunately this would overload my PC. And possibly even yours. Nature is
> more complex than any computer avaliable today could handle.... So I need
> some simplification. And in fact we all use simplifications like normals,
> textures and all the nice POV features. Normals are used to replace
> tiny-detail-modelling (every object should have the SHAPE and not a
> mathematical shape with normals stick on it). Similar situation for
> textures.

You don't have to duplicate nature entirely, just use closed meshes. 
Closing the mesh shouldn't add that much in complexity.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From:
Subject: Re: milky glass problem
Date: 26 Feb 2002 03:35:18
Message: <3c7b48c6$1@news.povray.org>
Hi,

> real world remotely like this. The closest thing would be an ior
> variable over space, which POV is incapable of doing (and which would

I don't care about IOR. I just want a thing like thick fog. However, same
problem of course.

> take a huge amount of time if it was capable). Are you sure you need for
> each triangle to have its own interior?

Almost. Each group of approx. 100 to 1000 triangles may have the same
interior. But in relation to a total count of several millions of triangles
this is similar to "each triangle".
However, the whole object is one, single, huge mesh (for speed reasons).

> There is an object behind it. That gives POV a finite interval to sample
> the media in. In the areas where only the background is visible, the ray
> goes off into infinity, and POV can't sample it. Put a big, hollow
> sphere around your scene, and things will be more predictable, though
> still not realistic...lone triangles aren't very useful for media
> containers.

I see. So the interior statement is misleading incase of triangles since it
is no interior. It is like a switch to turn on interior calculation if it
hits the triangle until it hit an other object, rather than an interior of
the triangle (which one would think if entering the POV statement).

> You don't have to duplicate nature entirely, just use closed meshes.
> Closing the mesh shouldn't add that much in complexity.

Uhm. It would at least double the amount of triangles an I already have
millions of them.....
We'll see. Would it be enough just to create each triangle twice with a
small offset between them? According to my latest tests I think so.
Fortunately this would have a further advantage (beside the working media
and the doubled amount of data): The objects could have a front and a flip
side with different textures. I once thought about it.


Just one further question:
If I store millions of triangles in a mesh it is not a big problem since
meshes store triangles efficiently and build a hierarchical octree of the
structure. This speeds up tracing.
Will I lose this if I switch to a union of triangles? (since interior
doesn't work on triangles in meshes). Will tracing speed decrease and memory
usage increase??

thanks a lot,
regards
SY


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.