POV-Ray : Newsgroups : povray.binaries.images : Why does media carve up my blobs? Server Time
6 Nov 2024 00:27:02 EST (-0500)
  Why does media carve up my blobs? (Message 1 to 2 of 2)  
From: Cousin Ricky
Subject: Why does media carve up my blobs?
Date: 14 Sep 2008 12:45:01
Message: <web.48cd3df6832f1b9885de7b680@news.povray.org>
When I use media on a plane that intersects another object ("intersects" in the
non-CSG sense), there is sometimes a narrow gap at the line of intersection. It
happens with blobs and isosurfaces, but not with spheres, boxes, tori, etc.

What's up with that?

Accuracy mitigates the problem with isosurfaces, but sturm has no effect on
blobs.
___________________________________________________________

global_settings { assumed_gamma 1 }
background { rgb <0.4, 0.6, 1> }
light_source { <1, 1, -1> * 1000 rgb 1 }

camera
{  angle 30
   location <0, 0.5, -2.5>
   look_at 0
   right image_width * x
   up image_height * y
}

blob
{  sphere { <-0.55, -0.3, 0>, 0.925, 2 }
   sturm
   pigment { rgb 1 }
}

sphere
{  <0.55, -0.3, 0>, 0.5
   pigment { rgb 1 }
}

plane { y, -10 pigment { rgb 1 } }

plane
{  y, 0 hollow
   texture
   {  pigment { rgb 1 filter 1 }
      finish { reflection { 0 1 fresnel } conserve_energy }
   }
   interior
   {  ior 1.34
      media { absorption <0.272, 0.046, 0.010> }
   }
}
___________________________________________________________

In the example, a mutilated blob is on the left, and an unaffected sphere is on
the right.


Post a reply to this message


Attachments:
Download 'water_line.png' (42 KB)

Preview of image 'water_line.png'
water_line.png


 

From: Alain
Subject: Re: Why does media carve up my blobs?
Date: 14 Sep 2008 14:31:02
Message: <48cd5866$1@news.povray.org>
Cousin Ricky nous illumina en ce 2008-09-14 12:38 -->
> When I use media on a plane that intersects another object ("intersects" in the
> non-CSG sense), there is sometimes a narrow gap at the line of intersection. It
> happens with blobs and isosurfaces, but not with spheres, boxes, tori, etc.
> 
> What's up with that?
> 
> Accuracy mitigates the problem with isosurfaces, but sturm has no effect on
> blobs.
> ___________________________________________________________
> 
> global_settings { assumed_gamma 1 }
> background { rgb <0.4, 0.6, 1> }
> light_source { <1, 1, -1> * 1000 rgb 1 }
> 
> camera
> {  angle 30
>    location <0, 0.5, -2.5>
>    look_at 0
>    right image_width * x
>    up image_height * y
> }
> 
> blob
> {  sphere { <-0.55, -0.3, 0>, 0.925, 2 }
>    sturm
>    pigment { rgb 1 }
> }
> 
> sphere
> {  <0.55, -0.3, 0>, 0.5
>    pigment { rgb 1 }
> }
> 
> plane { y, -10 pigment { rgb 1 } }
> 
> plane
> {  y, 0 hollow
>    texture
>    {  pigment { rgb 1 filter 1 }
>       finish { reflection { 0 1 fresnel } conserve_energy }
>    }
>    interior
>    {  ior 1.34
>       media { absorption <0.272, 0.046, 0.010> }
>    }
> }
> ___________________________________________________________
> 
> In the example, a mutilated blob is on the left, and an unaffected sphere is on
> the right.
> 
> 
> ------------------------------------------------------------------------
> 
The explanation of the problem is rather technical and long, and is related to 
rounding errors.
The workaround is prety simple:
Scale everything up by 10 or more. Obviously, you then need to reduce your media 
absorption by that same amount. Note, you get the same thing even if you don't 
use any media.
With this sample scene, scaling up by 20 and using antialiasing elliminate the 
artefacts. Without aa, scaling by 200 and you still have a few black pixels.

-- 
Alain
-------------------------------------------------
EVERYTHING HAS A GENDER

You may not know this but many nonliving things have a gender...

A Subway is Male, because it uses the same old lines to pick people up.


Post a reply to this message

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