dmorris7's picture
From dmorris7 rss RSS  subscribe Subscribe

POV-Ray tutorial 

POV-Ray tutorial

 

 
 
Tags:  software mirroring  macintosh tiger  macintosh firewire 
Views:  53
Published:  December 29, 2011
 
0
download

Share plick with friends Share
save to favorite
Report Abuse Report Abuse
 
Related Plicks
iPod Capabilities

iPod Capabilities

From: mozzy72
Views: 10 Comments: 0
For all your iNeeds & MP3, iPad, iPod & iPhones vist this site. http://www.ipod-tools.net
 
Closer (Methuen Drama) by Patrick Marber

Closer (Methuen Drama) by Patrick Marber

From: catai
Views: 775 Comments: 0
Closer (Methuen Drama) by Patrick Marber
 
How to upload MOD clips to Mac and play MOD clips on QuickTime, iTunes, etc

How to upload MOD clips to Mac and play MOD clips on QuickTime, iTunes, etc

From: kodakvideoconverte
Views: 38 Comments: 0

 
Digital Camcorder

Digital Camcorder

From: starcatcher444
Views: 51 Comments: 0
Finding the best digital camcorder
 
Make HipHop Beats

Make HipHop Beats

From: halo440
Views: 102 Comments: 0
How to Create Unlimited Hiphop and Urban Music Beats on Your PC or Mac.
 
See all 
 
More from this user
Turning the Tide on Climate change by Robert Kandel

Turning the Tide on Climate change by Robert Kandel

From: dmorris7
Views: 98
Comments: 0

PowerPoint Slides

PowerPoint Slides

From: dmorris7
Views: 72
Comments: 0

energy future holindings 2004_Proxy_Statemen t

energy future holindings 2004_Proxy_Statement

From: dmorris7
Views: 274
Comments: 0

Construccion email marketing

Construccion email marketing

From: dmorris7
Views: 182
Comments: 0

Black friday sale dean zone xm bass guitar, transparent black

Black friday sale dean zone xm bass guitar, transparent black

From: dmorris7
Views: 38
Comments: 0

 
See all 
 
 
 URL:          AddThis Social Bookmark Button
Embed Thin Player: (fits in most blogs)
Embed Full Player :
 
 

Name

Email (will NOT be shown to other users)

 

 
 
Comments: (watch)
 
 
Notes:
 
Slide 1: POVRAY Tutorial 204481 Foundation of Computer graphics Pradondet Nilagupta Jump to first page
Slide 2: What is POV-Ray?  POVRAY = Persistence of Vision RayTracer POV-Ray is a high-quality, freely available ray-tracing software packag e that is available for PC, Macintosh a nd UNIX platforms. POV-Ray is no toy. POV-Ray is what is known as a "rendering engine". Jump to first page   
Slide 3: Written POV-Ray language  Describing scenes to POV-Ray is fairly simple Give POV-Ray a file containing a description of every object in the sce ne. POV-Ray takes this file and gener ates a picture, which you can then vie w.  Jump to first page
Slide 4: Object description of POVRAY  What type of object you want (one of POV-Ray's simple objects or one you've created yourself. Various attributes of the object (its color, how it reflects light, etc).  Jump to first page
Slide 5: What is ray-tracing?  Ray-tracing is a method of creating visual art in which a description of an object or scene is mathematically con verted into a picture. ray-tracing is the process of mathematically generating near-phot orealistic images from a given descrip tion of a scene via geometrical modeli ng of light rays. Jump to first page 
Slide 6: POV-Ray's Coordinate System  The coordinate system that POV-Ray uses, then, is called a three-dimensio nal (or 3D) Cartesian coordinate syste m. The axis we have drawn is not fixed in POV-Ray -- the way the axis looks (in terms of which axes are which) re ally depends on where you place your camera in POV-Ray. Jump to first page 
Slide 7: Vectors in POV-Ray  The term vector refers to any group of numbers describing a certain thing -- there are color vectors and normal vectors. vectors are surrounded by angle brackets (that's < and >). For example, to specify the origin in terms that POV-Ray understands, we would say <0,0,0> Jump to first page  
Slide 8: How to describe color: RGB and RGBF Vectors  In describing a color, each element of the vector corresponds to the amount of a prima ry color -- red, green and blue. Such a vector is called a RGB vector (for red green blue ve ctor). In a RGB vector, the numbers should be between 0.0 and 1.0. For example, the color black, is described by the color vector <0,0,0>. And color white, is specified by the color vector <1,1,1>.   Jump to first page
Slide 9: Normal Vectors  normal vectors are used to specify an orientation, not a distance. Jump to first page
Slide 10: Normal Vector (cont.)  POV-Ray is kind enough to automatically define three normal vectors for you x (corresponding to <1,0,0>), the normal vector for a plane lying along the y and z axe s y (corresponding to <0, 1, 0>), the normal vector for a plane lying along the x and z axe s, z (corresponding to <0, 0, 1>), the normal vector for a plane lying along the x and y ax es.    Jump to first page
Slide 11: POV-Ray Source Code  There are three things you need to know about POV-Ray source code    POV-Ray source code is case sensitive POV-Ray ignores whitespace Ordering is unimportant Jump to first page
Slide 12: Source Code (cont.) camera { location <0, 2.25, -35> direction <0, 0, 10> up <0, 1, 0> right <1, 0, 0> look_at <0, 0, 90> } camera { location <0, 2.25, -35> direction <0, 0, 10> up <0, 1, 0> rig ht <1, 0, 0> look_at <0, 0, 90>} Jump to first page
Slide 13: Comments in POV-Ray Source Code  Comments can be enclosed in /* and */, or, for single-line comments, can be prefixed with a //. Example // this is a single-line comment /* this is another comment. it can be as long as you want it to be */     Jump to first page
Slide 14: Including files  Including files is a feature of many languages that makes re-using code e asier Adding the string #include "filename" to the beginning of your file. Example #include "colors.inc"    Jump to first page
Slide 15: Creating simple objects  The building blocks of all POV-Ray objects and scenes are called primitiv es. Primitives are objects that POV-Ra y already knows about, and all you ha ve to do is describe a few attributes. POV-Ray primitives are usually simple geometric shapes such as spheres, cu bes, and cones. Jump to first page
Slide 16: Describing primitives Object_Name { Object_Parameters Some_Simple_Attribute Some_Other_Simple_Attribute Some_ Complex_Attribute { Some_Attribute Some_Other_Attribute } Jump to first page
Slide 17: Example sphere { <0, 0, 0>, 5 pigment { color rgb <1, 0, 0> } } Jump to first page
Slide 18: The Camera  This example defines a camera located at <2,5,-10> and pointing at the origin. camera { location <2,5,-10> look_at <0,0,0> } Jump to first page
Slide 19: Light sources  There are a few different types of light sources in POV-Ray. We will concentrate here on the most simple (and useful): the point light source. A point light source can be thought of a s an infinitely small object that emits l ight. <0,10,-10> color rgb <1,1,1> } Jump to first page light_source {
Slide 20: First POVRAY       // Persistence of Vision RayTracer version 2 Scene description file // File: Lesson_1.pov // Description: Chrome Sphere on checkers // Date: January 5, 2000 // Author: Pradondet Nilagupta // #include "shapes.inc" #include "colors.inc" #include "textures.inc" camera { location <0, 2.25, -35> direction <0, 0, 10> up <0, 1, 0> right <1, 0, 0> look_at <0, 0, 90> } //Key Light light_source {<50, 100, -80> color White} //Back Light light_source {<100, 50, 80> color Blue} Jump to first page   
Slide 21: First POVRAY  First we'll place our plane into the picture. At the end of your source file, type: object { plane {y, 0} pigment {color rgb <1, 1, 1>} } Jump to first page
Slide 22: First POVRAY  Now let's add the sphere. Type: object { sphere {<0, 1.5, 1> 1.5} pigment {color rgb <1, 1, 1>} } Jump to first page
Slide 23: Camera Again The camera defines what you exactly you see when you render an image. camera { location <loc> sky <sky vector> up <up vector> right <right vector> direction <direction vector> look_at <target> /* translations, rotations, and scales */ }  Jump to first page
Slide 24: Camera Again  When declaring a camera, components that appear should do so in this order. This is bec ause some later components modify previou s ones, and putting them in the wrong order may result in your camera not doing exactly what you expect. Location is pretty self evident; it tells POVRay where in space to locate the camera. It t akes an <x, y, z> vector of the location.  Jump to first page
Slide 25: Camera Again  Sky is used to tell the camera which way is up. Modifying this value can be used to roll t he camera around its central axis. Up, right, and direction are used to modify the field of view and aspect ratio of the imag e. Direction and look_at are used to point the camera at a specific point in the scene. Direction is more typically used with up and r ight to define field of view then to position th e camera, though. Jump to first page  
Slide 26: Location  The location keyword tells POV-Ray where to position the camera. This parameter must always be specified. It takes an <x, y, z> vector which tells the location of the camera.   Jump to first page
Slide 27: Up Vector  The up vector is used to define the height of the viewing pyramid The default value of the up vector is "up <0, 1, 0>". This, together with the value "right <4/3, 0, 0>" (also default) defines the aspect ratio of the rendered imag e to be (4/3) / (1) = 4/3.   Jump to first page
Slide 28: Right Vector  The right vector controls the width of the view. The angular width of the viewing pyramid can be found with the followi ng equation. width = 2 * atan(|right| / |direction|)  Jump to first page
Slide 29: Direction  The direction vector is primarily used in conjunction with up and right to define the field of view. Increasing the magnitude of the direction vector "stretches" the viewing pyramid and creates a telephoto sort of effect. Decreasing the magnitude of the direction vector "compresses" the viewing pyramid an d gives the effect of a wide-angle camera.   Jump to first page
Slide 30: Direction direction <0, 0, 0.5> direction <0, 0, 1> direction <0, 0, 2> direction <0, 0, 4> Jump to first page
Slide 31: Look At   The look_at parameter controls the orientation of the camera. It is by far the easiest way to get the camera to point at the thing you want it to point at. One thing to keep in mind when using look_at is that the location and look_at points should never be s et so that the camera is looking direct ly down (parallel to the y-axis). Jump to first page
Slide 32: Sky     The vector tells the camera which way is up. This is not to be confused with the up vector which defines the aspect ratio. The default sky vector is <0, 1, 0>. By modifiying this value, you can roll the camera around its central axis. The sky vector, if specified, must appear before the look_at point is specified. Jump to first page
Slide 33: Sky  The first image below is rendered with "sky <2, 1, 0>", and the second with "sky <0, -1, 0>". Jump to first page
Slide 34: Common Object Types  plane, sphere, torus, box, cylinder, cone, lathe, prism (extruded shape), blob, and text. Jump to first page
Slide 35: The Plane  The plane consists of only two values; which of the 3 major axis it cr osses, and it's position on that axis. T he plane will be perpendicular to the axis declared object { plane {y, -1.5} //{axis, location} pigment {color rgb <.5,.5,.5>} } Jump to first page
Slide 36: Sphere   The sphere also consists of only two values; the location, and the radius. The location defines the center of the sphere. object { sphere {<0, .5, 0> 1} //{<location> radius} pigment {color rgb <1,1,1>} //scale <2,1,1> //scale to make an elipse } Jump to first page
Slide 37: Torus  The torus definition consists of two radius statements. The first, or major radius extends from the center of the t orus to the mid-line of the rim. The sec ond, or minor radius defines the radiu s of the cross section of the rim. object { torus {1.75, .5} //{outer radius, rad. of cross section} pigment {color rgb <1,1,1>} translate <0,.5,0> //must use translate to move } //its location. Jump to first page
Slide 38: Box  POV defines boxes as two points. The points form opposite corners of the box such as lower back right and upp er front left. object { box {<-1, -1, -1> // first corner position < 1, 1, 1>} // second corner position pigment {color rgb <1,1,1>} } Jump to first page
Slide 39: Cylinder  object { cylinder {<0,-1,0>, <0,1,0>, 1 //{<1st point>, <2nd point>, radius //open //uncomment to make it a tube } pigment {color rgb <1,1,1>} } A cylinder consists of 4 values. The first three, first point, second point, and radius are mandatory. Th e fourth, open, is optional. Jump to first page
Slide 40: Cone  A cone is very similar to a cylinder; the difference being that you can define the radi us of both ends. The first point defines one e nd of the cone. The first radius defines the r adius of the cone at this point. The second p oint and its radius define the center of the ot her end of the cone object{ cone {<0,-1,0>, 1.0, //{<1st point>, 1st radius <0,1,0>, 0.0 //{<2nd point>, 2nd radius //open //uncomment to make it open ended } pigment {color rgb <1,1,1>} } Jump to first page
Slide 41: Color and Texture object { sphere {<0, 1.5, 1> 1.5} pigment {color rgb <1, 1, 1>} } object { sphere {<0, 1.5, 1> 1.5} texture {PinkAlabaster} } Jump to first page
Slide 42: Pigment object { plane {y, 0} pigment {checker color rgb <0,0,1> color rgb <0,1,0>} scale 2 }  The pigment is defined as checker, and is given two colors. You could also use textures instead of colors to make, say, a black marbl e and white marble tile floor. The statement scale 2 scales the size of the squares.  Jump to first page
Slide 43: Finish the term "finish" refers to the quality of the surface (shiny, dull, reflective, etc.). There are some pre-defined finishes in th e colors.inc file. object { sphere {<0, 1.5, 1> 1.5} pigment {color rgb <1, 1, 1>} finish { ambient .2 } }  ambient has to do witht he amount of light on the "shaddow" side of the object. Is it completel y dark (black) or sligh tly lit? .2 is pretty dar k, but not black. Jump to first page
Slide 44: Diffuse and Specular  diffuse refers to the way the light changes from sark to light. A high number means the light changes from light to shaddow very gra dually; conversely, a low number (like 0.1) w ould have a very abrupt change from light to shaddow. specular is the small round highlight on the surface. A small number will create a tiny "dot" of "pure" light; a large number will cre ate a larger highlight.  Jump to first page
Slide 45: Diffuse and Specular object { sphere {<0, 1.5, 1> 1.5} pigment {color rgb <1, 1, 1>} finish { ambient .2 diffuse .5 } } object { sphere {<0, 1.5, 1> 1.5} pigment {color rgb <1, 1, 1>} finish { ambient .2 diffuse .5 } specular .25 } Jump to first page
Slide 46: Reflection object { sphere {<0, 1.5, 1> 1.5} pigment {color rgb <1, 1, 1>} finish { ambient .2 diffuse .5 } specular .25 reflection 1 } reflection is just that: reflection. 1 means the objects is 100% reflective (liek a mirror); 0 means there is no re flection. Jump to first page
Slide 47: Transparency object { sphere {<0, 1.5, 1> 1.5} pigment {color rgbf <1,1,1,.75>} finish { ambient .1 diffuse .5 specular .5 } } Jump to first page
Slide 48: Finish Reference finish { ambient ambient lighting brilliance brilliance crand crand amount diffuse diffuse lighting ior index of refraction metallic phong phong highlighting phong_size phong size reflection reflected light refraction refract toggle roughness roughness specular specular highlighting } Jump to first page
Slide 49: Finish  The sum of the values of ambient, diffuse, and reflection should be about 1.0. Much hig her, and your colors will saturate and look fla t. Much lower, and your colors will appear da rk. Objects with reflection and refraction (actually, any object with a nonzero filter) wi ll increase your rendering time. Reflection re quires an extra ray to be traced to determine the reflected color, while with transparent ob jects, an extra ray must be traced to determi ne the color that is being filtered.  Jump to first page
Slide 50: Finish   You usually don't need both phong and specular highlights. The argument to refraction should be 1 or 0 only. Jump to first page
Slide 51: Ambient  Them ambient finish controls how much of the color of a surface comes from ambient li ghting. Its parameter is a float value in the range 0.0 to 1.0 (typically). The default value is 0.1 Low values mean that objects which are not directly lit will retain some of their color. Higher values can make an object appear to glow Jump to first page    
Slide 52: Brilliance     Brilliance modifies the behavior of diffuse lighting. Brilliance takes a float parameter which modifies how diffuse light bounces off an obj ect. The default value is 1.0. The flatter this angle is, the less the surface is illuminated. Higher brilliance values make t he light illuminate less at flat angles The first image was rendered with the default, the second with brillance 5, and the third with brilliance 0.2. Jump to first page
Slide 53: Crand     Crand can be used to simulate very rough surfaces like concrete and sand which have grainy surfaces. Crand takes a float parameter from 0.0 to 1.0. The default is 0.0 You should not use crand in animations. the first image is again the default, while the second has crand 0.1 thrown in Jump to first page
Slide 54: Diffuse  Diffuse light is basically light that comes from a light source and diffuse s in all directions. The value can range from 0.0 (no light from light sources) to 1.0 (very well lit). The default value is 0.6. The first is the default, the second has diffuse 0.3, and the third has diff use 0.9. Jump to first page  
Slide 55: Ior  This value controls the index of refraction for transparent objects whi ch refract. Jump to first page
Slide 56: Metallic    The metallic keyword is a modifier for the phong and specular highlights. Metallic takes no parameter; either it's there or it's not. The first was rendered with phong highlighting without metallic, and the second is with metallic Jump to first page
Slide 57: Phong  The phong keyword creates a highlight on an object that is the color of the light source. Phong takes a float parameter which expresses how bright the highlight should be . The size of the highlight can be controlled with the phong_size parameter. First image: no highlights, second image: phong 0.9    Jump to first page
Slide 58: Phong Size  The phong_size parameter is a modifier for the phong finish. It takes a float parameter (greater than zero) which defines how large the phong highlight will be. Typical values ra nge from 1 (pretty dull) to 250 (very shiny). The default is 40. The images were rendered with "phong_size 40" (default), "phong_size 4", and "phong_size 180", respectively.   Jump to first page
Slide 59: Reflection    The reflection finish gives an object a mirrored or partially mirrored surface. This object will then reflect other objects in the scene. A value of 0 turns off reflection for the object, a value of 1 gives the object a perfectly mirrored surface (al most). The first scene has no reflection, the second has reflection 0.3. Jump to first page
Slide 60: Refraction  Refraction only has meaning on objects that have at least a little bit of transparency. Refraction is the bending of light rays as the y pass into a more dense or less dense medi um You can change the ior of a refracting object with the "ior" keyword. Some examples of indices of refraction are "ior 1.000292" (air) "ior 1.33" (water), and "ior 1.5" (glass). The first image has no refraction, the second has "ior 1.5", and the third has "ior 2.0".   Jump to first page
Slide 61: Roughness  The roughness parameter controls the size of the highlight produced by the specular ke yword. Typical values range from 1.0 (sand paper) to 0.0005 (polished glass). The defaul t roughness is 0.05. High values give very a very soft, very large highlight. Small values give a very small, tigh t highlight. 0 is a very bad number for rough ness. All use "specular 0.9". The first uses the default roughness, the second uses "roughne ss 0.75", the third "roughness 0.001". Jump to first page  
Slide 62: Specular  The specular finish is similar to phong, but this one is more accurate as far as physical l aws are concerned. It produces a highlight o n the object where the reflection of the light source would be if the object were reflective The size of the highlight can be controlled (to some extent) with the roughness parame ter. Here's what specular (0.9) looks like.  Jump to first page
Slide 63: Normal Reference Here's the general syntax for a bump map. normal { bump_map { type "filename" [bump_size size] [interpolate mode] [use_color] [use_index] [once] [map_type map mode] } }  Jump to first page
Slide 64: Normal  The normal component of a texture allows you to create effects on the surface of an obj ect Normals have three parts, the type, the modifiers, and then transformations. A normal can only have one type, and that is one of bumps, dents, ripples, waves, or wrinkles. They each take a depth parameter between 0.0 (Flat) and 1.0 (Violent).   Jump to first page
Slide 65: Normal  here's a standard ripples normal and another with "turbulence 0.7". Note the ripples have been translated to p ut their center on the top of the sphe re. Jump to first page
Slide 66: Bumps  The bumps normal creates a random bumpy pattern on the object. The bumps normal takes a float parameter from 0.0 (Flat) to 1.0 (Mou ntainous) that describes the depth of the bumps.  Jump to first page
Slide 67: Dents  The surface appears to have dents (naturally enough) beaten into it. Dents takes a float parameter from 0. 0 (Brand New) to 1.0 Jump to first page
Slide 68: Ripples  The ripples normal creates evenly space, smooth ripples which originate from 10 random locations inside the b ox with corners <0, 0, 0>, <1, 1, 1>. All the waves have the same frequenc y, so the ripple effect is smooth at a s ignificant distance from the center. Jump to first page
Slide 69: Waves  Waves are similar to ripples, except instead of creating smooth, even ripples, it creates more rough and tu mble waves. Theoretically these look more like deep ocean waves. The wa ves normal takes the standard 0.0 (B ecalmed) to 1.0 (Tsunami) parameter . Jump to first page
Slide 70: Wrinkles  This normal specifier basically makes the object look like it had been wadd ed up and then stretched back out ag ain. Jump to first page
Slide 71: Declarations (variables)  Variables are a way to store and recall frequently used items. In POV variables (declarations) can store a n umber, a word, an entire object, or e ven an ent ire scene. Example  #declare sizeOfSphere = 1.5 object { sphere {<0, 1.5, 1> sizeOfSphere} pigment {color rgb <1, 1, 1>} } Jump to first page
Slide 72: Declarations Example #declare MyPrettyWhite = rgb <1,1,1> object { sphere {<0, 1.5, 1> 1.5} pigment {MyPrettyWhite} }  Jump to first page
Slide 73: Declarations #declare #declare #declare #declare XPosition = 0 ZPosition = 1 MyPrettyWhite = rgb <1,1,1> MyRadius = .5 object { sphere {< XPosition, .5, ZPosition > MyRadius} pigment {MyPrettyWhite} } Jump to first page
Slide 74: Declarations #declare WhiteBall = sphere { < XPosition, MyRadius, ZPosition > MyRadius pigment {MyPrettyWhite} } Now replace the code for each of the objects so that it looks like this: object {WhiteBall} Jump to first page
Slide 75: Declarations #declare MyPrettyWhite = rgb <1,1,1> #declare MyRadius = .5 #declare XPosition = 0 #declare ZPosition = 1 #include "shapes.inc" #declare WhiteBall = sphere { < XPosition, MyRadius, ZPosition > MyRadius pigment {MyPrettyWhite} } camera { location <0, 2.25, -35> direction <0, 0, 10> up <0, 1, 0> right <1.25, 0, 0> look_at <0, 0, 90> } //Key Light light_source {<50, 100, -80> color MyPrettyWhite} //Back Light light_source {<100, 50, 80> color rgb <0,0,1>} object { plane {y, 0} pigment {MyPrettyWhite} scale 2 } #declare BallCount = 1 #while (BallCount < 21) object {WhiteBall} #declare MyRadius = MyRadius + . 1 #declare XPosition = XPosition + .1 #declare ZPosition = ZPosition + 4 #declare WhiteBall = sphere { < XPosition, MyRadius, ZPosition > M yRadius pigment {MyPrettyWhite}} #declare BallCount = BallCount + 1 #end Jump to first page
Slide 76: Declarations Jump to first page
Slide 77: Transformations  Transformations, in ray-tracing terms, are attributes that change the position, size or orientation of objects (and of the various attributes of the o bjects). The most common types of transformations, and the ones that P OV-Ray supports, are translations, rot ations and scalings. Jump to first page 
Slide 78: Translation  A translation is a transformation that moves an object relative to its current position. A translation of <-1,4,2> results in the cube being moved left one unit, up four, and back two.  Jump to first page
Slide 79: Rotation  A rotation is a transformation that changes the orientation of an object (the way that it's facing). A rotation of <0,0,45> rotates the cube 45 degrees around the z axis,  Jump to first page
Slide 80: Rotation  if we translated the cube first, and then rotated it  if we rotated the cube first, and then translated it Jump to first page
Slide 81: Scaling  Scaling changes the size of the object with respect to its current size. If we scaled the object with the string scale <1,4,1>, we would get a result like this  Jump to first page
Slide 82: Example torus { 3, 11 pigment { color Yellow } scale <1.5,1,1> rotate <-45,0,0> translate <0,2,0> }  This code makes a yellow torus, slightly widened around the x axis, ro tated -45 degrees around the x axis a nd with its center at <0,2,0>. Jump to first page
Slide 83: Constructive Solid Geometry  The five types of CSG are: Union Merge Intersection Difference Inverse Jump to first page
Slide 84: Union Union is a way of joining objects together. union{ object{greenBox} object{redTorus} rotate <20, -65, 0> }  Jump to first page
Slide 85: Merge #declare greenBox = box{ <-2, 1, -2>, <2, -1, 2> pigment{color rgbf <0, 1, 0, .5>} } #declare redTorus = torus{ 1.25, // MAJOR radius (0,0,0 to midline of ring 0.5 // MINOR radius (radius of cross section of ring pigment{color rgbf <1, 0, 0, .5>} translate 1*y } Render the image and you'll see that the torus now does not ex tend inside the box. merge{ object{greenBox} object{redTorus} rotate <20, -65, 0> } Jump to first page
Slide 86: Union and Merge Union Merge Jump to first page
Slide 87: Intersection  Intersection renders only the areas where the objects in the CSG intersec t, or overlap. intersection{ object{greenBox} object{redTorus} rotate <20, -65, 0> } Jump to first page
Slide 88: Difference  POV will render the first object minus any following objects. difference{ object{greenBox} object{redTorus} rotate <20, -65, 0> } Jump to first page
Slide 89: Troubleshooting CSG has one major flaw that you should be aware of. When surfaces of CSG objects are identical, strange arti facts can appear. difference{ object{greenBox} box{ <-1, 1, -1>, <1, -1, 1> pigment{color rgb <1, 0, 0>} } rotate <20, -65, 0> }  Jump to first page
Slide 90: Troubleshooting  That is because as rays from the light source(s) reach the two objects, sometimes t hey hit the red box first, and other times the y hit the green box first. The problem is eliminated by ensuring the objects in a CSG have "clearance" from each other. Stretching the y values of the red box beyond those of the green box alleviates the problem.  Jump to first page
Slide 91: Troubleshooting difference{ object{greenBox} box{ <-1, 1.5, -1>, <1, -1.5, 1> pigment{color rgb <1, 0, 0>} } rotate <20, -65, 0> }  Rendered without the difference to show the overlap or "clearance." Jump to first page
Slide 92: END Jump to first page

   
Time on Slide Time on Plick
Slides per Visit Slide Views Views by Location