|
|
> Thanks to all, (Grin) all the information you post here is invaluable...
>
> I went to boxxes trying the same thing and I ran into a snag...
>
>
> // camera position
> camera {
> //location<5,-15,-20>
> location<0,0,-30>
> look_at<0,0,0>
> }
>
>
>
> // light
> light_source {<15,-15,40>
> color rgb<1,1,1> }
> light_source {<-5,15,-40>
> color rgb<1,1,1> }
>
> //horizontal center
> difference {
> //By using the 'difference' I want to weave the horizonal box underneath the
> verticle box
> //This works well when using 'tubes'
> box{
> < -6.0, -1.0, -1.00>,< 6.0, 1.0, 1.00>
> //scale<.5,.5,.5>
> pigment { color rgbf<1,1,1,.0> }
> }
>
> //center black out
> box{
> < -1.2, -1.0, -1.00>,< 1.0, 1.0, 1.00>
> //scale<.5,.5,.5>
> //rotate<0.0,0.0,0.0>
> translate<0.1,0.0,0.0>
> }
> }
NO pigment = Black (rgb 0)
You have coincident surfaces. Make this box a bit larger as this:
...< -1.2, -1.0001, -1.0001>,< 1.0, 1.0001, 1.0001>...
You may alternatively scale it:
scale<1, 1.001, 1.001>
>
>
> //verticle center
> box{
> < -1.0, -7.0, -1.00>,< 1.0, 7.0, 1.00>
> //scale<.5,.5,.5>
> pigment { color rgbf<1,1,1,.0> }
>
> }
> //It works well to this point but if I add any other boxxes...
>
> // if I add these boxes, then I loose the weave effect I had and a blacked out
> box appears.
> // Using tubes, this effect works but when I went to using boxes, I run across
> this problem.
> // I can't seem to find what I am doing wrong
> /*
> //verticle top left
> box{
> < -1.0, -0.0, -1.00>,< 1.0, 6.0, 1.00>
> //scale<.5,.5,.5>
> translate<-5,1,0.0>
> pigment { color rgbf<1,1,1,.0> }
> }
This adds another coincident surface.
>
>
> //verticle bottom right
> box{
> < -1.0, -0.0, -1.00>,< 1.0, 6.0, 1.00>
> //scale<.5,.5,.5>
> translate<5,1,0.0>
> pigment { color rgbf<1,1,1,.0> }
> }
...and yet another.
>
> */
>
>
Coincident surfaces are a common problem. When you encounter 2 or more
surfaces at the same location, it's impossible to know whitch one you
encounter first. This leads to random artefacts caused by the inherent
rounding error from the FPU.
You must always make sure that, in any intersection/difference, there
are NO such surfaces. It also causes problems if the surfaces don't have
the same texture in the case of an union or merge.
Unless you want to actualy have some transparency, it's beter to use
rgb<red, green, blue> instead of rgbf<red, green, blue, filter> and set
filter to zero.
It makes your code cleaner.
If all your components share the same pigment, it's beter to apply it to
the complete CSG object instead of each individual component. This works
particularly well for solid pigments.
Benefit: you don't get black surfaces in the cut parts.
Also, when you combine several objects in a difference, what you see in
the cut part is actualy the texture of the cutting object.
Any untextures object use the default texture unless the whole
difference does have a texture. The default pigment is BLACK.
Alain
Post a reply to this message
|
|