@database Textures
@wordwrap
@node main "Textures"
@{jcenter}

Copyright 1994,1995
Michael Rivers

This archive is FreeWare.
You are not required to pay for it's contents, however, you are more than welcome to.

--------------------------------
         
Send comments, etc. to
mrivers@tbag.tscs.com
or
mrivers@tbag.org
or
Michael Rivers
4302 Wisconsin Court
Tampa FL USA 33616

--------------------------------

@{" Alpha " link alpha}
@{" BrightWhite " link brightwhite}
@{" BriteMap " link britemap}
@{" BumpBuffer " link bumpbuffer}
@{" CSG " link csg}
@{" Edge " link edge}
@{" Flare " link flare}
@{" Flicker " link flicker}
@{" FogMap " link fogmap}
@{" Lattice " link lattice}
@{" SetAttrb " link setattrb}
@{" SpecMap " link specmap}
@{" V " link v}

--------------------------------

@{b}FX Series@{ub}
@{" FX_AlphaChannel " link fxalpha}
@{" FX_ChromaKey " link fxckey}
@{" FX_Mix " link fxmix}
@{" FX_RestoreAttr " link fxrestoreattr} 
@{" FX_SaveAttr " link fxsaveattr}
@{" FX_TintShade " link fxtintshade}
@{" FX Notes " link fxnotes}

--------------------------------
@{jleft}
@endnode

@node alpha "Alpha"

Alpha is a multi-operation texture and brush composition texture.

History:
1.0 initial release.
1.1 astetical fixes. (the numbers indicating which entry is valid for each operation were wrong) 
1.5 Now works with Bumps. And allows simple restoring of attributes.

Requester:

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Operation :@{ub} This indicates what this instance of the texture will do: 
    0 : Saves all the current attributes of the object into a buffer
    1 : Will composite two buffers
    2 : Will do tinting and shading
    3 : Will simply restore a buffer(no compositing) to the object

Valid Entries for Operation 0 (Save):

@{b}Buffer A(0-9) :@{ub} This is the buffer number in which the objects color,filter,reflectivity etc are to be saved.
   
Valid Entries for Operation 1 (Compose)
 
@{b}Buffer A & B(-1,0-9) :@{ub} These are the numbers of the Buffers to composite. -1 means to use the current color,filter, etc.

@{b}Mix Amount(0-1) :@{ub} This affects how transparent Alpha Buffer A is, 0 is completely opaic, and 1 is completely transparent.

@{b}AlphaChan(-1,0-9) :@{ub} This specifies which buffer to use as a alpha-stencil, use -1 to use the current color of the object 

@{b}Alpha Strength(0-1) :@{ub} This specifies the strength of the AlphaChan, at 0 the transparency level is taken from Mix Amount, 1 will take the transparency level from the AlphaChan (keying off the the average of R,G,& B of the stencil). Intermediate values will mix the two.  

@{b}Color Alphas :@{ub}
  Red Alpha     | These are similar to Alpha Strength but key or the red,
  Green Alpha   | green, or blue of the stencil, and the results only
  Blue Alpha    | modify the red, green, or blue.

@{b}Attributes :@{ub} The attributes the texture will affect.  The values may be added together to modify multiple attributes. ex: for color and filter would = 5.   

Valid Entries for Operation 2 (Tint and Shade):

@{b}Buffer A :@{b} Which buffer to modify. -1 will use current colors of object.

@{b}Buffer B :@{ub} Which buffer will be used for the tint/shade map. -1 will use current colors of object.
                
@{b}Mix Amount :@{ub} How strong the tint/shade map is. a value of 1 will give results as follows:

@{jcenter}
Buffer A             Buffer B           result
--------------------------------------------------
red                 white         =    white
red            grey(128,128,128)  =      red
red                 black         =    black

lower values will have less pronounced effects.
@{jleft}

Valid Entries for Operation 3 (Restore buffer):

@{b}Buffer A :@{ub} Which objects attributes to place on the object. valid values 0-9

@{b}Attributes :@{ub} Which Attributes to apply to the object from the buffer for multiple attributes add the attributes values together

-------------------------------------------------------------------
Example Attribute lists

This will composite the checks and fireball textures 50/50:

  Checks  - default settings
  Alpha   - Operation 0, Buffer A 0
  Fireball- default settings 
  Alpha   - Operation 0, Buffer A 1
  Alpha   - Operation 1, Buffer A 0, Buffer B 1, Mix Amount .5,
            Attributes=1

  -or-
  
  Checks  - default settings
  Alpha   - Operation 0, Buffer A 0
  Fireball- default settings 
  Alpha   - Operation 1, Buffer A 0, Buffer B -1, Mix Amount .5,
            Attributes=1
 

This is how a stencil can be used:

  Checks  - default settings
  Alpha   - Operation 0, Buffer A 0
  Fireball- default settings 
  Alpha   - Operation 0, Buffer A 1
  A brushmap with various shades of grey, used for stencil.
  Alpha   - Operation 1, Buffer A 0, Buffer B 1, Alpha Chan -1,
            Alpha Strength=1, Attributes=1

Composing textures with bumpy attributes is more difficult:

  BumpBuffer - Operation=0, Buffer=0
  Leather    - default settings
  Alpha      - Operation=0, BufferA=0
  BumpBuffer - Operation=1, Buffer=0
  SetAttrib  - Set Color as you prefer
               (bathtile.itx uses the color already on the object
                for the color of the tiles, so this texture is
                used to change the object color,refl... so previous
                textures won't show through the bathtile)  
  BathTiles  - rotate axis on X 90 degrees
  Alpha      - Operation=0, BufferA=1
  (insert a greyscale picture or texture for the alpha channel here)
  Alpha      - Operation=1, BufferA=0, BufferB=1, AlphaChan=-1,
               Alpha Strength=1, Attributes=9 (Color+Bumps,1+8)
@endnode

@node brightwhite "BrightWhite"

BrightWhite turns any white spots on an object bright.  In order for this to work, you must render a project with at least an ambient light setting of 1,1,1.

@endnode

@node britemap "BriteMap"

BriteMap is pseudo-brightness mapping.  Requires Imagine3.0
this texture uses reflectivity maps and reflection maps in Imagine 3.0
to produce a brightness map.

first apply the brightness map using 'reflectivity' mapping.
then apply this texture.
then apply a solid white brushmap as a 'reflection' map.
@endnode

@node


@endnode

@node bumpbuffer "BumpBuffer"

BumpBuffer is used to save and restore the bumps of an object.  It is required when using the Alpha texture to composite bumps this is because bumpy textures modify the bumpiness of the object, so if a bump is already their it may make it more bumpy, or even flatten out the bump. thus,this texture can be stuck in the texture/brushmap at priority 1 to save the bumpiness of the object(or the flattness in this case), a bumpy texture can be placed at priority 2, anf finallt this texture can again be applied at priority 3 to restore the flattness of the object. Although the Alpha texture itself can be used for this purpose, this texture was created to reduce confusion in the texture/brushmap list.

Operation: what this instance of the texture does.

Buffer: which buffer to store or restore the bump.
@endnode

@node csg "CSG"

The CSG texture can create the look of CSG objects slicing into one another.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Type :@{ub} This sets  type of object, currently there are 3 object types.
  Lens type(0) - If you @{B}Ray Trace@{UB} your image @{B}AND@{UB} use transparent objects that have a @{b}refractive index other than 1@{ub}, you must create an object, apply this texture to object and put the object directly in front of the camera. (Or use a sphere and put the camera in the sphere)
  Or type(1) - Will be rendered like a normal object.
  Not type(2) - If a Not type intersects a Or type, this texture will make it look as though the not object has cut into the Or object. the hole in the or object will have the attributes of the not object.  Objects of this type are rendered transparently
@{b}Erase Attributes :@{ub} These are the attributes to be used where the object is "erased".  The default values are for total transparency.  -1 values will make the texture ignore a particluar attribute.

Notes:  
1. Objects should be solid, ie. they must not have any holes in them. 
2. If two objects of the same type intersect, they can have stange effects.
   (if 2 'not' objects and a 'or' intersect, there will not be a hole where the 2 'not' objects intersect.)
3. This texture should be applied last to an object.

@endnode

@node edge "Edge"

The Edge texture will draw one edge on the face of an object.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Size1 :@{ub} The relative size of the border.
@{b}Size2 :@{ub} Size1 & 2 describe how much space is between the attributes already on the object and the new attributes in this texture, this space will be filled with a fade between the two.
@{b}0 Point  1 Edge :@{ub} Specifies whether the textures attributes affect the first edge of the face, or the point across from the edge.
@{b}Colors, Reflect Filter & Specular :@{ub}
@{b}  Red   (-1 - 255) :@{ub} These specify the color of each attribute,
@{b}  Green (0 - 255)  :@{ub} Setting the Red value to -1, will cause the
@{b}  Blue  (0 - 255)  :@{ub} texture not to modify an attribute.
@{b}Fog Length :@{ub} The foglen, or -1 to ignore. 

*Note: the Specular attribuytes work on I4+ only. 


@endnode

@node flicker "Flicker"

Flicker causes the objects attributes to flicker between those already on the object and the attributes specified in this requester.

the foglen value of this texture will have no effect unless the objects foglen is greater than 0
@endnode

@node flare "Flare"

Flare creates a psuedo-flare effect in an object.

The flare will always *appear* to be centered on the texture axis no matter from what angle you view the object from.

@{b}@{u}Parameters:@{ub}@{uu}
The the position and size of the flare with the texture axis.
 (Only the Y axis size matters)

@{b}Hot Spot Size (0 - 1.0) :@{ub} Set the size of the 'Hot Spot' at the center of the flare. It is specified as a percent of the Y axis(0=0%, 1=100%). The hot spot is where the attributes of the texture are applied, and gradually fade out to the edges.

@{b}Colors, Reflects, Filter, Fog :@{ub} Attributes of the hot spot.  Specifying -1 for the red value of the Color,Reflect, or Filter or setting the FogLength to -1 will cause those attributes to be ignored.
@endnode

@node fogmap "FogMap"

History: 1.0 original
         1.1 the fog len is now scaled when the object is scaled(sized).

Takes the color of the object to determine the fog length

Black Fog Length : Fog length where the object is black
White Fog Length : Fog Lenght whare the object is white

Note: The objects Fog Length must be non-zero in order for
      this texture to work
@endnode

@node lattice "Lattice"

The Lattice texture will draw outlines around the faces of an object.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Size1 :@{ub} The relative size of the border.
@{b}Size2 :@{ub} Size1 & 2 describe how much space is between the attributes already on the object and the new attributes in this texture, this space will be filled with a fade between the two.
@{b}0 Inside  1 Border :@{ub} Specifies whether the textures attributes affect the border of the face or the interior.
@{b}Colors, Reflect Filter & Specular :@{ub}
@{b}  Red   (-1 - 255) :@{ub} These specify the color of each attribute,
@{b}  Green (0 - 255)  :@{ub} Setting the Red value to -1, will cause the
@{b}  Blue  (0 - 255)  :@{ub} texture not to modify an attribute.
@{b}Fog Length :@{ub} The foglen, or -1 to ignore. 

*Note: the Specular attribuytes work on I4+ only. 

@endnode

@node setattrb "SetAttrb"

SetAttrb sets the specified attributes on an object.  This texture
is usefull when mixing textures with either the Alpha texture, or its
successors, the FX series of textures. 

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Colors, Reflect & Filter :@{ub}
@{b}  Red   (-1 - 255) :@{ub} These specify the color of each attribute,
@{b}  Green (0 - 255)  :@{ub} Setting the Red value to -1, will cause the
@{b}  Blue  (0 - 255)  :@{ub} texture not to modify an attribute.
@{b}Fog Length :@{ub} The foglen, or -1 to ignore.
@endnode

@node specmap "SpecMap"

SpecMap adjusts the specularity of the object by keying of the color of the object.


@{b}Notes:@{ub}
 The specular map needs to be rather bright, or you'll need to lower the 'Full Scale Value' in the brushmap requester.  The the object's Hardness should be low (preferablely 0). 
 Reflective and refractive objects may have irregularities on them depending on how much contrast is in the specular map.
 I'll be the first to admit that this is somewhat of a hack and may not work in versions of Imagine other than 3.0.
@endnode

@node v "V"

The V texture will cause the faces of an object to render as 'V's

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Size1 :@{ub} The relative size of the border.
@{b}Size2 :@{ub} Size1 & 2 describe how much space is between the attributes already on the object and the new attributes in this texture, this space will be filled with a fade between the two.
@{b}0 Inside  1 Border :@{ub} Specifies whether the textures attributes affect the border of the face or the interior.
@{b}Colors, Reflect Filter & Specular :@{ub}
@{b}  Red   (-1 - 255) :@{ub} These specify the color of each attribute,
@{b}  Green (0 - 255)  :@{ub} Setting the Red value to -1, will cause the
@{b}  Blue  (0 - 255)  :@{ub} texture not to modify an attribute.
@{b}Fog Length :@{ub} The foglen, or -1 to ignore. 

*Note: the Specular attribuytes work on I4+ only. 

@endnode




@node fxalpha "FX_AlphaChannel"

FX_AlphaChannel combines two buffers through an alpha channel.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Buffer A (-1 - 9) :@{ub} The buffer to composite.  @{"Notes" link fxnotes}
@{b}Buffer B (-1 - 9) :@{ub} The buffer to composite.
@{b}Alpha Buffer (-1 - 9) :@{ub} The buffer to use as the alpha channel.  Buffer A
                        is used where the aplha channel is black and Buffer B
                        is used where the alpha channel is bright.
@{b}Strength (0 - 1) :@{ub} This allows you to adjust the strength of the alpha channel.
@{b}Key :@{ub} Specifies how this texture keys off the alpha channel.
      0.Value - keys of the average of the RGB colors. for example: Blue and Red
                have equal values, about .3333 on a 0 to 1.0 scale. Violet, a
                combination of Red and Blue has a value of .6666 .  White (Red,
                Green, & Blue) has a value of 1.  
      1.Red   - keys off the red value in the alpha channel.
      2.Green - keys off the green value in the alpha channel.
      3.Blue  - keys off the blue value in the alpha channel.
      4.RGB   - this keys off red, green & blue.  Unlike value, with this key type
                the alpha channels colors affect how much of each color comes through.
                For example, if you use a blue alpha channel then this texture will
                only affect blue. 
@{b}Attributes :@{ub} Which attributes this texture works with.  @{"Notes" link fxnotes}

@endnode 


@node fxckey "FX_ChromaKey"

FX_ChromaKey combines two buffers by keying off a color or range of colors in the
top buffer(Just like a true chromakey).

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Front Buffer (-1 - 9) :@{ub} This is the buffer to be keyed through.  @{"Notes" link fxnotes}
@{b}Back Buffer  (-1 - 9) :@{ub} This buffer will show through the key color(s).
@{b}Red   (0 - 255) :@{ub} These specify the color to key through.
@{b}Green (0 - 255) :@{ub}
@{b}Blue  (0 - 255) :@{ub}
@{b}Variance :@{ub} This adjusts how much variance in the intensity of the RGB elements that
           you'll allow in the key.
@{b}Attributes :@{ub} Which attributes should be pulled through the key.  @{"Notes" link fxnotes}
@endnode

@node fxmix "FX_Mix"

FX_Mix blends two textures.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Buffer A (-1 - 9) :@{ub} @{"Notes" link fxnotes}
@{b}Buffer B (-1 - 9) :@{ub}
@{b}A Transparency (0 - 1) :@{ub} Affects how transparent Buffer A is.
                 0 will make Buffer A completely solid, 
                .5 will make Buffer A half transparent, so that A & B 
                   are combined equally.
                 1 will make A completely transparent so that B
                   shows through 
@{b}Attributes :@{ub} Which attributes should be mixed.  @{"Notes" link fxnotes}
@endnode


@node fxrestoreattr "FX_RestoreAttr"

FX_RestoreAttr places the attributes stroed in a buffer
back on the object.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Buffer (0 - 9) :@{ub} The buffer to get the attributes from.  @{"Notes" link fxnotes}
@{b}Attributes :@{ub} This specifies which attributes should be restored.  @{"Notes" link fxnotes}
@endnode



@node fxsaveattr "FX_SaveAttr"

FX_SaveAttr stores the the attributes on the object in a buffer.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Buffer Number (0 - 9) :@{ub} The buffer to store the attributes in.  @{"Notes" link fxnotes}
@endnode


@node fxtintshade "FX_TintShade"

FX_TintShade tints and shades attributes.

@{b}@{u}Parameters:@{ub}@{uu}
@{b}Buffer (-1 - 9) :@{ub} The buffer to affect.  @{"Notes" link fxnotes}
@{b}T-S Buffer (-1 - 9) :@{ub} The buffer that contains the tint/shade map.
@{b}T-S Strength (0 - 1) :@{ub} Adjust how much effect the t-s map has .
@{b}Attributes :@{ub} What attributes the t-s map can effect. 
             Color Reflectivity & Filter only.  @{"Notes" link fxnotes}

This tint-shade map works like this:

Original Object   Color of the                     Results:  
@{u}    Color           T-S map         T-S Strength = 1    T-S Strength = .5@{uu}
     Red             Black                 Black             Dark Red
     Red       grey(128,128,128)            Red                Red
     Red             White                 White            Bright Red
@endnode


@node fxnotes "FX   Notes"
@wordwrap

The FX textures are a replacement to my Alpha texture, Although this series
of textures doesn't provide any more functions the the Alpha texture, it will allows for future expansion.

@{b}Buffers@{ub}
The buffers are used to store the attributes on the object, there are 10 total buffers numbered 0 through 9.  Most textures also allow you to specify a negative value which signifies that the texture should use the attributes currently on the object.

@{b}Attributes@{ub}
The Attribute parameter is used in a few of the FX textures.  The value of this parameter tells the texture which attributes to work with.  To get the value, simply add the numbers for the attributes you wish to use:

1-Color 
2-Reflectivity
4-Filter
8-Bump
16-Fog

For example:  to affect the Color, Reflectivity and Filter, simply add 1 + 2 + 4 = 7.
@endnode

