1:merge/intersection/union/difference组合方式的效果,如下图:
merge和union的不同之处,只有当object是透明状态时才会表现出来,如下图可看出这两者的区别
2:difference时,范围要放大一些,不要刚好减掉不需要的部分
下面是两个例子
//bad case 从图中看,该去掉的部分并没有完全去掉,计算机浮点运算的精确度造成的!
difference {
box { -1, 1 pigment { Red } }
cylinder { <0,0,1>, <0,0,-1>,0.7 pigment { Green } }
rotate x*30
}
//good case
difference {
box { -1, 1 pigment { Red } }
cylinder { <0,0,1.1>, <0,0,-1.1>,0.7 pigment { Green } }
rotate x*30
}
3:object的color_map,调整物体的颜色
sphere {
<0, 1, 2>, 2
texture {
pigment {
wood
color_map {
[0.0 color DarkTan]
[0.9 color DarkBrown]
[1.0 color VeryDarkBrown]
}
turbulence 0.05
scale <0.2, 0.3, 1>
}
finish { phong 1 }
}
}
sphere {
<3 1, 0>, 2
texture {
pigment {
wood
color_map {
[0.0 color Red]
[0.5 color Red]
[0.5 color Blue]
[1.0 color Blue]
}
scale <0.2, 0.3, 1>
}
finish { phong 1 }
}
}
sphere {
<0, 1, 0>, 2
texture {
pigment {
DMFWood4 // pre-defined in textures.inc
scale 4 // scale by the same amount in all
// directions
}
finish { Shiny } // pre-defined in finish.inc
}
}
sphere {
<0, 1, 0>, 2
texture {
PinkAlabaster // pre-defined in textures.inc 这是一个完整的texture宏,直接放在texture里就行了
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。