|
|
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> } }
accuracy 0.003
max_gradient 12
pigment { color Red }
finish { ambient 0.5 }
}
intersection {
object { skull_ scale 5.0 }
object { iso_ }
translate 10*z
}
And the code for the spherical shell intersection:
intersection {
object { skull_ scale 5.0 }
difference {
sphere { <0, 0, 0>, 4.8 }
sphere { <0, 0, 0>, 4.2 }
pigment { color Red }
finish { ambient 0.5 }
}
translate 10*z
}
Post a reply to this message
Attachments:
Download 'meshintersect.jpg' (167 KB)
Preview of image 'meshintersect.jpg'
|
|
|
|
> 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
|
|