This is a child page. You can use Parent in the quick nav bar at the top or the bottom of the page to navigate directly back to the parent of this page. Some child pages are more than one level deep, and in that case will require more than one Parent click to reach the outermost document level.

16.90.5.2 - ambithresh (SceneScript element)

 <ambithresh EXP

This language element may be used inside a  <trait block.

EXP may range from 0.0 to 1.0. Note that a value of 0.0 is a special case that disables the feature.

 <ambithresh is the threshold which when exceeded by any of the three color components for a texture (of any kind) causes the ambient level to go to 100% (1.0) for that point.

To explain the use of this, imagine the following situation:


You're rendering a space station. On the one side, it is illuminated by the sun. On the other, it is very dark, being entirely in shadow. This is accomplished by setting the ambient term for the object to a low value.

You want to render windows on the station, some of which you desire to appear to be illuminated. These are placed on the bitmap texture for the station, along with other surface details. On the dark side, then, the windows should show brightly, though the rest of the surface texture is in the dark. However, under normal circumstances, with the ambient term set low, as these pass into the shadowed side, they darken with everything else.

Enter the  <ambithresh language element.



Draw the texture with the surface details using colors that are no more than (for instance) 75% brightness, or 192 in decimal or C0 in hex. Where you draw the windows, draw them in a color that is fully "on", such as full white (1 1 1 / 255 255 255 / FF FF FF) or yellowish (1 1 .5 / 255 255 127 / FF FF 7F). Now use  <ambithresh .8 to tell the system that  <ambient is to be adjusted to 100% for those specific areas.

When you render the space station, those windows will glow just as brightly as they pass around the shadow side, while the rest of the surface detail, which is below the threshold, renders in shadow normally. The example images here make the benefits in this situation very plain.

This technique applies to any apparent self-lighting issue; office buildings, fireflies, spaceships, pilot lights on control panels, etc.

Keyboard Navigation
, Previous Page . Next Page t TOC i Index o Operators g Glossary
WinImages F/x, Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions
WinImages F/x Manual Version 7, Revision 6, Level A

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7
Page 174