![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Is density clipped?
I'm having trouble getting really thick media using a density function which
might be explained if density is getting clipped to 1.
--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Tom Melly <tom### [at] tomandlu co uk> wrote:
> Is density clipped?
I wouldn't be very surprised if it is.
I think POV-Ray clips values to the 0-1 range in some places where it
really shouldn't (as we can see from the transmit/filter fix, where this
clipping was removed).
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote in message news:3d872c33@news.povray.org...
> Tom Melly <tom### [at] tomandlu co uk> wrote:
> > Is density clipped?
>
> I wouldn't be very surprised if it is.
> I think POV-Ray clips values to the 0-1 range in some places where it
> really shouldn't (as we can see from the transmit/filter fix, where this
> clipping was removed).
I could be wrong, but I think that I can confirm that it is clipped. At least,
when I rewrite my function to assume it is clipped at 1, everything starts
behaving as I expect....
I don't really have any strong feelings either way about clipping on density,
but, if it is clipped, it would be nice if it was clearly documented.
(well, it would stop me trying to write functions like:
density_function = function(x,y,z){min(1,x*x+z*z)})
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
It isn't clipped. In my experience, using higher
values amplified the effect, which is what I'd
expect it to do. But I'm not too sure about the
way you use your media, perhaps scattering
has some side-effects due to extinction?
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
> Is density clipped?
>
> I'm having trouble getting really thick media using a density function
which
> might be explained if density is getting clipped to 1.
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Tim Nikias" <tim### [at] gmx de> wrote in message
news:3d87325c$1@news.povray.org...
> It isn't clipped. In my experience, using higher
> values amplified the effect, which is what I'd
> expect it to do. But I'm not too sure about the
> way you use your media, perhaps scattering
> has some side-effects due to extinction?
>
Quite possibly - I'll try and put a test scene together...
Whatever's happening, assuming it's clipped seems to resolve the problem.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3d8728f5$1@news.povray.org>,
"Tom Melly" <tom### [at] tomandlu co uk> wrote:
> Is density clipped?
>
> I'm having trouble getting really thick media using a density function which
> might be explained if density is getting clipped to 1.
Density values aren't clipped, but function patterns are. If your
function goes out of the [0, 1] range it will be clipped, if your color
values go out of that range nothing unexpected will happen. Scale your
function values down with a multiplier and increase the color values to
compensate.
It would be nice if patterns were unclipped by default or if there was a
way to specify "no_waveform" or similar to turn clipping off.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christopher James Huff" <chr### [at] mac com> wrote in message
news:chr### [at] netplex aussie org...
>
> Density values aren't clipped, but function patterns are. If your
> function goes out of the [0, 1] range it will be clipped, if your color
> values go out of that range nothing unexpected will happen. Scale your
> function values down with a multiplier and increase the color values to
> compensate.
>
Aha! Thanks for the info.
My solution is/was pretty similiar to your suggestion:
#declare dens_func = function(x,y,z){max( med_fact, pow(x/cont_rad,2) +
pow(z/cont_rad,2) )}
(where cont_rad is the radius of the spherical media container and med_fact is
the lowest value I want used - then all I had to do was increase the intensity
of the media colour and lower med_fact until I got the effect I wanted)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christopher James Huff" <chr### [at] mac com> wrote
> It would be nice if patterns were unclipped by default or if there was a
> way to specify "no_waveform" or similar to turn clipping off.
I agree.
I added 'unclipping' option in the density_file patch.
http://staff.aist.go.jp/r-suzuki/e/povray/iso/df_body.htm
In case of the current patch, one can use unclipped function
patterns as following.
#declare D3D= pattern{
density_file function 100, 100, 100 {func(x,y,z)}
interpolate 11 // or 10 or 12
}
But "no_waveform" keyword would be better way.
I am now planning to add it in the future patch.
R. Suzuki
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |