Boolean Algebra with Solids - part VII
The Coincident-Surface Problems
Problems which may occure with structured textures like wood textures and csg objects:
If we connect shapes by "union" the different parts of the shapes keep their original textures.
If we are modeling shapes by "difference" and/or "intersection" the resulting shape
will have the texture of the shapes that we have cut away right at those parts where they were subtracted.
If we want to have a continuous structured texture on such a csg object, then
the texture should be applied at the end, after combining them by union, difference or intersection, for all combined elements together.
This is not only much more easier to write but also garanties continuousity of the structured texture.
Samples:
Textures of a "difference"
difference{
box { <0,0,0>,<1,1,1>
texture{ My_YellowGreen}
}
sphere{ <0,0,0>,0.5
texture{ My_Yellow }
translate<1,1,0>
}
}// end of difference ------------- |
Interrupted grain
difference{
box { <0,0,0>,<1,1,1>
texture{ My_Wood }
}
sphere{ <0,0,0>,0.5
texture{ My_Wood }
translate<1,1,0>
}
}// end of difference ------------- |
Continuous grain parts without texture, applying a common texture at the end.
difference{
box { <0,0,0>,<1,1,1>
}
sphere{ <0,0,0>,0.5
translate<1,1,0>
}
texture{ My_Wood }
}// end of difference ------------- |
Continuous grain Using "cutaway_textures", The texture of basic shapes will be applied.
difference{
box { <0,0,0>,<1,1,1>
texture{ My_Wood }
}
sphere{ <0,0,0>,0.5
translate<1,1,0>
}
cutaway_textures
}// end of difference ------------- |
|
Textures of a "difference"
Interrupted grain
Continuous grain
|
|