Bl
Bl
Bl
Bl
Bl
You are here:   Home »  Import CAD Formats »  NGRAIN's 3KO Solutions  
Bl
COLLADA Exporter Logo


Left navUp navRight nav


More Extensions Output by the Okino COLLADA Exporter

This section documents which COLLADA extensions are output by the Okino exporter. It 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

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>< frame Rate >

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="frame Rate">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>

Left navUp navRight nav