![]() |
|
---|
COMBINING OBJECTS USING CSG
The POVRAY raytracing program supports a special feature, which can be applied to most of the primitives we've so far heard about. This feature is called Constructive Solid Geometry (CSG). The question, what CSG is all about, will be the main topic in the following sections. |
The CSG-primer
· »Constructive Solid Geometry« sounds mighty complex, but you can chill out - it is not! It is a very useful thing, which is used to create new shapes out of existing objects or which allows you to do special operations with standard-objects (making holes etc.). · All in all, there are four different types of CSG- operations: A - union, B - merge, C - intersection and D - difference. All four types have one thing in common: they are based upon logical operations (or »Boolean operations« after the late mathematician »Bool«), and can only work inbetween objects, that overlap.
· There are some things to consider, before you can use CSG. First: CSG-operations can only be done with at least two objects; Second: Not all shapes can be used in CSG-groups; Third: Some objects can only be used in CSG-groups under some restrictions and/or limits. |
· The following POVLAB-objects can be used in connection with CSG:
· Cylinder · Sphere · Box · Cone · Truncated Cone · Torus · Tube · Plane · Ring · Disk · 1/2 Sphere · 1/4 Torus · Blob · False prism · Pyramid · Heightfield · Splines· Some of the mentioned objects require special consideration when used in CSG-groups (e.g. planes, disks, blobs etc.). We will see later, what things one should keep in mind, when operating CSG with planes, rings, disks, splines and so on. The following objects cannot be used in CSG-groups: · RAW-files · Plugins (most of them)· Whenever objects cannot be used in CSG-groups or only under restrictions, it is not the fault of POVLAB. These things have (more or less complex) mathematical reasons, which can be studied in the POVRAY 3.0 manual (section 3.5.4). For the beginning, we will concentrate on simple CSG-shapes such as cubes, spheres, cones and so on. Later in this chapter, we will use CSG to build some goodies in our temple-scene. (continued on next page) |
Chapter A/Page 15 |
![]() | ![]() | ![]() |