POV-Ray : Newsgroups : povray.newusers : Transparent Objects Become Black Server Time
16 Apr 2024 15:36:21 EDT (-0400)
  Transparent Objects Become Black (Message 18 to 27 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Re: Transparent Objects Become Black
Date: 17 Nov 2021 02:42:35
Message: <6194b26b$1@news.povray.org>
Op 16/11/2021 om 20:57 schreef Kenneth:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>>
>> This brings the following question: What is the difference between
>> fade_power 2 and fade_power 1001, as both, in the docs/wiki, are
>> described as 'exponential'?
> 
> I did a search through old newsgroups too, and found a useful comment by Alain
> posted Dec 18 2017 (with my own comments in brackets, which I hope are correct):
> 
Hey! Thanks Kenneth! This does answer some questions indeed. I never 
paid much attention to the 'issue', and always mindlessly used the 1001 
value when necessary. The query from bubble_person made me wonder 
suddenly, however.

> "For a material [i.e., showing light attenuation inside a translucent object]
> you should use fade_power 1 or fade_power 1001 to get a more realistic result.
> Fade_power 2 is for light attenuation over a distance in empty space." [i.e., in
> POV-ray's 'air' or external space, not *inside* an object.]
> 
> So there is a difference in how and when fade_power is used, apparently.
> 
Good. This is an additional information of importance it seems. If 
confirmed by 'the powers that be', I would be grateful if this info 
could be added to the wiki and/or official documentation.

>>
>> Ive tells us: "note that this "fade_power 1001" statement is an old (and
>> really dirty as it lacks any logic) hack that is part of POV-Ray since
>> ages to turn realistic fade power calculation on."
>>
> 
> I saw that one too. :-) And here's a later comment by Clipka, dated Oct 27 2012:
> 
> "...realistic fading for interiors is exponential rather than
> linear; specify a fade_power value of 1000 or greater (1001 is often
> used, but it doesn't really matter), POV-Ray will then enable
> exponential fading."
> 
> It seems that fade_power 1001 has been used for quite a long time. It's in a
> section of code in a post by Ross on September 11 2003 entitled "glass objects".
> 
He he! I had not come across those two. I believe the comment by Clipka 
should also find its way, one way or another, to the documentation.

> Personally, I have not yet run a comparative test of values <1000 vs. 1000 vs.
> 1001 vs. some higher value, so I can't comment on the expected effects. It seems
> that a value of 1001 *or higher* turns on the 'exponential' fading, not
> specifically 1001. What that exponent *is*, I don't know; I guess it's derived
> by the in-built equation mentioned in the docs:
>              Attenuation = exp(-depth/fade_dist)
> 
Yes, I expect that is the case.

Thanks again for your sleuth work! :-)

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Transparent Objects Become Black
Date: 17 Nov 2021 11:53:12
Message: <61953378$1@news.povray.org>
Kenneth, I have not tested it here, but are the 'voids' really 
necessary? Is it not enough to just add the bubbles to the gel, as both 
have different ior's and do not interact?

See my recent test in p.b.i. with the crystal + huge inclusion.

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Transparent Objects Become Black
Date: 17 Nov 2021 16:10:00
Message: <web.61956cb028696f324cef624e6e066e29@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Kenneth, I have not tested it here, but are the 'voids' really
> necessary? Is it not enough to just add the bubbles to the gel, as both
> have different ior's and do not interact?
>

Apparently, the visual result is exactly the same either way.

Here is my own "poor man's crystal", ha-- just an intersection of three rotated
boxes. The inclusions are simple shapes. I rendered two versions, with the
inclusions as a UNION with the crystal vs. being DIFFERENCED from it as voids. I
see absolutely no visual change, although I was expecting them to look
completely different. It seems that the ior 'effect' depends only on the
*surfaces* that the camera ray sees, not really on any imagined interior
substance of the inclusions.

I have not yet tested my scene to discover how the different iors affect each
other-- i.e., simple addition vs. multiplication of the iors. That's difficult
to tell, visually. I suspect that it's just addition.

-----
BTW, this 'multiple-ior' effect gave me an idea-- which I am experimenting
with-- about creating what looks like *variable* ior within an object, that
changes along its length or depth, etc. The basic idea is to pre-slice the
object into *many* very thin box sections, each with a slightly increasing ior
value, then re-combine the slices to look like the original solid object. Of
course, I am running into coincident-surface problems with all of those slice
recombinations... but I think that's a temporary problem, until I figure out how
best to re-position them. (Should they be separated by tiny 'air' gaps-- or
should they be slightly embedded into each other?) Anyway, my experiments look
promising so far, if a bit...odd ;-)


Post a reply to this message


Attachments:
Download 'crystal_as_union_vs_difference.jpg' (233 KB)

Preview of image 'crystal_as_union_vs_difference.jpg'
crystal_as_union_vs_difference.jpg


 

From: Thomas de Groot
Subject: Re: Transparent Objects Become Black
Date: 18 Nov 2021 07:27:27
Message: <619646af@news.povray.org>
Op 17-11-2021 om 22:06 schreef Kenneth:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Kenneth, I have not tested it here, but are the 'voids' really
>> necessary? Is it not enough to just add the bubbles to the gel, as both
>> have different ior's and do not interact?
>>
> 
> Apparently, the visual result is exactly the same either way.
> 
> Here is my own "poor man's crystal", ha-- just an intersection of three rotated
> boxes. The inclusions are simple shapes. I rendered two versions, with the
> inclusions as a UNION with the crystal vs. being DIFFERENCED from it as voids. I
> see absolutely no visual change, although I was expecting them to look
> completely different. It seems that the ior 'effect' depends only on the
> *surfaces* that the camera ray sees, not really on any imagined interior
> substance of the inclusions.
> 
Yes, that confirms my guess. You didn't say, but I suppose that the 
'union' renders faster than the 'difference'. Additionally, using blobs 
as inclusions, especially if there are many of them, will speed up 
render time.

> I have not yet tested my scene to discover how the different iors affect each
> other-- i.e., simple addition vs. multiplication of the iors. That's difficult
> to tell, visually. I suspect that it's just addition.
> 
I am not sure. It looks like that - independent from ior - the used 
media inside container and inclusions are treated separately. In my 
experiments I do no see any cross-influence, addition or multiplication, 
of colors.

> -----
> BTW, this 'multiple-ior' effect gave me an idea-- which I am experimenting
> with-- about creating what looks like *variable* ior within an object, that
> changes along its length or depth, etc. The basic idea is to pre-slice the
> object into *many* very thin box sections, each with a slightly increasing ior
> value, then re-combine the slices to look like the original solid object. Of
> course, I am running into coincident-surface problems with all of those slice
> recombinations... but I think that's a temporary problem, until I figure out how
> best to re-position them. (Should they be separated by tiny 'air' gaps-- or
> should they be slightly embedded into each other?) Anyway, my experiments look
> promising so far, if a bit...odd ;-)
> 
I am interested to see the result.


@bubble_person: sorry if this discussion 'seems' to ignore you. This is 
not the intention nor the reality; Your original question generated a 
number of issues which we are not sure about, and I think everybody will 
benefit in the end.

-- 
Thomas


Post a reply to this message

From: Alain Martel
Subject: Re: Transparent Objects Become Black
Date: 18 Nov 2021 12:28:20
Message: <61968d34$1@news.povray.org>
Le 2021-11-17 à 16:06, Kenneth a écrit :

> -----
> BTW, this 'multiple-ior' effect gave me an idea-- which I am experimenting
> with-- about creating what looks like *variable* ior within an object, that
> changes along its length or depth, etc. The basic idea is to pre-slice the
> object into *many* very thin box sections, each with a slightly increasing ior
> value, then re-combine the slices to look like the original solid object. Of
> course, I am running into coincident-surface problems with all of those slice
> recombinations... but I think that's a temporary problem, until I figure out how
> best to re-position them. (Should they be separated by tiny 'air' gaps-- or
> should they be slightly embedded into each other?) Anyway, my experiments look
> promising so far, if a bit...odd ;-)
> 
> 

Try clipped_by to make your slices. That way, there will be no internal 
boundaries.


Post a reply to this message

From: Kenneth
Subject: Re: Transparent Objects Become Black
Date: 18 Nov 2021 17:30:00
Message: <web.6196d33228696f324cef624e6e066e29@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:

> >
> > .. Of course, I am running into coincident-surface problems with all of
> > those slice recombinations... but I think that's a temporary problem, until
> > I figure out how best to re-position them.
>
> Try clipped_by to make your slices. That way, there will be no internal
> boundaries.

I didn't even think of clipped_by. Thanks, I'll give that a try.


Post a reply to this message

From: Kenneth
Subject: Re: Transparent Objects Become Black
Date: 18 Nov 2021 17:50:00
Message: <web.6196d6cc28696f324cef624e6e066e29@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
>
> You didn't say, but I suppose that the
> 'union' renders faster than the 'difference'. Additionally, using blobs
> as inclusions, especially if there are many of them, will speed up
> render time.

My current machine is so fast that I didn't even notice a difference in render
times! But I went back and noted the times: 2.067 sec for union, 2.138 sec for
difference. So yes, the union is faster. BTW, I have almost never experimented
with blobs(!); I need to do that. I still find it amazing that they render
faster in a 'difference' than even simple spheres do-- because I assume that
they are far more complex as math constructs.

BTW, I forgot to mention that my previous image post did not include media,
although I plan to experiment with that addition as well.

There is an interesting difference in how POV-ray treats media vs. ior regarding
embedded objects, which might be unexpected to a new user: Embedded objects with
different iors show the ior changes, whereas embedded media objects do NOT show
their different
                    media method...
                    intervals...
                    samples...
For media, the only values recognized for those settings are from the first
object 'surface' that the camera ray 'sees'-- which is the larger container
object. The inner-object values, if different, are ignored, and take on the
outer object values. It might be assumed that the ior and media 'mechanisms' --
both being interior{...} attributes-- would work the same way, but they don't.

> > [Kenneth wrote:]
> > I have not yet tested my scene to discover how the different iors
> > affect each other-- i.e., simple addition vs. multiplication of the
> > iors. That's difficult to tell, visually. I suspect that it's
> > just addition.

This situation is not quite what I originally thought, although it *is* simple
addition, in a different form:  From further tests, I see that the different
iors interact like this example:
              crystal ior (the container): 1.2
              inclusion ior: 1.2
When they are the *same*, the inclusions do not show any 'additional' ior effect
-- like an additional 0.2 for themselves, above the container's 1.2-- but just
the overall ior of 1.2... as if the container and the inclusions are all "made
from the same material" (whether as a union or a difference).  I guess that I
should have expected this-- it seems obvious now-- although I originally thought
that the inclusions would show 1.2 + 0.2 = 1.4.

BTW, I also discovered something interesting along the way:
An ior of 0.0 is the same as ior 1.0. This has actually confused me in the
past-- because 'negative' iors ( < 1.0 and even < 0.0) can be used for
interesting effects, but there is this unexpected  'glitch' at exactly 0.0.


Post a reply to this message


Attachments:
Download 'identical_iors_jpeg_file.jpg' (75 KB)

Preview of image 'identical_iors_jpeg_file.jpg'
identical_iors_jpeg_file.jpg


 

From: Thomas de Groot
Subject: Re: Transparent Objects Become Black
Date: 19 Nov 2021 04:21:03
Message: <61976c7f$1@news.povray.org>
I adapted the script to what I think is a comprehensive scene. I attach 
it here for everybody interested in fairly complex nested interiors. I 
am sure further improvements can be made, which I leave to you.

In p.b.i I post an image of this scene file.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'test-script.pov.txt' (10 KB)

From: Alain Martel
Subject: Re: Transparent Objects Become Black
Date: 19 Nov 2021 13:30:15
Message: <6197ed37$1@news.povray.org>
Le 2021-11-18 à 17:48, Kenneth a écrit :
               inclusion ior: 1.2
> When they are the *same*, the inclusions do not show any 'additional' ior effect
> -- like an additional 0.2 for themselves, above the container's 1.2-- but just
> the overall ior of 1.2... as if the container and the inclusions are all "made
> from the same material" (whether as a union or a difference).  I guess that I
> should have expected this-- it seems obvious now-- although I originally thought
> that the inclusions would show 1.2 + 0.2 = 1.4.
> 
> BTW, I also discovered something interesting along the way:
> An ior of 0.0 is the same as ior 1.0. This has actually confused me in the
> past-- because 'negative' iors ( < 1.0 and even < 0.0) can be used for
> interesting effects, but there is this unexpected  'glitch' at exactly 0.0.
> 
> 

The refraction depends on the ratio of the iors on each sides of the 
surface. What you see is what is expected and observed in nature.

I've experienced with negative ior. That makes the surface behave as if 
it had
finish{ reflection 1 }

When you think about it, it makes sense. The ior is the ratio of the 
speed of light in a vacuum divided by the speed of light in a medium.
A negative ior demand a negative speed of light in that medium.


Post a reply to this message

From: Kenneth
Subject: Re: Transparent Objects Become Black
Date: 21 Nov 2021 16:15:00
Message: <web.619ab60d28696f324cef624e6e066e29@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
>
> I've experienced with negative ior. That makes the surface behave as if
> it had
> finish{ reflection 1 }
>

That's an interesting observation. With my own tests here, I was not sure a
'negative' ior was having any effect when lower than 0.5-- until I re-positioned
the crystal and camera 'just so'. Then I could see at least my sphere inclusion
subtly changing its appearance as the ior decreased. But as a practical matter,
the more negative it goes, the less of a visual change there is.


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.