|
Image_PatternA new pattern type was added, which is called "image_pattern". It uses a very similar syntax as "bump_map", but without "bump_size". There is also a new keyword "use_alpha" which works similar to "use_color" or "use_index" (see the POV-Ray documentation regarding bump maps). It is meant to be used for creating texture "masks", like the following: texture { image_pattern { tga "image.tga" use_alpha } texture_map { [0 mytex ] [1 pigment{transmit 1} ] } } note, the following macros might come in handy: #macro texture_transmit(tex, trans) average texture_map {[1-trans tex] [trans pigment{transmit 1}] } #end #macro pigment_transmit(tex, trans) average pigment_map {[1-trans tex] [trans transmit 1] } #end #macro normal_transmit(tex, trans) average normal_map {[1-trans tex] [trans bump_size 0.0] } #end Reset_ChildrenFirst I want to give credit to Daren Scot Wilson. His "warp_map_only" patch inspired this feature. Unfortunately his patch had some bugs which this implementation tries to avoid. When using texture maps, or any textures that have child textures, you can run into problems if you want to modify the texture map (such as with turbulence), but you do not want to modify the child textures. Here is an example: The solution to this is a new warp, called "reset_children." When you add this warp to an texture, the child textures are reset. All following warps and transformations will apply to the texture, but everything before the "reset_children" warp is cleared for the child textures. Here's what the previous scene looks like with the reset_children warp applied:
For those who care, the implementation of reset_children was two-fold. First, I added a new warp type called reset_children. Then, I added a parameter to Warp_EPoint so that it could know if it was warping the parent or the children patterns. If Warp_EPoint is warping a child texture and it hits a reset_children warp, it will stop. Since warps are applied in reverse order, this means that only the warps after the reset_children warp are used, which appears to the user as the child textures getting reset.
This page was last updated March 02, 1999. If you have any comments, please email me. My email address is Nathan at Kopp dot Com. |