|
|
Stephen <mcavoysAT@aolDOTcom> wrote:
> I just did a quick test with two Poser Models and I got the difference and
> intersections to render OK. If the meshes are not too big you could post a
> scene.
> --
>
> Regards
> Stephen
I had been through and thought I had the objects closed, but I may have that
wrong. Here it is, with excess code culled:
#include "colors.inc"
#include "glass.inc"
#include "shapes.inc"
#include "textures.inc"
#include "camera-context.inc"
#declare CamPos = <-.28,0,-.96>;
#declare LightPos = <0,0,-25>;
#declare CamDist = 0.5;
#declare HemiWidth = 0.367;
camera {location CamDist*CamPos look_at -1*CamPos }
sky_sphere{pigment {colour White}}
light_source {LightPos White*3.0 parallel}
#declare Gem = mesh2 {
vertex_vectors { 5,
<-HemiWidth,0,-2>, <-HemiWidth,0.722,-1.865>, <HemiWidth,0.367,-1.966>,
<-HemiWidth/3,0.361,-1.932>, 1.15*<-HemiWidth/3,0.361,-1.932>
}
texture_list { 1,
texture{pigment{Col_Glass_Dark_Green}} //pigment{Col_Glass_Dark_Green}}
//0
}
face_indices { 6,
<3,2,1>,0 <0,3,1>,0 <0,2,3>,0 <4,2,1>,0 <0,4,1>,0 <0,2,4>,0
}
}
#declare GemFaceAlt = 1.03;
#declare GemFacer = mesh2 {
vertex_vectors { 6,
<-HemiWidth,0,-2>*GemFaceAlt, <-HemiWidth,0.722,-1.865>*GemFaceAlt,
<HemiWidth,0.367,-1.966>*GemFaceAlt,
<-HemiWidth,0,-2>*(0.25+GemFaceAlt),
<-HemiWidth,0.722,-1.865>*(0.25+GemFaceAlt),
<HemiWidth,0.367,-1.966>*(0.25+GemFaceAlt)
}
texture_list { 1, texture{pigment{Col_Glass_Ruby}} //0
}
face_indices { 8, <0,2,1>,0 <0,1,3>,0 <1,2,4>,0 <2,0,5>,0 <0,5,3>,0
<1,3,4>,0 <2,4,5>,0 <3,4,5>,0
}
}
//#declare Gemstone = object{Gem} //works
//#declare Gemstone = object{GemFacer} //works
#declare Gemstone = union {object{Gem} object{GemFacer}} //works
//#declare Gemstone = intersection {object{Gem} object{GemFacer}} //renders
blank
//#declare Gemstone = difference {object{Gem} object{GemFacer}} //renders blank
object{Gemstone rotate y*120 translate <2,0,0>}//moves this object into a
close-up position
Post a reply to this message
|
|