|
|
> But if you change the second sphere_sweep point from "0" to "1e-3", most of
> the artifacts go away. I also managed to make the artifacts disappear on the
> first half of your example by adding 1e-3 to your second control point. So
> maybe this is some strange precision error that only occurs with certain
> control point positions?
While I was waiting for answers I continued doing the rest of the
signiature, and I adjusted the z coords of the points that crossed over
and was amazed to see that some of the holes disappeared.
So then I started sightly shifting thedodgy points on the Z axis. Being
an orthographic camera you could hardly see the difference but the maths
obviously could because I mannaged to make it come out fine.
The question is, (and this is the REALLY advanced part) if this is a
precision problem, what part of the sphere_sweep equation is causing it,
and is there someway to check the points for artifact causing values
before you render it?
The final version:
#declare lq=3;
light_source { <30,40,-20> color rgb 1 area_light
<10,0,0>,<0,10,0>,lq,lq orient circular jitter}
light_source { <-50,40,-20> color rgb 1 area_light
<10,0,0>,<0,10,0>,lq,lq orient circular jitter}
light_source { <0,0,-30> color rgb 0.2 area_light
<10,0,0>,<0,10,0>,lq,lq orient circular jitter}
#local ts =2;
#local RS =0.06;
union{
union{
sphere_sweep {
b_spline
20
<-2,0.8,0>,RS*ts
<-1,0.8,RS>,RS*ts
<1,0.8,RS*2>,RS*ts
<1.4,1,RS>,RS*ts
<1.2,1.2,RS>,RS*ts
<1,1,0.00>,RS*ts
<1,-0.8,RS>,RS*ts
<1.06,-1.06,RS>,RS*ts
<1.12,-1,RS*2>,RS*ts
<1.12,-0.5,RS>,RS*ts
<1.5,0,0>,RS*ts
<1.7,-0.5,0>,RS*ts
<1.7,-1.3,0>,RS*ts
<2,-0.7,0>,RS*ts
<2.7,-0.5,0>,RS*ts
<2.2,0,0>,RS*ts
<1.7,-0.5,-RS>RS*ts
<2.2,-1,-RS*2>RS*ts
<2.7,-1,-RS>RS*ts
<3.2,-0,0>RS*ts
tolerance 1.0e-1
}
sphere_sweep{
b_spline
4
<0,2,0.12>,RS*ts
<0,0.9,RS*2>,RS*ts
<0.2,-1.3,0>,RS*ts
<-0.2,-2,0>,RS*ts
}
translate<-2,0,0>
scale 1/ts
translate<-1.6,0.9,0>
pigment{color rgb <1,0,0>}
finish{phong 1 reflection <1,0.4,0.4>}
}
union{
sphere_sweep{
b_spline
5
<-0.5,2,0.12>,RS
<-0.0,0.9,RS*2>,RS
<0.2,0,0>,RS
<0.2,-1.3,0>,RS
<-0.2,-2,0>,RS
}
sphere_sweep{
b_spline
6
<-1,0,0.12>,RS
<-0.5,1.2,RS*2>,RS
<1.3,1,0>,RS
<1.3,0.2,-RS>,RS
<-0,-0.5,-RS*2>,RS
<-1,-0.5,-00.3>,RS
}
sphere_sweep{
b_spline
5
<1.0,0.7,-RS>,RS
<1.2,0.3,-RS*2>,RS
<2.4,0.5,-RS*2>,RS
<2.5,0.5,0.0>,RS
<2.5,0.4,RS>,RS
tolerance 1.0e-1
}
sphere_sweep{
b_spline
19
<1.7,-0.7,0>,RS
<2,-0.7,0>,RS
<2.7,-0.5,0>,RS
<2.2,0,0>,RS
<1.7,-0.5,0.0>RS
<2,-1,RS>RS
<2.7,-1,0.0>RS
<2.95,0.5,0>RS
<2.9,0.7,-RS>RS
<2.85,0.5,-RS*2>RS
<2.9,-1,-RS>RS
<3.1,-1,-0.00>RS
<3.4,-0.8,0.00>RS
<3.9,-0.5,-RS>RS
<3.4,0,-RS*2>RS
<3.0,-0.5,-RS>RS
<3.4,-1,-0.00>RS
<3.9,-1,-0.00>RS
<5,-0.5,-0.00>RS
tolerance 1.0e-1
translate<-1,0,0>
//bounded_by{box{<1.2,0.8,0.3><-1.3,-1.2,-0.3>}}
}
translate<-1,0,0>
pigment{color rgb <1,0,0>}
finish{phong 1 reflection <1,0.4,0.4>}
}
}
-Pete
Post a reply to this message
|
|