POV-Ray : Newsgroups : povray.binaries.images : Intersection of solid mesh with isosurface : Re: Intersection of solid mesh with isosurface Server Time
29 Jul 2024 20:24:14 EDT (-0400)
  Re: Intersection of solid mesh with isosurface  
From: Alain
Date: 24 Sep 2013 23:02:29
Message: <52425245$1@news.povray.org>

> It appears that intersecting a solid mesh with an isosurface doesn't work
> properly...is this a known issue, or am I doing something wrong?
>
> I've attached images showing the result of the same solid mesh with an
> isosurface (on the left) and a simple spherical shell created by taking the
> difference of two spheres (on the right).
>
> You can see on the right side the mesh object appears solid, but on the left
> (isosurface) side, it appears hollow...is this just something I'm not going to
> be able to do?
>
> Here's the code for the isosurface intersection:
>
> #declare iso_ =
> isosurface {
>    function{
>      x-f_snoise3d(x, y, z)*5
>    }
>    contained_by { box {<-10,-10,-10>, <10, 10, 10> } }
	all_intersections // Add this
>    accuracy 0.003
>    max_gradient 12
>
>    pigment { color Red }
>    finish { ambient 0.5 }
> }
>
>
> intersection {
>    object { skull_ scale 5.0 }
>    object { iso_ }
>
>    translate 10*z
> }
>

Try adding "all_intersections" in your isosurface definition.

When a ray encounter a surface from the isosuerace, it stop there. In 
your case, the rays can intersect several surfaces that don't contribute 
to the final shape as they are outside the mesh. When this occurs, the 
surface behind those are not evaluated at all. You can't know how many 
such surfaces must be crossed, so you need to add all_intersections to 
ensure that you encounter the correct surface.

You don't need max_intersections or all_intersections if the isosurface 
is transparent as a new ray is traced behind the transparent surface.



Alain


Post a reply to this message

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