<!-- Converted by db4-upgrade version 1.0 -->

<article xmlns="http://docbook.org/ns/docbook" version="5.0">
  <info><title>Using the Extruded Bitmap Primitive</title>
    

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../../books/en/tutorial_series_authors.xml" xpointer="Intro_MGED_Tutorial_Series_III_authors"/>

    <legalnotice>
       <para>Approved for public release; distribution is unlimited</para>
   </legalnotice>
  </info>

  <para xml:id="ebm1">
    The extruded bitmap (ebm) primitive allows the user to make a
    three-dimensional (3-D) shape from a two-dimensional black-and-white
    image. This feature can be helpful when dealing with complex outlines,
    text, or other complicated shapes captured as images.
  </para>

  <para xml:id="ebm2">
    For example, the ebm could be used if one wanted to model 3-D letters,
    such as in a company name, onto the side of a simulated wall or building.
    Note also that the same image used for the projection can, with some extra
    processing, form the basis for the ebm (see Figures C-1-C-3).
  </para>

  <figure xml:id="ebm3"><info><title>Example of the .bw image used for ebm.</title></info>
    
    <mediaobject>
      <imageobject>
	<imagedata align="center" fileref="../../articles/en/images/ebm_primitive_fig01.png" format="PNG"/>
      </imageobject>
    </mediaobject>
  </figure>
  
  <figure xml:id="ebm4"><info><title>Example of ebm.</title></info>
    
    <mediaobject>
      <imageobject>
	<imagedata align="center" fileref="../../articles/en/images/ebm_primitive_fig02.png" format="PNG"/>
      </imageobject>
    </mediaobject>
  </figure>
  
  <figure xml:id="ebm5"><info><title>Example of the ebm with projection shader added.</title></info>
    
    <mediaobject>
      <imageobject>
	<imagedata align="center" fileref="../../articles/en/images/ebm_primitive_fig03.png" format="PNG"/>
      </imageobject>
    </mediaobject>
  </figure>

  <para xml:id="ebm6">
    To make an ebm, the image file must be a black and white (.bw) file. A .bw
    image is a grayscale raw image file with only one channel. Each pixel can
    be turned on or off, but it has no color data. As shown in Figures C-2 and
    C-3, the white part of the image may be extruded in a straight line in the
    +Z direction to whatever length the user specifies. Regardless of the
    complexity of the geometry, all of the extruded shapes form a single ebm
    primitive.
  </para>

  <para xml:id="ebm7">
    To enter an ebm in a database, the in command must be used. The arguments
    are as shown in the following example:
  </para>

  <informaltable frame="all" xml:id="ebm8">
    <tgroup cols="7">
      <tbody>
	<row><entry>in</entry><entry>sample.ebm</entry><entry>ebm</entry><entry>image.bw</entry><entry>600</entry><entry>800</entry><entry>1</entry></row>
	<row>
	  <entry>Make a shape.</entry>
	  <entry>Name it sample.</entry>
	  <entry>Make it an ebm.</entry>
	  <entry>Use the image.bw image file.</entry>
	  <entry>The image is 600 pixels wide.</entry>
	  <entry>The image is 800 pixels high.</entry>
	  <entry>Extrude the shape 1 inch (or whatever working units are in effect at the time) in the +Z direction.</entry>
	</row>
      </tbody>
    </tgroup>
  </informaltable>

  <note xml:id="ebm9"><info><title>Points to Remember About the ebm</title></info>
    
    <itemizedlist mark="bullet">
      <listitem>
	<para>
	  The ebm cannot be created with the make, create, or inside        
	  commands.
	</para>
      </listitem>
      <listitem>
	<para>
	  The desired width and height of the ebm are input as pixel        
	  values, but the extrusion distance can be expressed in any        
	  working units.   
	</para>
      </listitem>
      <listitem>
	<para>
	  Extrusions are made in the +Z direction, although after an ebm is 
	  made, the shape can be rotated, translated, or scaled.
	</para>
      </listitem>
      <listitem>
	<para>
	  When extruded, all shapes form a single ebm primitive.
	</para>
      </listitem>
    </itemizedlist>
  </note>
</article>
