POV-Ray : Newsgroups : povray.general : overlapping independent media containers objects Server Time
1 Nov 2024 07:28:39 EDT (-0400)
  overlapping independent media containers objects (Message 1 to 9 of 9)  
From: rodv92
Subject: overlapping independent media containers objects
Date: 31 Mar 2017 13:35:01
Message: <web.58de932631d13de41d2ae3900@news.povray.org>
Hello group, still working on my upcoming demo... (cannot shed details, it is a
rule of the demoscene ;... besides that's it is a model of a rocket launch)

So the fact is that i have to separate containers :

one simple sphere with a egg shape based on Mr Lohmueller flame media.
the other are two ellipsoids isosurface containers (to avoid clean bounding of
media at all costs) with scattering to simulate unclean exhaust...

In the axis of the <camera_pos> <look at> vector everything is nice and clean,
the  fumes get flashed away by the intense light of the clean exhaust and you
can see through. (by direct illumination from the emission media)

However at the sides there is probably an overlap of the two containers (do not
forget, different containers, different interiors and different media)
I get a nasty artefact of darkening/undarkening with a sometwhat cylindrcal
overprint.

so my question is : do i have to make absolutely sure that the two objects with
media do not overlap in space ?
Or is there any trick i am missing ?

PS : there is a point light inside the glowing exhaust : this in order to
magnify the shadow of the emission media without boosting the emission too much,
but it has the media_interaction off modifier (in order to make it less cpu
intensive)

I can provide some more data if necessary.

Have a nice day !

Rodrigo.


Post a reply to this message

From: Kenneth
Subject: Re: overlapping independent media containers objects
Date: 31 Mar 2017 14:50:00
Message: <web.58dea3d5c6a36aac883fb31c0@news.povray.org>
"rodv92" <nomail@nomail> wrote:
>
>
> However at the sides there is probably an overlap of the two containers (do not
> forget, different containers, different interiors and different media)
> I get a nasty artefact of darkening/undarkening with a sometwhat cylindrcal
> overprint.
>

I haven't worked with media in awhile, but I think the problem is because of
your *different* media etc. in each transparent container-- and possibly not
enough 'samples' in any of your media.

When media objects overlap, POV-Ray does not 'combine' the different medias (if
I remember correctly.) Instead, when a 'camera ray' strikes the closest media
CONTAINER in the overlappiong area (i.e., the container surface closest to the
camera), the media *there* is the only one that is rendered-- along with its own
particular samples, intervals, etc. The overlapping-container artefacts come
about when the camera rays cross the *borders* of the different containers, in
the 2-D image plane. The camera then sees a different media (with different
samples, intervals, etc.) That difference creates a sort of visible line between
the containers.

My own solution to the problem has been to give *all* the overlapping media
containers the same (high) number of samples, intervals, etc. (but not different
media type or density(?) I don't remember if *that* is required.) This usually
minimizes the artefacts, at least.

I don't remember if using a CSG 'merge' of all the containers helps with this,
or what possible problems a merge might cause.


Post a reply to this message

From: clipka
Subject: Re: overlapping independent media containers objects
Date: 31 Mar 2017 15:08:24
Message: <58dea928$1@news.povray.org>
Am 31.03.2017 um 20:45 schrieb Kenneth:

> When media objects overlap, POV-Ray does not 'combine' the different medias (if
> I remember correctly.)

You don't ;)
POV-Ray does "add" media together wherever media containers overlap.

You're right about media /settings/, such as sampling method, number of
samples etc.


> I don't remember if using a CSG 'merge' of all the containers helps with this,
> or what possible problems a merge might cause.

I have a hunch that a `merge` of media containers would screw things up
big time; to properly handle overlapping media containers, POV-Ray needs
to detect each and every surface of each and every media container; a
`merge` suppresses detection of any of its children's surfaces that are
inside sibling objects.


Post a reply to this message

From: Kenneth
Subject: Re: overlapping independent media containers objects
Date: 31 Mar 2017 15:20:00
Message: <web.58deab42c6a36aac883fb31c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 31.03.2017 um 20:45 schrieb Kenneth:

>
> You don't ;)
> POV-Ray does "add" media together wherever media containers overlap.
>
Oops!  Thanks ;-) I need to go back over all of my older media-container
experiments, to refresh my poor memory. It was all so *clear* to me back then...


Post a reply to this message

From: rodv92
Subject: Re: overlapping independent media containers objects
Date: 31 Mar 2017 17:30:01
Message: <web.58dec94bc6a36aac1d2ae3900@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> clipka <ano### [at] anonymousorg> wrote:
> > Am 31.03.2017 um 20:45 schrieb Kenneth:
>
> >
> > You don't ;)
> > POV-Ray does "add" media together wherever media containers overlap.
> >
> Oops!  Thanks ;-) I need to go back over all of my older media-container
> experiments, to refresh my poor memory. It was all so *clear* to me back then...

Thanks all,

I will play with intervals.
However it will probably cost me quite a lot in CPU.
So i will try first to play with the luminosity / extinction of the different
media and try to make them comparable in this respect to minimise the effect.

I thought too of making the emitting media contained in a somewhat "rough
sphere" with an isosurface ellispe with a f_noise3d perturbation too see if it
helps.

I will get back with the results.

Bye.


Post a reply to this message

From: clipka
Subject: Re: overlapping independent media containers objects
Date: 1 Apr 2017 03:31:53
Message: <58df5769$1@news.povray.org>
Am 31.03.2017 um 23:25 schrieb rodv92:

> I will play with intervals.
> However it will probably cost me quite a lot in CPU.

Don't.

Stick to sampling method 3 and a single interval instead.


Post a reply to this message

From: Alain
Subject: Re: overlapping independent media containers objects
Date: 1 Apr 2017 12:38:54
Message: <58dfd79e@news.povray.org>

> "Kenneth" <kdw### [at] gmailcom> wrote:
>> clipka <ano### [at] anonymousorg> wrote:
>>> Am 31.03.2017 um 20:45 schrieb Kenneth:
>>
>>>
>>> You don't ;)
>>> POV-Ray does "add" media together wherever media containers overlap.
>>>
>> Oops!  Thanks ;-) I need to go back over all of my older media-container
>> experiments, to refresh my poor memory. It was all so *clear* to me back then...
>
> Thanks all,
>
> I will play with intervals.
> However it will probably cost me quite a lot in CPU.
> So i will try first to play with the luminosity / extinction of the different
> media and try to make them comparable in this respect to minimise the effect.
>

DON'T play with intervals, unless you want your render time to skyrocket !

Use sampling method 3, NEVER EVER touch intervals, play with samples.
intervals 10 samples 1,1
is MUCH alower than
samples 100

Your containers can overlap visually, but you need to ensure that there 
is some gap between them.
The other option would bbe to use a single container for all of your medias.


Post a reply to this message

From: Kenneth
Subject: Re: overlapping independent media containers objects
Date: 1 Apr 2017 15:20:01
Message: <web.58dffc97c6a36aac883fb31c0@news.povray.org>
Clipka and Alain are correct-- sampling method 3 (with its default interval
count of 1) is the right way to do it. Then choose a *high* samples count. This
is the way I've always done it as well. (Sorry if I confused you earlier, about
using a higher number of intervals.)

Here's another interesting point to consider: Let's say you have several
concentric spheres as different media containers (each sphere smaller than the
previous one.) They can all have different media types and density, and they
*do* mix visually, as Clipka pointed out. But the largest enclosing sphere
(which is the one that a camera 'ray' sees first) actually sets the number of
media samples and intervals for the entire group. In other words, if you give
the largest sphere 50 samples (for example), and the smallest inner sphere 500
samples, the entire group will be working with only 50 samples. (In my own
scenes like this, I actually leave out the inner objects' samples and intervals
altogether, as they will be overridden anyway.)

I don't know if this situation also applies to the media 'method' as well (for
example, method 2 vs. method 3, if you happen to use different methods for the
different overlapping objects.)


Post a reply to this message

From: clipka
Subject: Re: overlapping independent media containers objects
Date: 1 Apr 2017 15:24:36
Message: <58dffe74@news.povray.org>
Am 01.04.2017 um 21:16 schrieb Kenneth:

> Here's another interesting point to consider: Let's say you have several
> concentric spheres as different media containers (each sphere smaller than the
> previous one.) They can all have different media types and density, and they
> *do* mix visually, as Clipka pointed out. But the largest enclosing sphere
> (which is the one that a camera 'ray' sees first) actually sets the number of
> media samples and intervals for the entire group. In other words, if you give
> the largest sphere 50 samples (for example), and the smallest inner sphere 500
> samples, the entire group will be working with only 50 samples. (In my own
> scenes like this, I actually leave out the inner objects' samples and intervals
> altogether, as they will be overridden anyway.)
> 
> I don't know if this situation also applies to the media 'method' as well (for
> example, method 2 vs. method 3, if you happen to use different methods for the
> different overlapping objects.)

It does apply.


Post a reply to this message

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