Transparency
Once you have created your images of flowers, trees, shrubs, etc, adding them to your render and reaping the benefits of this method is as simple as creating an object using the following code segment and then including that object in your picture where you would like to see it.
box{<0,0,0><1,1,.005> hollow
texture{pigment{
image_map { gif "..\garden\flowers7.gif" transmit 0, 1.0}
}}
scale 1 // scaling appropriate for the actual image
translate<-.5,-.1,0> rotate<0,0,0> // center imagemap
object
}
"..\garden\flowers7.gif" is your image_map and directory structure.
You will want to scale the square object appropriate for the type of picture you have in the gif. For example, if the gif is 1200x300, use a scale of <12,3,1> or similar ratio based on how big you need that object to be in your picture.
The "transmit" verb tells POV to make the corresponding color in the image's color pallet invisible.
GLOBAL Settings
The other consideration when using this technique is to ensure that any ray generated will get all the way through all the transparency levels that you might create in your picture. This is done with the "max_trace_level" setting.
global_settings {max_trace_level 80} // default POV setting is 5
If you begin stacking image maps on top of each other, you will begin to notice black areas corresponding to areas towards the back of these stacks. When you notice these, you will need to increase this value to allow the rays to get to the back objects.
Considerations
CAUTION: When you generate images for use in this fashion, avoid objects that have colors that match your background. These objects will become holes later when you incorporate them into your main picture.
Where will the image appear in your final render? Close to the camera, you will want more detail and texture on the interim image than for components that will be further away from the camera.
If your final image is going to be 800x600, generate your interim images at that same scale. Since they will almost always appear smaller than that in your main image, there will not be any pixel oddities. For example, if you generated your image at 180x180 and then used it in a main picture where it appears 300x300, you will inadvertently scale details into blobs of color that will be visible.
A minor annoyance that has cropped up in this method is the appearance of squares and portions of squares over the sky that appear and can be removed by changing the seed that affects which "tree" image map that is picked for a particular spot in a view. Moving the light doesn't seem to affect these patterns. It has been noticed that they may not be there to begin with but show up after adding another object to the view that is itself an image_mapped object.
Image Rotation
Since POV extends an image map through the object and provides an inverse image on the back of our boxes, we can randomly rotate certain objects with the simple addition of a rotation formula. This will immediately double the number of raw images that are available for random natural looking areas.
#declare ROY=int(rand(R1))*180;
Since the int() of any number between 0 and 1 is going to either round up to 1 or down to 0, the value of ROY will be either 0 or 180.
© 1999, Robert J Becraft. All Rights Reserved.