Special Effects

Special Effects

If everything were green, we'd either be in the Army or on the island of Guam. In your scene, you will typically have objects of different colors and textures. Each object can have different characteristics. There are many factors involved in determining how an object in your scene will appear: color, texture, lighting, camera angle, etc. Let's explore these in more detail.

Colors, Textures, and More

A red ball is red because its material is dyed with red coloring. You also see it red because of a whole lot of technical details about light spectrums and frequencies, the biology of your eyes, etc. You get the point. In a similar manner, you are able to apply color to your PovRay object by specifying its pigment. This tells PovRay that you want to color the entire object in one color. This does not mean, however, that the object will be that exact color for every pixel that makes up the object. In real life, even a red ball is not entirely the same red as viewed by your eyes. There might be shadows cast on the ball, creating darker shades of red. The sun might be to the left of the ball, making the left side of the ball lighter than the right side. So, in fact, what you are seeing is a variety of colors from a ball whose pigment is red. The same is true for the objects in your scene.

Objects in a scene, as rendered by PovRay, are subject to the same physical effects as those in real life. Light sources, shadows, colors, reflections, obstructions, and more all affect how the object is rendered as an image. This is ray tracing. We are not limited to just simple colors. In fact, PovRay lets us define all sorts of attributes for objects, like textures and finishes.

It's probably safe to say that most objects in nature have texture. Wood has a grain, glass is smooth and reflective, metal is smooth and shiny or is brushed or coarse, marble is a random mixture of colors and patterns. Texture makes up the majority of what we see in life. In your scenes, textures will play a huge part in communicating your thoughts and emotions. You are now armed with probably the most important aspect of 3D art, an understanding that textures and materials make up every object in a scene, and your choices will affect that scene in a dramatic way.

Lighting

You've probably heard it before: "Lights, camera, action!" You're not only the artist and cameraperson, but you're the lighting technician as well. Lighting plays a very important role in your scene. Everything reflects light to some degree. Even objects that are black reflect some light. The absence of reflective light leaves us with a hole in our field of vision.

In PovRay, you control every aspect of light. There are a variety of choices when it comes to lighting a scene. I've used a simple area light to illuminate my objects. However, with some fancy tricks, some dramatic effects can be achieved. ( Figure 23-3 represents a grayscale version.) In this example I've positioned a solid white wall on the left and a glass wall on the right. The left wall is not white because it falls inside the shadow of the wall on the right. A blue spotlight is pointing at the center of the right wall, so the blue light will shine through the glass wall and produce a circle of blue light on the left wall. A small cube centered next to the right wall obstructs some of the light passing through the glass wall. The results can be seen on the left wall. Even the shadow from the cube can be seen on the left wall.

Figure 23-3. Image of two walls.

Such simple effects can produce dramatic results when combined with other special effects. And here's the really nice thing ”the code for this example is really simple:

 // Persistence-of-Vision Ray-Tracer Scene Description File 
 // File: walls.pov 
 // Auth: Steve Murphy 
 
 // ==== Standard POV-Ray Includes ==== 
 #include "colors.inc" // Standard Color definitions 
 #include "textures.inc" 
 #include "glass.inc" 
 
 background {color White} 
 
 // here I am! 
 camera {location <28,10,-20> look_at <10, 10, 10>} 
 
 // area light to light up the scene 
 light_source {<30, 30, 10> color White} 
 
 // large white wall 
 box { <0, 0, 0>, <2, 20, 20> 
 pigment { color White } 
 } 
 
 // large glass wall 
 box { <16, 0, 0>, <18, 20, 20> 
 texture { T_Glass3 } 
 } 
 
 // small box in the center 
 box { <11, 9, 9>, <12, 11, 11> 
  pigment { color Black }  
  }  
   
  // the blue spotlight  
  light_source {  
  <22, 10, 10>  
  color Blue  
  spotlight  
  radius 15  
  falloff 25  
  tightness 10  
  point_at <18, 10, 10>  
  }  

If you look closely at the left wall, you'll notice the shadow of the right wall splitting the left wall horizontally. This is due to the area light that is above and to the right of the wall on the right.

Another aspect that can have a dramatic impact on a scene is the camera characteristics. Let's explore a little more on this subject, and then we'll jump into the logo project.

Camera Positioning

Cameras are simple, right? Wrong! There are many different types of cameras: perspective, orthographic, fisheye, ultrawide angle, omnimax, panoramic, and cyl inder. Cameras have a position within the scene and can be directed to look at any point in the scene. They can focus on specific areas of a scene while making the rest of the scene blurred, something seen in movies and television. You don't have to use this blur effect, but sometimes it makes a scene more realistic. Although cameras play a very important role in a scene, they are often considered only after a scene is created.

I think camera perspective is the most important aspect of a scene. Even though your scene is rendered in three dimensions, your camera presents a two-dimensional view. Combined with fancy lighting techniques, you can achieve some dramatic effects.

Consider, as a project, the view a fish has from inside its aquarium. You've got water and a glass or plastic tank wall to look through and then the objects around the room. The camera becomes the fish. It's a living object in your scene.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net