POV-Ray : Newsgroups : povray.unofficial.patches : Material{} in mesh2 ? Server Time
2 Sep 2024 00:16:51 EDT (-0400)
  Material{} in mesh2 ? (Message 21 to 30 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 2 Messages >>>
From: Chris Huff
Subject: Re: Material{} in mesh2 ?
Date: 3 Jan 2001 19:37:21
Message: <chrishuff-C7F59B.19385103012001@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
wrote:

> Not as easy as you might think.  The way refraction works is very 
> dependent on all faces of a closed object having the same interior.  
> Remove that property, and you get to rewrite huge parts of the 
> rendering engine.

I was actually thinking more of media, fade_color, etc...faces with 
different iors would work the same way it does now with a union of 
triangles, each with their own interiors.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Ron Parker
Subject: Re: Material{} in mesh2 ?
Date: 3 Jan 2001 19:39:16
Message: <slrn957hho.bhb.ron.parker@fwi.com>
On Wed, 03 Jan 2001 19:38:51 -0500, Chris Huff wrote:
>In article <slr### [at] fwicom>, ron### [at] povrayorg 
>wrote:
>
>> Not as easy as you might think.  The way refraction works is very 
>> dependent on all faces of a closed object having the same interior.  
>> Remove that property, and you get to rewrite huge parts of the 
>> rendering engine.
>
>I was actually thinking more of media, fade_color, etc...faces with 
>different iors would work the same way it does now with a union of 
>triangles, each with their own interiors.

i.e. not at all.  Or at least not in any physically realistic way.

Media has the same issues as refraction, actually: it only gets calculated 
when you hit another face that points to the same interior.  If you never do,
media never happens.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Chris Huff
Subject: Re: Material{} in mesh2 ?
Date: 3 Jan 2001 20:26:11
Message: <chrishuff-D7574D.20274003012001@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
wrote:

> Media has the same issues as refraction, actually: it only gets 
> calculated when you hit another face that points to the same 
> interior.  If you never do, media never happens.

Not quite as bad as the ior problem...you could take the media of the 
faces at each end of the ray segment being sampled, and do something 
like interpolate between the two while sampling, or compute both and 
average their results, etc...with ior, you would have to predict the 
path the ray would take, tracing curved rays...not fun.

But how useful would this be? For one thing, it would only work with 
well-behaved meshes, and it wouldn't correspond to any physical 
property, because there is no "right" way to do it...a better solution 
would probably be to just note in the documentation that individual 
triangles in a mesh can't have interiors. :-)

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Ron Parker
Subject: Re: Material{} in mesh2 ?
Date: 3 Jan 2001 20:33:37
Message: <slrn957knk.bhb.ron.parker@fwi.com>
On Wed, 03 Jan 2001 20:27:40 -0500, Chris Huff wrote:
>Not quite as bad as the ior problem...you could take the media of the 
>faces at each end of the ray segment being sampled, and do something 
>like interpolate between the two while sampling, or compute both and 
>average their results, etc...with ior, you would have to predict the 
>path the ray would take, tracing curved rays...not fun.

But you can't.  POV only knows to calculate media because it thinks it's
leaving an area of one media and entering an area of the other.  There 
is no way to distinguish between the case you mention and the case of 
hitting another object completely enclosed in the first object, so POV
will use the media specs of the first face you hit to color the ray 
between the two faces, and then use the media specs of the second face
to color the ray that goes beyond the second face.  That's just how it
works, and making it work any other way would be very difficult indeed.

There is a legitimate use for different interior statements on different
faces of a triangle union, and you could make the case that it should be
allowed in meshes, but the way it's done now actually is correct, and 
any modification to it would break that correctness.

Picture a cube made of bicubic patches (because I hate triangles.)  Give
each face of that cube the same interior (by assigning a material to the
union of faces; you can't do it any other way.)  Now union another similar 
cube, completely enclosed by the first cube and with a different interior.
You have a single union of bicubic patches with different interiors on 
some faces, and it actually behaves correctly, physically speaking.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Chris Huff
Subject: Re: Material{} in mesh2 ?
Date: 3 Jan 2001 20:48:27
Message: <chrishuff-C6FA32.20495703012001@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
wrote:

> But you can't.  POV only knows to calculate media because it thinks it's
> leaving an area of one media and entering an area of the other.  There 
> is no way to distinguish between the case you mention and the case of 
> hitting another object completely enclosed in the first object,

Ah, I see what you mean...it would only work with well-behaved meshes 
that don't have any portion of the surface of other objects in their 
interior...that is a problem.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Geoff Wedig
Subject: Re: Material{} in mesh2 ?
Date: 4 Jan 2001 08:01:42
Message: <3a547435@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:

> In article <slr### [at] fwicom>, ron### [at] povrayorg 
> wrote:

>> Media has the same issues as refraction, actually: it only gets 
>> calculated when you hit another face that points to the same 
>> interior.  If you never do, media never happens.

> Not quite as bad as the ior problem...you could take the media of the 
> faces at each end of the ray segment being sampled, and do something 
> like interpolate between the two while sampling, or compute both and 
> average their results, etc...with ior, you would have to predict the 
> path the ray would take, tracing curved rays...not fun.

This wouldn't work, or rather, it'd give very strange effects.  If you have
two rays that each impact two different surfaces, but intersect at a point,
there is no guarantee that the value at that point would be anything like
similar.  Which means that from different angles, the object could look
completely different, because the rays calculated would be different.  I'd
think you'd have to have an interpolation based upon *every* point used. 
Maybe possible, but very expensive.

Geoff


Post a reply to this message

From: Geoff Wedig
Subject: Re: Material{} in mesh2 ?
Date: 4 Jan 2001 08:06:39
Message: <3a54755e@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:

> In article <slr### [at] fwicom>, ron### [at] povrayorg 
> wrote:

>> But you can't.  POV only knows to calculate media because it thinks it's
>> leaving an area of one media and entering an area of the other.  There 
>> is no way to distinguish between the case you mention and the case of 
>> hitting another object completely enclosed in the first object,

> Ah, I see what you mean...it would only work with well-behaved meshes 
> that don't have any portion of the surface of other objects in their 
> interior...that is a problem.

Is this correct?  For some reason, I don't think it is, or at least it's
over-simplified.  I've had two media objects, one within the other, and
gotten the media of both in the shared region.  It seems that media is only
calcuated at the bounds of the actual object.  Another object inside the
media object doesn't affect this, quite.  But if the object inside is solid,
then the media should stop there, of course.  If it's totally transparent,
we see the media of the surrounding object.  If it's partially transparent,
the media is affected by that surface, but continues the computation for the
interior of the inside object.  Have I got that right?  If so, then I don't
see the problem with intersecting objects.

Geoff


Post a reply to this message

From: Ron Parker
Subject: Re: Material{} in mesh2 ?
Date: 4 Jan 2001 08:19:07
Message: <slrn958u2c.bsi.ron.parker@fwi.com>
On 4 Jan 2001 08:06:39 -0500, Geoff Wedig wrote:
>Is this correct?  For some reason, I don't think it is, or at least it's
>over-simplified.  I've had two media objects, one within the other, and
>gotten the media of both in the shared region.  It seems that media is only
>calcuated at the bounds of the actual object.  Another object inside the
>media object doesn't affect this, quite.  But if the object inside is solid,
>then the media should stop there, of course.  If it's totally transparent,
>we see the media of the surrounding object.  If it's partially transparent,
>the media is affected by that surface, but continues the computation for the
>interior of the inside object.  Have I got that right?  If so, then I don't
>see the problem with intersecting objects.

You're right, my explanation was oversimplified, to the extent that media 
for both objects is calculated inside the inside object.  But the media 
in the larger enclosing object is actually calculated on three paths: First,
on the path from the outer object to the inner object.  Then, on the path
inside the inner object.  Finally, on the path from the inner object back to
the face of the outer object.  

However, this doesn't change the fact that changing the way media is 
calculated for triangles with different interiors would break existing 
functionality.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Geoff Wedig
Subject: Re: Material{} in mesh2 ?
Date: 4 Jan 2001 08:33:56
Message: <3a547bc3@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:

> On 4 Jan 2001 08:06:39 -0500, Geoff Wedig wrote:
>>Is this correct?  For some reason, I don't think it is, or at least it's
>>over-simplified.  I've had two media objects, one within the other, and
>>gotten the media of both in the shared region.  It seems that media is only
>>calcuated at the bounds of the actual object.  Another object inside the
>>media object doesn't affect this, quite.  But if the object inside is solid,
>>then the media should stop there, of course.  If it's totally transparent,
>>we see the media of the surrounding object.  If it's partially transparent,
>>the media is affected by that surface, but continues the computation for the
>>interior of the inside object.  Have I got that right?  If so, then I don't
>>see the problem with intersecting objects.

> You're right, my explanation was oversimplified, to the extent that media 
> for both objects is calculated inside the inside object.  But the media 
> in the larger enclosing object is actually calculated on three paths: First,
> on the path from the outer object to the inner object.  Then, on the path
> inside the inner object.  Finally, on the path from the inner object back to
> the face of the outer object.  

> However, this doesn't change the fact that changing the way media is 
> calculated for triangles with different interiors would break existing 
> functionality.

I don't see that it'd *break* functionality.  If there's a constant ior,
then everything should be as before.  I do see a number of big problems for
it, though (which I've posted elsewhere)

Geoff


Post a reply to this message

From: Ron Parker
Subject: Re: Material{} in mesh2 ?
Date: 4 Jan 2001 08:53:11
Message: <slrn959028.btu.ron.parker@fwi.com>
On 4 Jan 2001 08:33:56 -0500, Geoff Wedig wrote:
>> However, this doesn't change the fact that changing the way media is 
>> calculated for triangles with different interiors would break existing 
>> functionality.
>
>I don't see that it'd *break* functionality.  If there's a constant ior,
>then everything should be as before.  I do see a number of big problems for
>it, though (which I've posted elsewhere)

You don't need a constant IOR either.  The same example I gave for media,
that of a cube inside another cube, could apply to different IOR as well.
The point is, POV doesn't keep track of what *objects* it is in, it keeps
track of what *interiors* it is in.  Refraction, media, attenuation, and
other interior effects are calculated when the ray hits a given interior
again, without regard for whether it's still in the object.  (This isn't
exactly true, in that if the interiors don't "pair" right it will get
even more hopelessly confused, but it's close enough for our purposes.)
If you change the way POV acts when it encounters a surface with a different
interior from the last one it hit, you invalidate this method of bookkeeping.

If you invalidate this method of bookkeeping, you destroy the existing 
property that allows well-formed unions of polygons, triangles, discs, 
bezier patches, open cylinders and other surfaces of revolution, and other
patch objects to be treated as solid for the purposes of refraction, media,
attenuation, and so on.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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

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