Go to Okino Home Page Contact Okino
COLLADA Exporter Logo




 Extensions Output by the Okino COLLADA Exporter

 

This section documents which COLLADA extensions are output by the Okino exporter. This section includes the following sub-sections which document the extensions:

 

·          <texture> Material Extensions

·          Bump Map Texture Extension

·          <profile_COMMON> Material Extensions

·          <double_sided> Material Extension

·          Camera Extensions

·          Point & Spot Light Extensions

·          Visibility” Flags for Hidden Geometry Extensions

·          Okino Meta Data Extensions

·          Global Scene-Level Extensions

·          Example Usage of the above Texture and Material Extensions

 

These are output in the <extra> sections associated with various file elements.

 

<texture> Material Extensions

 

These extensions are <extra> children of texture definitions within a Phong shader:

             <effect><profile_COMMON><phong><[texture type]><texture>

The extensions define additional parameters related to the application of the texture map to the shader.

 

Okino <texture> Extensions:

 

Element

Attrib Supported

Type

Description

 

 

 

 

<weighting>

sid

float

This is the intensity multiplier associated with each Okino texture map, except for a bump map for which it is the bump mapping intensity. The multiplier is used to scale the intensity of the texture map or overall bump mapping effect. Default value 1.0. Range is 0.0 to 1.0. For RGB texture maps, the 3 RGB multipliers are averaged together into this one weighting value.

<modulation_source>

sid

string

Set to “rgb” or “alphachan”. This parameter determines whether the RGB color of the texture map or its alpha channel will be used as the method of modulation for the texture map. For example, if set to “alphachan” then the alpha channel will be fed into a diffuse texture map’s RGB intensity channel, the overall opacity value, or the bump map intensity of the shader.

<color_blending_mask>

sid

string

Set to “rgb”, “alphachan” or “off”. This tag determines how the color from the texture image is to be mixed  with the previous diffuse, ambient, luminous, specular and filter color layers of  the surface.

 

If set to “off”, which is the default, then the color mixing is set completely by <mix_with_previous_layer>.

 

If set to “rgb” then the color mixing is controlled both by the <mix_with_previous_layer> value and the intensity of the RGB colors from the texture image. If the RGB  intensity of the texture image is bright then the texture image will dominate  the surface color, else if the RGB intensity is dark then the previous layer  color will dominate. The value of <mix_with_previous_layer> is multiplied into the RGB intensity thus allowing a method to control the mixing between the previous layer color and the color output from the texture image.

 

If set to “alphachan” then the color mixing is controlled both by <mix_with_previous_layer> and the linear grayscale intensity of the alpha channel from the  texture image. If the alpha channel intensity of the texture image is bright  then the RGB color from the texture image will dominate the surface color,  else if the alpha channel intensity is dark then the previous layer color will dominate.  The value of <mix_with_previous_layer> is multiplied into the alpha channel intensity thus allowing a method to control the mixing between the previous layer color and the RGB color output from the texture image.

<mix_with_previous_layer>

sid

float

Okino texture maps are layered on top of each other. This value determines how the color from the previous layer is mixed into the current layer. A value of 1.0 uses only the current texture layer’s intensity values. A value of 0.0 uses only the previous texture layer’s intensity values. A value of 0.5 uses a 50/50 mix of both the current texture output and the cumulated textures from the previous layer. The default is 1.0.

 

 

3ds max Compliant <texture> Extensions, “MAX3D”

 

Element

Attrib Supported

Type

Description

 

 

 

 

<amount>

sid

float

Equivalent to the <weighting> tag of the OKINO extension explained in the table able.

 

 

Maya Compliant <texture> Extensions, “MAYA”

 

Element

Attrib Supported

Type

Description

 

 

 

 

<wrapU>, <wrapV>

sid

string

These determine if the texture map is to tile in the U and/or V directions. 1 = yes, 0 = no.

<repeatU>, <repeatV>

sid

float

These are the U and V texture repeat values (scaling). For example, a value of 2 will tile the texture twice or scale it smaller by a factor of 0.5. The scale = 1.0 / repeat.

<offsetU>, <offsetV>

sid

float

These are the U and V texture offset values. A value of 0.5 will offset the texture half-way across its domain.

<rotateUV>

sid

float

This is the texture rotation which is always 0.

 

 

Bump Map Texture Extension

 

The COLLADA file format does not provide for the definition of <bump> map textures. They are exported via the "FCOLLADA" extension <bump> as defined in this example below. The children in the <extra> section are described in the <texture> extensions section above.

 

            <technique profile="FCOLLADA">

              <bump>

                <texture texture="fireplac_tif-sampler" texcoord="uv0">

                <extra>

                        [ as defined in the <texture> extensions section above ]

                </extra>

                </texture>

              </bump>

 </technique>

 

 

<profile_COMMON> Material Extensions

 

These extensions are <extra> children of a <profile_COMMON> shader:

             <effect><profile_COMMON>

The extensions define additional parameters related to the shading parameters of a material.

 

Okino <profile_COMMON> Extensions:

 

Element

Attrib Supported

Type

Description

 

 

 

 

<filter_color>, <color>

sid

RGB

The RGB filter color

<phong>, <shininess>

sid

float

For Okino Phong shaders this is the 0.0 to 100.0 intensity of the Phong highlight intensity (the shininess). For Okino Blinn shaders this is equal to 100.0 * (1.0 / C3).

<phong>, <metal>

sid

float

This value determines if the specular highlight will take on the color of the light source (0.0) or the material specular color (1.0). The default is 0.0.

<shading_coefficients>, <<type>>

sid

float

This sets the shading multiplier for each shader channel. <type> is one of <ambient>, <diffuse>, <specular>, <luminous>, <reflect> or <filter>. These values are usually in the range of 0.0 to 1.0, although the <specular> is allowed to exceed 1.0 in Okino software. For example, a value of 0.5 for <diffuse> will scale the final computed diffuse shading value by 0.5 before being mixed into the final output color.

<opacity>, <face>

sid

float

This is the overall material opacity. 0.0 = transparent and 1.0 = opaque.

<opacity>, <reflect>

sid

float

This is the highlight opacity. 0.0 = transparent and 1.0 = opaque.

<opacity>, <edge>

sid

float

This is the edge opacity when <edge_enable> is set to 1 (on). 0.0 = transparent and 1.0 = opaque.

<opacity>, <edge_exponent>

sid

float

This determines the dominant opacity for edges. Values 0 to 1 bias towards the <face> opacity while values from 1 to 50 bias towards the <edge> opacity.

<opacity>, <edge_enable>

sid

int

If set to ‘1’ then “<opacity>, <edge>” and “<opacity>, <edge_exponent>” will be enabled in which case the opacity will change as the edge of an object is shaded (such as the sides of a sphere). This allows “glass like” changes in opacity to be made based on surface curvature. If set to ‘0’ then the edge opacities will be ignored.

 

 

<double_sided> Material Extension

 

If the “Output <double_sided> asset flag” UI checkbox is enabled on the exporter, in the “Materials” panel, then the <double_sided> flag will be output to the COLLADA material section using the “OKINO”, “MAX3D” and “GOOGLEEARTH” profiles. See below for a placement example. This informs the destination viewer to disable back-face culling for the object to which the material is assigned (in other words, all polygons will be rendered even if some are technically pointing away from the camera).

 

 

Camera Extensions

 

The “OKINO” and “XSI” profiles define the <interestdist> tag which is the distance from a perspective camera’s look-at and look-from locations. Since COLLADA orients cameras via a matrix, this relationship of distance between the look-from and look-at locations are lost.

 

    <camera id="default-camera" name="default_3">

      <optics>

           

      </optics>

      <extra>

        <technique profile="OKINO">

          <interestdist>32.015621</interestdist>

        </technique>

 

        <technique profile="XSI">

          <XSI_Camera>

            <xsi_param sid="interestdist">32.015621</xsi_param>

          </XSI_Camera>

        </technique>

      </extra>

    </camera>

 

 

Point & Spot Light Extensions

 

The “FCOLLADA” profile and the <target_default_dist> tag is used to output the Okino light parameter for a point or spot light which defines the distance from the light source at which the light intensity starts to decay from its normal intensity down to 0. This is an Okino specific light decay parameter.

 

    <light id="Omni01-light" name="Omni01">

      <technique_common>

        <point>

          <color>1.000000 1.000000 1.000000</color>

        </point>

      </technique_common>

      <extra>

        <technique profile="FCOLLADA">

          <target_default_dist>111.487755</target_default_dist>

        </technique>

      </extra>

    </light>

 

 

“Visibility” Flags for Hidden Geometry Extensions

 

If a geometry instance is hidden and the “Hidden Objects” radio button on the exporter is set to “Output as <extra> tag” then the following FCOLLADA and XSI profile tags are output as children of a <node>:

 

        <node id="Box-node" name="Box" type="NODE">

          <extra>

            <technique profile="FCOLLADA">

              <visibility>0</visibility>

             </technique>

 

             <technique profile="XSI">

              <SI_Visibility>

                <xsi_param sid="visibility">FALSE</xsi_param>

                </SI_Visibility>

              </technique>

             </extra>

 

 

Okino Meta Data Extensions

 

Meta data is output using the Okino <metadata_collection> and <metadata> extensions for meta data associated with the Okino global scene or for instances (geometry), cameras, lights and materials (surfaces).

 

The following internal Okino scene graph meta data types are supported when exporting to COLLADA: strings, shorts, ints, floats, colors, vectors, double precision vectors, 4x4 matrices, 4x4 double precision matrices, time, double precision floats, 4 valued vectors, and 4-valued double precision vectors. All numeric values will be converted into meta data string for output to COLLADA, as exemplified in the example below.

 

Example of Meta Data on an Instance (geometry node):

 

        <node id="Box-node" name="Box" type="NODE">

          <extra>

            <technique profile="OKINO">

              <metadata_collection>

                <metadata type="string" name="NdString for Nt_INSTANCE">NdString data item</metadata>

                <metadata type="string" name="NdChar for Nt_INSTANCE">NdChar data item</metadata>

                <metadata type="string" name="5 NdShorts for Nt_INSTANCE">ok_short: -1; 0; 1; 2; 3</metadata>

                <metadata type="string" name="5 NdInts for Nt_INSTANCE">ok_int: -1; 0; 1; 2; 3</metadata>

                <metadata type="string" name="5 NdFloats for Nt_INSTANCE">ok_float: -1.000000; 0.000000; 1.000000; 2.000000; 3.000000</metadata>

                <metadata type="string" name="3 NdColors for Nt_INSTANCE">ok_color: (1.000000, 0.000000, 0.000000); (0.000000, 1.000000, 0.000000); (0.000000, 0.000000, 1.000000)</metadata>

                <metadata type="string" name="3 NdVectors for Nt_INSTANCE">ok_vector: (1.000000, 2.000000, 3.000000); (0.100000, 0.200000, 0.300000); (-1.000000, -2.000000, -3.000000)</metadata>

                <metadata type="string" name="2 NdMatrices for Nt_INSTANCE">ok_matrix: [(0.000000, -0.100000, -0.200000, -0.300000), (-0.400000, -0.500000, -0.600000, -0.700000), (-0.800000, -0.900000, -1.000000, -1.100000), (-1.200000, -1.300000, -1.400000, -1.500000)]; [(0.000000, 0.100000, 0.200000, 0.300000), (0.400000, 0.500000, 0.600000, 0.700000), (0.800000, 0.900000, 1.000000, 1.100000), (1.200000, 1.300000, 1.400000, 1.500000)]</metadata>

                <metadata type="string" name="2 NdDblMatrices for Nt_INSTANCE">ok_dblmatrix: [(0.000000, -0.100000, -0.200000, -0.300000), (-0.400000, -0.500000, -0.600000, -0.700000), (-0.800000, -0.900000, -1.000000, -1.100000), (-1.200000, -1.300000, -1.400000, -1.500000)]; [(0.000000, 0.100000, 0.200000, 0.300000), (0.400000, 0.500000, 0.600000, 0.700000), (0.800000, 0.900000, 1.000000, 1.100000), (1.200000, 1.300000, 1.400000, 1.500000)]</metadata>

                <metadata type="string" name="5 NdTimes for Nt_INSTANCE">ok_time: 0; 1; 5; 10; 100</metadata>

                <metadata type="string" name="5 NdDoubles for Nt_INSTANCE">ok_double: -1.000000; 0.000000; 1.000000; 5.000000; 10.000000</metadata>

                <metadata type="string" name="3 NdVector4's for Nt_INSTANCE">ok_vector4: (1.000000, 2.000000, 3.000000, 4.000000); (0.100000, 0.200000, 0.300000, 0.400000); (-1.000000, 0.000000, 10.000000, 100.000000)</metadata>

                <metadata type="string" name="3 NdDblVector's for Nt_INSTANCE">ok_dblvector: (1.000000, 2.000000, 3.000000); (0.100000, 0.200000, 0.300000); (-1.000000, 0.000000, 100.000000)</metadata>

                <metadata type="string" name="3 NdDblVector4's for Nt_INSTANCE">ok_dblvector4: (1.000000, 2.000000, 3.000000, 4.000000); (0.100000, 0.200000, 0.300000, 0.400000); (-1.000000, 0.000000, 10.000000, 100.000000)</metadata>

              </metadata_collection>

            </technique>

          </extra>

        </node>

 

Example of Meta Data from the Global Scene (geometry node):

 

  <library_visual_scenes>

    <visual_scene id="RootNode" name="RootNode">

      <extra>

        <technique profile="OKINO">

          <scene_metadata_collection>

            <metadata type="string" name="NdString for global scene">NdString data item</metadata>

          </scene_metadata_collection>

        </technique>

      </extra>

 

 

Global Scene-Level Extensions

 

These extensions are defined at the global <library_visual_scenes><visual_scene> level.

 

Profile

Element

Type

Description

 

 

 

 

OKINO

<scene_bounding_min>

3 floats

The XYZ of the scene’s minimum bounding box

OKINO

<scene_bounding_max>

3 floats

The XYZ of the scene’s maximum bounding box

 

 

 

 

MAX3D

<frame_rate>

floats

The animation frame rate in frames per second

 

 

 

 

XSI

<SI_Scene>< frameRate >

floats

The animation frame rate in frames per second

XSI

<SI_Scene><start>

floats

The animation start time in seconds

XSI

<SI_Scene><end>

floats

The animation end time in seconds

XSI

<SI_Scene><timing>

string

Units of animation time. Always SECONDS.

XSI

<SI_Ambience> r, g, b

3 floats

The ambient light intensity * color.

 

 

 

 

FCOLLADA

<start_time>

floats

The animation start time in seconds

FCOLLADA

<end_time>

floats

The animation end time in seconds

 

Example:

 

  <library_visual_scenes>

    <visual_scene id="RootNode" name="RootNode">

      <node id="default-node" name="default_3" type="NODE">

            … scene nodes …

      </node>

      <extra>

 

        <technique profile="OKINO">

          <scene_bounding_min>-10.610766 -10.103974 0.000000</scene_bounding_min>

          <scene_bounding_max>10.425134 11.679101 19.599020</scene_bounding_max>

        </technique>

 

        <technique profile="MAX3D">

          <frame_rate>30</frame_rate>

        </technique>

 

        <technique profile="XSI">

          <SI_Scene>

            <xsi_param sid="frameRate">30</xsi_param>

            <xsi_param sid="start">0.000000</xsi_param>

            <xsi_param sid="end">3.299792</xsi_param>

            <xsi_param sid="timing">"SECONDS"</xsi_param>

          </SI_Scene>

          <SI_Ambience>

            <xsi_param sid="red">1.000000</xsi_param>

            <xsi_param sid="green">1.000000</xsi_param>

            <xsi_param sid="blue">1.000000</xsi_param>

          </SI_Ambience>

        </technique>

 

        <technique profile="FCOLLADA">

          <start_time>0.000000</start_time>

          <end_time>3.299792</end_time>

        </technique>

      </extra>

    </visual_scene>

  </library_visual_scenes>

  <scene>

 

 


 

Example Usage of the above Texture and Material Extensions

 

    <effect id="fireplace-fx" name="fireplace">

      <profile_COMMON>

           

        <technique sid="common">

          <phong>

           

            <diffuse>

              <texture texture="fireplac_tif-sampler" texcoord="uv0">

              <extra>

                <technique profile="OKINO">

                  <weighting>1.000000</weighting>

                  <modulation_source>rgb</modulation_source>

                  <color_blending_mask>off</color_blending_mask>

                  <mix_with_previous_layer>1.000000</mix_with_previous_layer>

                </technique>

 

                <technique profile="MAX3D">

                  <amount>1.000000</amount>

                </technique>

 

                <technique profile="MAYA">

                  <wrapU>1</wrapU>

                  <wrapV>1</wrapV>

                  <repeatU>1.000000</repeatU>

                  <repeatV>1.000000</repeatV>

                  <offsetU>0.000000</offsetU>

                  <offsetV>0.000000</offsetV>

                  <rotateUV>0.000000</rotateUV>

                </technique>

 

              </extra>

              </texture>

            </diffuse>

           

          </phong>

          <extra>

            <technique profile="GOOGLEEARTH">

              <double_sided>1</double_sided>

            </technique>

            <technique profile="OKINO">

              <double_sided>1</double_sided>

            </technique>

 

            <technique profile="OKINO">

              <filter_color>

                <color>1.000000 1.000000 1.000000 1</color>

              </filter_color>

              <phong>

                <shininess>32</shininess>

                <metal>0.000000</metal>

              </phong>

              <shading_coefficients>

                <ambient>0.300000</ambient>

                <diffuse>0.400000</diffuse>

                <specular>0.700000</specular>

                <luminous>0.000000</luminous>

                <reflect>0.000000</reflect>

                <filter>1.000000</filter>

              </shading_coefficients>

              <opacity>

                <face>1.000000</face>

                <reflect>1.000000</reflect>

                <edge>1.000000</edge>

                <edge_exponent>1.000000</edge_exponent>

                <edge_enable>0</edge_enable>

              </opacity>

            </technique>

 

            <technique profile="FCOLLADA">

              <bump>

                <texture texture="fireplac_tif-sampler" texcoord="uv0">

                <extra>

                  <technique profile="OKINO">

                    <weighting>1.000000</weighting>

                    <modulation_source>rgb</modulation_source>

                  </technique>

                  <technique profile="MAX3D">

                    <amount>1.000000</amount>

                  </technique>

                  <technique profile="MAYA">

                    <wrapU>1</wrapU>

                    <wrapV>1</wrapV>

                    <repeatU>1.000000</repeatU>

                    <repeatV>1.000000</repeatV>

                    <offsetU>0.000000</offsetU>

                    <offsetV>0.000000</offsetV>

                    <rotateUV>0.000000</rotateUV>

                  </technique>

 

                </extra>

                </texture>

              </bump>

            </technique>

          </extra>

        </technique>

      </profile_COMMON>

 

      <extra>

        <technique profile="MAX3D">

          <double_sided>1</double_sided>

        </technique>

      </extra>

 

    </effect>