POV-Ray : Newsgroups : povray.binaries.images : Newbie question concerning media Server Time
17 Nov 2024 22:20:08 EST (-0500)
  Newbie question concerning media (Message 1 to 5 of 5)  
From: Florian Pesth
Subject: Newbie question concerning media
Date: 4 Jul 2002 16:50:45
Message: <3d24b525@news.povray.org>
Hi!
I have been playing around a bit with media, and it turned out ugly as
expected ;-). Here is the object source (The random point vector is an
example from the doc, but this can be improved):
sphere_sweep {
cubic_spline
#declare SphereNumber=30;
#declare Radius=0.1;
#declare Index=0;
#declare ActualPoint=<0,1,0>;
SphereNumber
#declare S1 = seed(0);
#declare S2 = seed(12345);
#declare S3 = seed(35369);
#while(Index<SphereNumber)
#declare Point=<2*rand(S1)-1, 2*rand(S2)-1, 2*rand(S3)-1>;
#declare Index=Index+1;
#while(vlength(Point) > 1)
  #declare Point = <2*rand(S1)-1, 2*rand(S2)-1, 2*rand(S3)-1>;
#end
#declare ActualPoint=ActualPoint+Point;
ActualPoint,Radius
#end
texture {pigment { color rgbf <1,1,1,1.1> }}
hollow
interior {
  media {
  intervals 20           // number of intervals used for sampling [10]
  samples 1,1            // minimum and maximum number of samples taken per
interval [1,1]
  confidence 0.9         // statistic parameter higher->better quality [0.9]
  variance 1.0/128       // statistic parameter lower->better quality
[1.0/128]
  ratio 0.9              // distribution between lit and unlit areas [0.9]
  absorption rgb<0,0,0.4>  // absorbing media, block light of specified
color
  emission rgb<0,0.2,0>  // emitting media, emit light of specified color
  method 3               // adaptive sampling
  density {
    agate
    color_map {
      [0.0  color <0,0,0>]
      [1.0  color <1,1,1>]
    }
  }
  }
}
}

Ok the media part is copied from the insert menu and worked ok for a simple
sphere (agate without color_map). I'm wondering what caused the black
artefact in the middle. Ok it's really not intelligent to place a light
source in the center of the object, but I don't expected such artefact.
Please enlighten me.
Best Regards,
Florian


Post a reply to this message


Attachments:
Download 'media.jpg' (28 KB)

Preview of image 'media.jpg'
media.jpg


 

From: Bill DeWitt
Subject: Re: Newbie question concerning media
Date: 4 Jul 2002 17:56:33
Message: <3d24c491@news.povray.org>
"Florian Pesth" <fpe### [at] compuservede> wrote :
>
> I'm wondering what caused the black
> artefact in the middle.

    "Max_Trace_Level"


Post a reply to this message

From: Christopher James Huff
Subject: Re: Newbie question concerning media
Date: 4 Jul 2002 23:46:34
Message: <chrishuff-5FB0F9.22435804072002@netplex.aussie.org>
In article <3d24b525@news.povray.org>,
 "Florian Pesth" <fpe### [at] compuservede> wrote:

> Ok the media part is copied from the insert menu and worked ok for a simple
> sphere (agate without color_map). I'm wondering what caused the black
> artefact in the middle. Ok it's really not intelligent to place a light
> source in the center of the object, but I don't expected such artefact.

Ok, the black artifact is a common "newbie problem"...for speed, POV 
will only trace through a certain number of levels of passing through 
transparent surfaces or bouncing off reflective surfaces before giving 
up and assuming black. This usually only happens after enough surfaces 
that it is unnoticeable, but in your case you need to adjust this number 
with the max_trace_level in global_settings.

The bright media artifacts...it looks like something to do with the fact 
that you are using a sphere_sweep. The solver for that shape can produce 
inaccurate results, especially with cubic_spline. I would suggest trying 
out your media with a cylinder first...maybe a torus, though that can 
also have problems. Maybe make your own "sphere sweep" with a merge of 
cylinders and spheres, using the spline feature.

BTW, your media settings are...odd. I usually use 1 interval and adjust 
samples, POV will generate more intervals if needed. For this, I'd use 
something like "intervals 1 samples 5", and I usually ignore variance, 
confidence, and ratio (which only has an effect on scattering media 
anyway, as I recall). I don't know why someone would use 20 intervals 
with 1 sample each with method 3...

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Florian Pesth
Subject: Re: Newbie question concerning media
Date: 5 Jul 2002 08:48:38
Message: <3d2595a6@news.povray.org>
Thanks a lot.

Florian


Post a reply to this message

From: Florian Pesth
Subject: Re: Newbie question concerning media
Date: 5 Jul 2002 08:59:25
Message: <3d25982d@news.povray.org>
> POV
> will only trace through a certain number of levels of passing through
> transparent surfaces or bouncing off reflective surfaces before giving
> up and assuming black. This usually only happens after enough surfaces
Thanks, I should have noticed that. I knew the problem, but was not aware,
that it could ocure in this case, alright.
> The bright media artifacts...it looks like something to do with the fact
> that you are using a sphere_sweep. The solver for that shape can produce
> inaccurate results, especially with cubic_spline.
I thought about that, too. Maybe it depends on the viewing angle and can be
corrected with a small move of the camera. But that could lead to undesired
results, when I want to animate it, hmm...
> Maybe make your own "sphere sweep" with a merge of
> cylinders and spheres, using the spline feature.
Could that be more accurate?
> BTW, your media settings are...odd. I usually use 1 interval and adjust
> samples, POV will generate more intervals if needed. For this, Just copy
and paste ;-). I have to understand, what all these parameters do. For now
this was just a "quick test". If I changed a value, than more by accident.
> something like "intervals 1 samples 5", and I usually ignore variance,
> confidence, and ratio (which only has an effect on scattering media
Thanks, I will have a look at this values.
> anyway, as I recall). I don't know why someone would use 20 intervals
> with 1 sample each with method 3...
I also don't know ;-).
Thanks for the help,
Florian


Post a reply to this message

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