POV-Ray : Newsgroups : povray.general : Object inside opaque media Server Time
23 Apr 2024 22:10:48 EDT (-0400)
  Object inside opaque media (Message 17 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
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

From: Alain
Subject: Re: Object inside opaque media
Date: 14 Nov 2018 00:07:39
Message: <5bebad9b$1@news.povray.org>
Le 18-11-12 à 22:35, Bald Eagle a écrit :
> 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.
> 
> 

If you don't want or need the media to stretch down to the ground, but 
stop at some altitude, you can have a difference of two spheres.
The outer sphere will determine the top of your cloud layer, and the 
inner sphere will prevent the media from going to low.

With that approach, you can use the onion pattern scaled to the distance 
between the two spheres, and use the phase option to shift the pattern 
if needed.

Next, you can use some alternative wave type, like triangle_wave, 
sine_wave or scallop_wave, to help fine tune the density gradient.


Post a reply to this message

From: Shuffle
Subject: Re: Object inside opaque media
Date: 24 Nov 2018 03:50:01
Message: <web.5bf91007ddef308a994738e60@news.povray.org>
Hi again!

Well, I still don't know exactly what I had wrong because I tried so many
variations, but it works now...

Thanks to everyone who spent some time on my problem :-)


Post a reply to this message

From: Shuffle
Subject: Re: Object inside opaque media
Date: 30 Nov 2018 10:25:01
Message: <web.5c01552cddef308a65118bb30@news.povray.org>
Hi again,

I found the culprit! I was actually doing something wrong, but it wasn't related
to the media density at all.

My problem was simply a "samples" set way too low. I cranked it way up and I now
have a very smooth and satisfying result.

The (big) downside is the rendering time, though. But you can't win them all...


Post a reply to this message

From: Alain
Subject: Re: Object inside opaque media
Date: 30 Nov 2018 15:41:37
Message: <5c01a081@news.povray.org>
Le 18-11-30 à 10:20, Shuffle a écrit :
> Hi again,
> 
> I found the culprit! I was actually doing something wrong, but it wasn't related
> to the media density at all.
> 
> My problem was simply a "samples" set way too low. I cranked it way up and I now
> have a very smooth and satisfying result.
> 
> The (big) downside is the rendering time, though. But you can't win them all...
> 
> 
Did you play with intervals ?
Keep intervals at it's default of 1, and better yet, don't use the 
intervals key word at all.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Object inside opaque media
Date: 1 Dec 2018 02:37:23
Message: <5c023a33$1@news.povray.org>
On 30-11-2018 21:42, Alain wrote:
> Le 18-11-30 à 10:20, Shuffle a écrit :
>> Hi again,
>>
>> I found the culprit! I was actually doing something wrong, but it 
>> wasn't related
>> to the media density at all.
>>
>> My problem was simply a "samples" set way too low. I cranked it way up 
>> and I now
>> have a very smooth and satisfying result.
>>
>> The (big) downside is the rendering time, though. But you can't win 
>> them all...
>>
>>
> Did you play with intervals ?
> Keep intervals at it's default of 1, and better yet, don't use the 
> intervals key word at all.

...and with a bit of testing you can find what the lowest acceptable 
sample value could be for your scene.

-- 
Thomas


Post a reply to this message

From: Shuffle
Subject: Re: Object inside opaque media
Date: 2 Dec 2018 04:20:01
Message: <web.5c03a0e9ddef308a994738e60@news.povray.org>
Alain wrote:
> Did you play with intervals ?
> Keep intervals at it's default of 1, and better yet, don't use the intervals key
word at all.

I did set it at 1 since I use method 3 and I read (here, last line:
http://www.povray.org/documentation/view/3.6.2/421/ ) that's what one should do.
But thanks for the tip ;-)

Thomas de Groot wrote:
> ...and with a bit of testing you can find what the lowest acceptable
> sample value could be for your scene.

That's right. But I will actually set it dynamically along my animation frames
because the right value for out-of-atmosphere is about 500 while deep in the
atmosphere is already good with 20 or so. Thus setting it dynamically with a
function of the altitude will greatly reduce the overall rendering time.


Thanks for your help!
It's great to see that POV's community is still so active after all these years
(I first played with it more than 10 years ago). Keep it going! :-)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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