|
|
Hi all,
This is the first time I've used the isosurface function, and things aren't
behaving as I thought they would.
Using the code below, if I simply render the isosurface, I get a sphere with
the pattern all the way through, which is what I want.
However, when I use the isosurface within a CSG intersection, all (or most)
of the insides disappear, and the effect is similar to simply using a
color_map with filter...which is NOT what I want.
Am I doing something wrong, or is it impossible to achieve the effect I'm
after? I wa under the impression that isosurfaces could be used without
problems in CSG's.
Thanks,
Andy Cocker
-\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--
\|/--\|/--\|/--\|/--\|/--\|/--\|/-
#declare tex1=
texture {
pigment { crackle color_map {[0 rgb 1][0.25 rgb <1,.6,.47>][0.5 rgb
<.2,.7,.9>][0.75 rgb <1,.916,.6>][1 rgb <.2,.7,.9>]}}
finish { ambient 0 }
scale 0.5
}
#declare rad=0.4;
#declare X=
merge {
cylinder { <-2,0,0>,<2,0,0>,rad}
cylinder { <0,-2,0>,<0,2,0>,rad}
sphere {<-2,0,0>,rad}
sphere {<2,0,0>,rad}
sphere {<0,2,0>,rad}
sphere {<0,-2,0>,rad}
sphere {<-2-rad*.5,0,0>,rad/2}
sphere {<2+rad*.5,0,0>,rad/2}
sphere {<0,2+rad*.5,0>,rad/2}
sphere {<0,-2-rad*.5,0>,rad/2}
sphere {<0,0,0>,rad*1.5}
}
#declare Func =
function {
pigment {crackle turbulence 0 color_map {[0 rgb 1][0.25 rgb 0][0.5 rgb
1][0.75 rgb 0][1 rgb 1]}}
}
#declare Main=yes;
#if (Main)
intersection {
isosurface {
function {Func(x, y, z)}
threshold 0.5
contained_by {
sphere {<0,0,0>,4 }//box {<-4,-4,-4>, < 4, 4, 4>}
}
texture {tex1}
scale 0.5
}
object {X texture {tex1}hollow}
rotate z*45}
#end
Post a reply to this message
|
|