|
![](/i/fill.gif) |
Thomas de Groot <tenDOTlnDOTretniATtoorgedDOTt> wrote:
> On 21-7-2011 14:29, kiwon wrote:
> > Thomas de Groot<tenDOTlnDOTretniATtoorgedDOTt> wrote:
> >> On 21-7-2011 10:16, kiwon wrote:
> >>> #declare myvolume = union {
> >>> box {0, 1 clipped_by {mysurface}}
> >>> mysurface
> >>> }
> >>>
> >>
> >>
> >> Try:
> >>
> >> #declare myvolume = union {
> >> box {0, 1 clipped_by {mysurface}}
> >> object {mysurface}
> >> }
> >
> > Tried, but the same error msg on the "clipped_by" line:
> > Parse Error: Illegal texture or patch in clip, bound or object pattern.
> > The clipped_by doesn't seem to work with mesh2.
> >
> >
> >
> >
> What about:
>
> #declare myvolume =
> intersection {
> box {0, 1}
> object {mysurface}
> }
Doesn't work. It keep only mysurface. The following are a simple test codes
for my purpose:
#version 2.7
global_settings {
assumed_gamma 1.33
max_trace_level 30
}
camera {
right -x*image_width/image_height
location <0.0, 2.2, 2.7>
look_at <0.0, 0.5, 0.5>
}
light_source {
<500, 500, -200>
color rgb 1.3
}
#declare myF = finish {
ambient 0
diffuse 0
phong 1
phong_size 200
reflection {
0.01, 1
fresnel on
}
conserve_energy
}
#declare myT = texture {
pigment { rgbf <0.9,0.3,0.3 0.95> }
finish { myF }
}
#declare myI = interior {
ior 1.33
fade_distance 10
fade_power 2
}
#declare myM = material {
interior{myI}
texture {myT}
}
#declare TestSurf = mesh2 {
vertex_vectors {
4,
<0, 0.5, 0>,
<1, 0.5, 0>,
<0, 0.5, 1>,
<1, 0.4, 1>,
}
face_indices {
2,
<0, 1, 3>,
<0, 3, 2>,
}
inside_vector y
}
#declare TestVol = union {
box{0, 1 clipped_by{TestSurf}}
TestSurf
}
#declare TestObj = object {
TestVol
translate <-0.5, -0.5, -0.5>
material {myM}
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6, 0.7, 1.0>]
[0.7 rgb <0.0, 0.1, 0.8>]
}
}
}
plane {
y, -0.2
texture {
pigment { color rgb <1.0, 0.8, 0.6> }
finish { ambient 0 diffuse 1 }
}
}
object {
TestObj
translate <0, 0.5, 0.5>
}
Post a reply to this message
|
![](/i/fill.gif) |