POV-Ray : Newsgroups : povray.general : Object inside opaque media Server Time
1 May 2024 18:06:23 EDT (-0400)
  Object inside opaque media (Message 11 to 20 of 26)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 6 Messages >>>
From: Thomas de Groot
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 11:43:11
Message: <5be85c1f$1@news.povray.org>
On 11-11-2018 15:26, Shuffle wrote:
> Ok, many thanks everyone for your replies, I'll try to answer to all of them,
> but most suggestions don't apply to my problem or have already been tried... so
> I hope to also clarify what I actually need.
> 
> 
>> Thomas de Groot: The following is about the best I can get
> Thank you for your time and efforts :-) but unless you used some special
> rendering options, when I rendered it the atmosphere is way too bright and the
> sphere can still be distinctly seen through the media.
> 

> More ideas welcome :-)
> 
> PS: this is a professional need, so unfortunately I cannot let go...
> 
> 

I have been thinking since. In RL, atmosphere is always more or less 
transparent. What you need is a second media to simulate a cloud layer. 
I shall look into that tomorrow.

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 12:35:06
Message: <web.5be86811ddef308a765e06870@news.povray.org>
"Shuffle" <shu### [at] gmailcom> wrote:

> > Bald Eagle: Have a look at:
http://news.povray.org/povray.binaries.animations/thread/%3Cweb.5b32f0c22078c5ce458c7af
e0
> %40news.povray.org%3E/
> This is interesting, especially because I don't use POV 3.8 so I had a glimpse
> at new features ;-)
> I downloaded alpha9893777 and proceeded to render the (50 frames) animation: at
> no moment is the grey plane invisible behind or inside the media. I understand
> this is not the purpose of that scene, and the hidden sphere is actually hidden,
> but my need is to have an actually visible object, only hidden because of the
> density of the media.

The purpose there was to show how you can use 3 different functions to control
the color, by having a separate function for r, g, and b, and then adding them
together.

> Basically, what I want is exactly what happens in nature with fog: the objects
> are always there, but as you increase the distance to them, you can't see them
> anymore because the droplets absorb their light and diffuse that of the sun
> instead.

> Maybe I do not understand what you mean, but this does not change the fact that
> a constant density of 1 still allows seeing the sphere through the media. It is
> not a matter of color itself, I can pretty much set any color I want, including
> a color_map for the density, the object inside is always visible.
>
> What I would probably need are densities higher than 1, or something that mimics
> it.

YES.

>But since densities are looped in the 0-1 range, this is not possible with
> the current implementation of density, unless I missed something...

Don't count me as an expert - media can be, and usually is, a complicated thing
to use, especially properly/accurately.

http://www.povray.org/documentation/view/3.6.1/413/

"Imagine media as a density of particles, you specify 100 particles per cubic
pov-unit. If we scale a 1 cubic pov-unit object to be twice as big in every
direction, we will have a total of 800 particles in the object. The object will
look different, as we have more particles to look through. Yet the objects
density is still 100 particles per cubic pov-unit. In media this "particle
density" is set by the color after emission, absorption, or in the scattering
statement"

> PS: this is a professional need, so unfortunately I cannot let go...

I think what you need to do is a calibration scene, much like doing a
calibration exposure in the Zone System for making black & white prints.

Stretch a box across the screen, and define a wedge shape to hold your media.
That way you go from 0 - 100% in terms of "obscurement".
Then you can fiddle with the "density" of the media to find out at what point
you can no longer see through it.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 12:44:39
Message: <5be86a87$1@news.povray.org>
On 11-11-2018 17:43, Thomas de Groot wrote:
> On 11-11-2018 15:26, Shuffle wrote:
>> Ok, many thanks everyone for your replies, I'll try to answer to all 
>> of them,
>> but most suggestions don't apply to my problem or have already been 
>> tried... so
>> I hope to also clarify what I actually need.
>>
>>
>>> Thomas de Groot: The following is about the best I can get
>> Thank you for your time and efforts :-) but unless you used some special
>> rendering options, when I rendered it the atmosphere is way too bright 
>> and the
>> sphere can still be distinctly seen through the media.
>>
> 
>> More ideas welcome :-)
>>
>> PS: this is a professional need, so unfortunately I cannot let go...
>>
>>
> 
> I have been thinking since. In RL, atmosphere is always more or less 
> transparent. What you need is a second media to simulate a cloud layer. 
> I shall look into that tomorrow.
> 

Faster than light ;-)

I include a scene with a cloud layer. Please play around with 
MediaScale1 and MediaScale2 as those determine the aspect/thickness of 
the media.

I do not use any special rendering options. See image in p.b.i.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'planet media_test.pov.txt' (3 KB)

From: clipka
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 15:14:12
Message: <5be88d94$1@news.povray.org>
Am 11.11.2018 um 15:26 schrieb Shuffle:

> Basically, what I want is exactly what happens in nature with fog: the objects
> are always there, but as you increase the distance to them, you can't see them
> anymore because the droplets absorb their light and diffuse that of the sun
> instead.

Technically, that's actually not true: The reason that you cannot see 
objects in dense fog is not because the light is absorbed completely - 
the light from the object falls off logarithmically, so at any finite 
distance you'll still get a finite non-zero portion of direct light from 
the object.

The reason you cannot see objects in dense fog is because the object's 
light gets too dim compared to scattered light.

>> Alain: Try adding some absorbing media.
> That's what I did, including in the scene I posted in my original message. It
> does no good: no matter what combinations of absorption and scattering, you can
> always see the object through the media. Emission is obviously not an option,
> because the unlit hemisphere must stay black.

You may have to crank up the absorption even more.

If even madly high values give you no success, there may be an issue 
with the sampling of the media; so toying with the quality settings may 
also be worth a try.


> not a matter of color itself, I can pretty much set any color I want, including
> a color_map for the density, the object inside is always visible.
> 
> What I would probably need are densities higher than 1, or something that mimics
> it. But since densities are looped in the 0-1 range, this is not possible with
> the current implementation of density, unless I missed something...

Cranking up the colour values is what you want.


Post a reply to this message

From: Bald Eagle
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 15:45:00
Message: <web.5be89453ddef308a765e06870@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> I think what you need to do is a calibration scene, much like doing a
> calibration exposure in the Zone System for making black & white prints.

Here's something along the lines of what I was thinking, just to show the
concept. I haven't altered the media parameters (as Alain will point out) from
the example in the wiki, except for changing it to absorption of red x 10




#version 3.8;
global_settings {assumed_gamma 1.0}

#include "colors.inc"

camera {
 location <0, 0, -12.0>
 look_at 0
 //angle 30
}

light_source {<0, 2, -20> White}

#declare Container_T= texture {
   pigment {rgbt <1,1,1,1>}
   finish {ambient 0 diffuse 0}
}

#declare Scale=2;
// linear prism in y-direction: from .. ,to ..,number of points (first = last)
prism { -1.00,  1.00 , 4
       <-5.00,  0.00>, // first point
       <-5.00, -1.00>,
       < 5.00,  0.00>,
       <-5.00,  0.00>  // last point = first point !!!

   hollow
   texture {Container_T}
   interior {
      media {
         intervals 1
         samples 1,1
         absorption <10, 0, 0>
      }
   }
   translate <-2.1,0,0>
}



box {<-8, -1, 0.5>, <8, 1, 1> pigment {Red}}


Post a reply to this message

From: clipka
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 16:08:59
Message: <5be89a6b@news.povray.org>
Am 08.11.2018 um 17:02 schrieb Shuffle:

> What I actually try to achieve is to model a planet with a dense atmosphere.
> Like Venus or, in my case, Saturn's moon Titan. The camera will approach the
> body and dive into the atmosphere, revealing the terrain only at lower
> altitudes.
> You can get a pretty good idea of what I'm trying to achieve by following this
> link: https://www.youtube.com/watch?v=9L471ct7YDo&t=55s

I've only found time now to completely read your original post.

I can guarantee you that in order to achieve what you're shooting for 
you /will/ have to cheat.

POV-Ray provides two mechanisms to deal with scattering material:

- The older mechanism, "media", only creates realistic results for cases 
where the mean free distance (the average distance a light ray travels 
before being scattered or absorbed) is larger than the distance between 
camera and object. (*)

- The newer mechanism, "subsurface light transport", only creates 
realistic results for cases where the mean free distance is 
significantly smaller than the dimensions involved. (Besides, it 
requires the material to have a clear-cut surface.)

In a camera dive into the atmosphere of a densely clouded planet down to 
the surface, you are transitioning from the regime where the mean free 
distance is comparatively small to the regime where it is comparatively 
large.


The easiest solution is probably to create two entirely separate 
animation sequences: One that takes you from orbit into dense atmosphere 
(with the planet invisible), and another one that takes you from dense 
atmosphere down to the surface (with the sky invisible).

The trick then will be to match the colour of the first animation's last 
frame to the second animation's first frame - or simply do a slow fade 
between the two animations.


(*) The problem is not so much that you can't use scattering media to 
obscure objects inside it - you can, all you have to do is crank up the 
density / colour high enough. The true problem is the scattering effect, 
which will go bonkers at such high settings, even if you mess with the 
extinction setting and/or add extra absorbing media.


Post a reply to this message

From: Stephen
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 17:51:04
Message: <5be8b258$1@news.povray.org>
On 11/11/2018 21:09, clipka wrote:
> The easiest solution is probably to create two entirely separate 
> animation sequences: One that takes you from orbit into dense atmosphere 
> (with the planet invisible), and another one that takes you from dense 
> atmosphere down to the surface (with the sky invisible).


I think this addresses the nub of the problem.
Because what we want to do is compress what, in real life, would take 
quite some time, to a video short enough to hold our attention and have 
a reasonable file size.
As Tom Lehrer implied in "Lobachevsky"*. The answer is to cheat.
I think it can be done with just textures, transparency and the right 
transitions. But as my wife is getting out of hospital this week. I 
don’t think that I’ll have time to work on the transitions.

*
For those too young to remember. ;)
https://www.youtube.com/watch?v=gXlfXirQF3A


-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Object inside opaque media
Date: 11 Nov 2018 19:01:15
Message: <5be8c2cb$1@news.povray.org>
Le 18-11-09 à 03:09, Thomas de Groot a écrit :
> On 9-11-2018 9:01, Thomas de Groot wrote:
>>              absorption srgb <0.1, 0.3, 0.5>*10
> 
> better to also use:
>              absorption srgb <0.1, 0.3, 0.5>*10/Scale
> 
> 

srgb <0.1, 0.3, 0.5> is lighter than rgb <0.1, 0.3, 0.5>
srgb <0.1, 0.3, 0.5>*10 is much darker than rgb <0.1, 0.3, 0.5>*10

In both cases, the resulting hue with srgb will get shifted toward the red.


Post a reply to this message

From: Stephen
Subject: Re: Object inside opaque media
Date: 12 Nov 2018 18:15:28
Message: <5bea0990$1@news.povray.org>
On 11/11/2018 14:26, Shuffle wrote:
> Ok, many thanks everyone for your replies, I'll try to answer to all of them,
> but most suggestions don't apply to my problem or have already been tried... so
> I hope to also clarify what I actually need.
> 
>> Stephen: Have you tried to use the transmit value to control the transparency of
the atmosphere?
> This is not applicable because, for any non-zero transmit value, there will be a
> sudden change when the camera goes from outside to inside the media container.
> Also, the object inside the media should not become visible as soon as we enter
> the atmosphere, only at lower altitudes, as in the video I linked. So even with
> a transmit set by a function of the distance to the atmosphere boundary, this
> would still not be what I need.
> 

Clipka is right in saying a two shot approach is the way to go.

Media can be time consuming. Do you have your heart set on using it?
If you want or need to use media. I would try to make a density map that 
had zero density from the centre to the surface of the planet and using 
a spherical gradient, from the surface of the planet to the limit of the 
atmosphere. Or you could cheat and difference a sphere around your 
camera. Then fill that with a less dense media.


After making the video below. Where the whole murky atmosphere gets more 
transparent the closer you get to the planet. I think that using a one 
shot approach would take too long to get to the point of interest and 
the file size would be too large. Then there is the problem with the 
resolution of the point of interest at different heights. So for the 
close to land shot. I would create a “Sphere of Visibility” around your 
camera and have the material or texture be densest at the surface and 
zero in the centre. If you use transparency you could use a colour map 
as a density curve.



https://youtu.be/gqVw5K9ePyU




-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Object inside opaque media
Date: 12 Nov 2018 22:40:01
Message: <web.5bea4685ddef308a765e06870@news.povray.org>
I think perhaps there's no reason one has to stick to a static construct with
the only change being the camera location.

Since for every animation frame the scene can change, perhaps the way to do it
in one shot is to dynamically adapt the media density to what that frame
requires to achieve the desired look.

So graph out what you want in terms of visibility, and then based on the
distance between the camera and the planet's surface, change the density to fit
your needs at that instant.

Similar to what others have proposed, you could define your visibility as a
spline, interpolate, and use the camera distance to the planet to index a
density value.

There's probably other ways to do it, but I'd say the first step would be to
story-board out the animation and use that as a guide to define very detailed
requirements for key points in the animation, and then see what the best method
to transition between those points is likely to be in terms of time, complexity,
and quality of end result.

Just my take on how I'd likely approach this.


Post a reply to this message

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

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