POV-Ray : Newsgroups : povray.binaries.images : 'solid media' human model Server Time
6 Jul 2022 21:17:18 EDT (-0400)
  'solid media' human model (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Kenneth
Subject: 'solid media' human model
Date: 14 Apr 2022 09:20:00
Message: <web.62581d6d2bcfb4164cef624e6e066e29@news.povray.org>
I'm a big fan of rendering 'solid media' objects-- that is, using the object
*as* the media container, then filling it with media so dense that it 'looks'
solid. Depending on the density pattern used, this can produce some
complex-looking objects.

While experimenting with some related stuff, I came up with this simple example.
It's an *old* pure-CSG model that I constructed years ago (and that I tweak from
time to time.) It's made of spheres, cylinders, cones, and superellipsoids, and
is about 1.5-units tall. For such CSG objects, the media result looks *much*
better and more solid when all of the parts are 'merged' together (rather than
as simple unions), and renders faster as well.

These were my media settings:

object{ MY_OBJECT
hollow
texture{pigment{rgbt 1}}
interior{
 media{
 scattering{1, 300 extinction 0.7}
 method 3
 intervals 1
 samples 47, 139
 aa_level 4
               density{
               bozo scale .055 sine_wave frequency 4// Interestingly, the
// ordering of sine_wave and frequency makes a difference-- the visual result
// is different when reversed.
               color_map{[.6 rgb 0][.6 rgb 1]}
                      }
        }
         ...

The samples min,max values are interesting: From tests, I decided to make the
min value about 1/3rd of max. It saves a lot of rendering time, and the media
result looks almost as good as when using the higher value for both min and max.
That's debatable, of course ;-) I probably should have used a 1:2 ratio.

I used two light sources-- one as a 'fill' light, because the shadowed parts of
the media are very dark due to the density.

There are some bright light-streak errors in the upper part of the model; they
are due to the main light_source shooting it rays through what are apparently
some gaps in the model's parts-- and due to all of the parts being merged
together. (The steaks do not appear when the model is made of unions instead.) I
need to find where those gaps are!


Post a reply to this message


Attachments:
Download 'solid_media_merged_csg_model_with_density_pattern.jpg' (684 KB)

Preview of image 'solid_media_merged_csg_model_with_density_pattern.jpg'
solid_media_merged_csg_model_with_density_pattern.jpg


 

From: Kenneth
Subject: Re: 'solid media' human model
Date: 14 Apr 2022 09:35:00
Message: <web.62582264d1523eea4cef624e6e066e29@news.povray.org>
And here's the good ol' Stanford Bunny. This is a mesh2 model made (or
converted) by James Holsenback in October of 2014. It's available here...

https://news.povray.org/povray.binaries.misc/thread/%3C5432afe4%40news.povray.org%3E/

There are some subtle media-related issues with this render; the media probably
just needs more samples.


Post a reply to this message


Attachments:
Download 'solid_media_mesh2_stanford_bunny.jpg' (294 KB)

Preview of image 'solid_media_mesh2_stanford_bunny.jpg'
solid_media_mesh2_stanford_bunny.jpg


 

From: Alain Martel
Subject: Re: 'solid media' human model
Date: 14 Apr 2022 11:07:52
Message: <625838c8$1@news.povray.org>
Le 2022-04-14 à 09:15, Kenneth a écrit :

> 
> These were my media settings:
> 
> object{ MY_OBJECT
> hollow
> texture{pigment{rgbt 1}}
> interior{
>   media{
>   scattering{1, 300 extinction 0.7}
>   method 3
>   intervals 1
>   samples 47, 139
>   aa_level 4
>                 density{
>                 bozo scale .055 sine_wave frequency 4// Interestingly, the
> // ordering of sine_wave and frequency makes a difference-- the visual result
> // is different when reversed.
>                 color_map{[.6 rgb 0][.6 rgb 1]}
>                        }
>          }
>           ...
> 

When using sampling method 3, ONLY the first value of samples is used, 
the second value is always silently ignored.

So, samples 47, 139 is effectively exactly the same as samples 47.

intervals default to 1 and should remain at that value, so, you should 
not set intervals at all with method 3.


Post a reply to this message

From: Kenneth
Subject: Re: 'solid media' human model
Date: 14 Apr 2022 15:15:00
Message: <web.6258715fd1523eea4cef624e6e066e29@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
>
> When using sampling method 3, ONLY the first value of samples is used,
> the second value is always silently ignored.
>
> So, samples 47, 139 is effectively exactly the same as samples 47.
>

Oh! You are correct. (I had to test it myself, just to see.) You have probably
mentioned this in previous posts, but I did not pay good-enough attention. :-(

The way the documentation is presented in "3.7.2.3 Sampling Parameters &
Methods" has always confused me-- as to which media parameters belong to which
media method. It skips around between method 3, then methods 1 and 2, without a
clear (to me) delineation between the three. I guess I'm just reading it wrong.

Then there is this explanation -- which refers only to Method 1, I guess?

"The samples Min, Max keyword specifies the minimum and maximum number of
samples taken per interval. The default values are samples 1,1. The value for
Max may be omitted, in which case the range Min = Max will be used."

So by omitting the 'Max' value, I admit that even at this late date I really
have no idea what is meant by "...the range Min = Max will be used." What range,
if only a single sample value is specified? What does 'range' refer to?


Post a reply to this message

From: jr
Subject: Re: 'solid media' human model
Date: 15 Apr 2022 06:35:00
Message: <web.62594937d1523eeacf1917686cde94f1@news.povray.org>
hi,

"Kenneth" <kdw### [at] gmailcom> wrote:
> I'm a big fan of rendering 'solid media' objects-- ... simple example.
> It's an *old* pure-CSG model that I constructed years ago (and that I tweak from
> time to time.) It's made of spheres, cylinders, cones, and superellipsoids, and
> is about 1.5-units tall. For such CSG objects, the media result looks *much*
> better and more solid when all of the parts are 'merged' together (rather than
> as simple unions), and renders faster as well.

very cool.  the top right reminds me a little of N.Kern's "underwater" sculpture
(late 2018?).  :-)


regards, jr.


Post a reply to this message

From: Thomas de Groot
Subject: Re: 'solid media' human model
Date: 16 Apr 2022 04:06:33
Message: <625a7909$1@news.povray.org>
Op 14-4-2022 om 15:15 schreef Kenneth:
> I'm a big fan of rendering 'solid media' objects-- that is, using the object
> *as* the media container, then filling it with media so dense that it 'looks'
> solid. Depending on the density pattern used, this can produce some
> complex-looking objects.
> 

Ah! One of my favourite pastimes too indeed, either with media (ghosts) 
or with objects. yours is an intriguing media.

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: 'solid media' human model
Date: 16 Apr 2022 04:35:00
Message: <web.625a7e57d1523eea4cef624e6e066e29@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
>
> very cool.  the top right reminds me a little of N.Kern's "underwater" sculpture
> (late 2018?).  :-)
>

Indeed! I must have missed that post, sad to say.
(Here's the link...)
https://news.povray.org/povray.binaries.images/thread/%3Cweb.5c21f42d4e95d6281fbfafc10%40news.povray.org%3E/?ttop=43752
5&toff=400&mtop=425848

His beautiful human statue was apparently made with a much more sophisticated
(non-media) method than my little test, ha. BTW, he posted code there for some
very interesting 'underwater media', worth checking out.


Post a reply to this message

From: Kenneth
Subject: Re: 'solid media' human model
Date: 16 Apr 2022 10:05:00
Message: <web.625ac52bd1523eea4cef624e6e066e29@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

>
> Ah! One of my favourite pastimes too indeed, either with media (ghosts)
> or with objects. yours is an intriguing media.

Thanks. And I might have an interesting alternative to this media technique
(which is kind of off-topic):

Over the past several hours, I have come up with what looks to be a very simple
way to turn any pre-made object into an isosurface. No mathematical wizardry
involved, just using POV-ray's 'object pattern' (in a rather odd way) and
turning it into a function for shaping the isosurface.

I have attached my first test image. (No media involved here, BTW.) I don't want
to post the details yet, because there are some *very* strange quirks that I am
seeing-- not with the technique itself (I hope!), but with how the camera and
lights are interacting with the result.  For example, in this test scene the
final isosurface is centered on the origin, the camera is looking directly into
+ z, and there are two lights:

  color rgb .8*<.3,1,1> // BLUE-GREEN
  translate <20, 40, -20> // in +x

and

  color rgb .8*<1,.2,.2> // RED
  translate <-20, 40, -20> // in -x

These lights cover the model fairly well-- but the vertical 'dividing line'
between the lights' coverage makes no sense. That line is at x=0...but also
varies position as I move the camera. From testing this quirk, it appears that
the position of the lights (relative to that x=0 'vertical plane') causes each
light to illuminate only half of the isosurface(!)-- and on the opposite side.
There also seem to be some 'reversed shadows' on the model. I
have never seen such strange results before. (All of this might be due to the
odd way I had to use the object pattern and its two required colors, but I don't
yet know...)

BTW, this partial render took 27 minutes on my Core-I7 Windows machine (8
cores/16 threads)-- *much* slower than my 'solid media' examples. For the
isosurface, I had to use  accuracy 0.0001 and  max_gradient 20000 (!), and the
result still doesn't look very smooth.

In any case, this stuff is off-topic here, but I wanted to give a preliminary
hint that the general idea *might* work for converting pre-declared objects into
isosurfaces... which can then be further 'disturbed' by other functions. If I
can figure out the reason for the quirks and fix them, I will post the full
details elsewhere.


Post a reply to this message


Attachments:
Download 'object_converted_to_isosurface_test_1_kw.jpg' (33 KB)

Preview of image 'object_converted_to_isosurface_test_1_kw.jpg'
object_converted_to_isosurface_test_1_kw.jpg


 

From: Bald Eagle
Subject: Re: 'solid media' human model
Date: 16 Apr 2022 12:20:00
Message: <web.625aeb87d1523eea1f9dae3025979125@news.povray.org>
The object pigment is a discontinuous function with an infinite
gradient, which might factor into some of what you're seeing.

Usually you have to insert a user-made smooth gradient to join up the 2 regions
of the function (inside:outside).  And then the isosurface method that you are
using works just fine.

I've played with this a few times, and Bill Pokorny has ... objectasiso

http://news.povray.org/povray.binaries.scene-files/thread/%3Cweb.4aae23151285f23f15ee2c550%40news.povray.org%3E/


Post a reply to this message

From: Kenneth
Subject: Re: 'solid media' human model
Date: 16 Apr 2022 14:25:00
Message: <web.625b099ed1523eea4cef624e6e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> The object pigment is a discontinuous function with an infinite
> gradient, which might factor into some of what you're seeing.
>
> Usually you have to insert a user-made smooth gradient to join up the 2 regions
> of the function (inside:outside).  And then the isosurface method that you are
> using works just fine.
>
> I've played with this a few times, and Bill Pokorny has ... objectasiso
>

From 2009! Yeah, I had a sneaking feeling that I was 'rediscovering the use of
fire', ha, and that someone had already done this kind of thing. I guess I
should have done a newsgroup search-- but I was too excited about my 'brand-new
use for POV-ray'  :-P

Infinite gradients, "inserting a user-made gradient", egads!

Actually, I was beginning to think about this in a hazy sort of way, that the
object pattern itself (as turned into a function) was the root of the problem,
because of it's strict 'inside/outside' nature. As-is, it doesn't behave like a
normal function, from what I can tell.

I just downloaded Bill P's files; will definitely give them a read. BTW, I think
this is the first time that I have ever downloaded and un-packed a Unix tar.gz
'thing'. I learn something new every day.

Thanks a bunch!


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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