COLLADA Models
STK natively reads COLLADA (.dae) files. COLLADA is a popular open standards-based format that can be exported from many 3D editing applications (e.g., 3D Studio Max, Maya, Softimage, Blender, and Google SketchUp) and model converters, such as:
- Core, by Anark, recommended for CAD conversion.
- Deep Exploration, by Right Hemisphere.
- PolyTrans, by Okino Computer Graphics.
Ancillary Features
STK-specific features such as articulated components, attach points, and pointable elements can be added to COLLADA models. These features only pertain to STK and are called ancillary features. For the equivalent features in the MDL format, see Model Parameters.
Ancillary features use extended XML keywords that are associated with the COLLADA model using two methods.
- Adding ancillary keywords inside the COLLADA file. This option is more compact but keywords can get lost when resaving the model from a 3D editing tool.
- Storing ancillary keywords in a separate ancillary file (*.anc). STK associates the ancillary file with the COLLADA file when both reside in the same directory and share the same base name (e.g., ikonos.dae and ikonos.anc). This option minimizes the risk that ancillary keywords get lost when resaving a COLLADA file.
The ancillary file is an XML document with the following header and footer:
<?xml version="1.0" standalone="yes" ?><ancillary_model_data version="1.0">
…. ancillary data belongs here….
</ancillary_model_data>Syntax for Ancillary Features
Syntax for adding the ancillary data to the COLLADA model is shown below for both methods. Either way produces equivalent results, so only one method should be used.
Articulations
Articulations are components (e.g., rocket stages, landing gear, doors, and propellers) that move in various ways. The motion is controlled via an articulation script.
Ancillary Syntax in COLLADA (*.dae)
<extra type="articulation_data">
<technique profile="AGI">
<library_articulations>
<articulation id="HGA_Az" type="transform">
<stage type="xRotate" name="Roll" min="-182.5" init="0" max="72.5"/>
</articulation>
<articulation id="HGA_El" type="transform">
<stage type="yRotate" name="Pitch" min="-67.5" init="0" max="187.5"/>
</articulation>
<articulation id="Ikonos_1" type="transform">
<stage type="uniformScale" name="Size" min="0" init="1" max="1"/>
<stage type="xRotate" name="Roll" min="-360" init="0" max="360"/>
<stage type="yRotate" name="Pitch" min="-360" init="0" max="360"/>
<stage type="zRotate" name="Yaw" min="-360" init="0" max="360"/>
<stage type="xTranslate" name="MoveX" min="-1000" init="0" max="1000"/>
<stage type="yTranslate" name="MoveY" min="-1000" init="0" max="1000"/>
<stage type="zTranslate" name="MoveZ" min="-1000" init="0" max="1000"/>
</articulation>
<articulation id="Logo" type="transform">
<stage type="uniformScale" name="Size" min="0" init="1" max="1"/>
</articulation>
<articulation id="SolarPanel" type="transform">
<stage type="yRotate" name="Fold" min="-90" init="0" max="0"/>
</articulation>
<articulation id="Thermal_Door" type="transform">
<stage type="xRotate" name="Roll" min="-220" init="0" max="0"/>
</articulation>
</library_articulations>
</technique>
</extra>
Ancillary Syntax in Ancillary File (*.anc)
<articulations>
<articulation name = "HGA_Az" type = "transform">
<stage init = "0" max = "72.5" min = "-182.5" name = "Roll" type = "xRotate" />
<assigned_nodes>
ParentLayer4_ikonos_M2L-Refer
</assigned_nodes>
</articulation>
<articulation name = "HGA_El" type = "transform">
<stage init = "0" max = "187.5" min = "-67.5" name = "Pitch" type = "yRotate" />
<assigned_nodes>
ParentLayer1_ikonos_M2L-Refer-3
</assigned_nodes>
</articulation>
<articulation name = "Ikonos_1" type = "transform">
<stage init = "1" max = "1" min = "0" name = "Size" type = "uniformScale" />
<stage init = "0" max = "360" min = "-360" name = "Roll" type = "xRotate" />
<stage init = "0" max = "360" min = "-360" name = "Pitch" type = "yRotate" />
<stage init = "0" max = "360" min = "-360" name = "Yaw" type = "zRotate" />
<stage init = "0" max = "1000" min = "-1000" name = "MoveX" type = "xTranslate" />
<stage init = "0" max = "1000" min = "-1000" name = "MoveY" type = "yTranslate" />
<stage init = "0" max = "1000" min = "-1000" name = "MoveZ" type = "zTranslate" />
<assigned_nodes>
ikonos_M2L_ROOT-Refer
</assigned_nodes>
</articulation>
<articulation name = "Logo" type = "transform">
<stage init = "1" max = "1" min = "0" name = "Size" type = "uniformScale" />
<assigned_nodes>
ParentLayer1_ikonos_M2L-Refer
</assigned_nodes>
</articulation>
<articulation name = "SolarPanel" type = "transform">
<stage init = "0" max = "0" min = "-90" name = "Fold" type = "yRotate" />
<assigned_nodes>
IncludeLayer6_ikonos_M2L-Refer
IncludeLayer6_ikonos_M2L-Refer-2
IncludeLayer6_ikonos_M2L-Refer-3
</assigned_nodes>
</articulation>
<articulation name = "Thermal_Door" type = "transform">
<stage init = "0" max = "0" min = "-220" name = "Roll" type = "xRotate" />
<assigned_nodes>
ParentLayer1_ikonos_M2L-Refer-2
</assigned_nodes>
</articulation>
</articulations>
Sensor Attach Points
Sensor attach points are used for attaching STK sensors to the 3D model.
Ancillary Syntax in COLLADA (*.dae)
<node id="AP13_HGA_AP">
..............
<extra type="attach_point">
<technique profile="AGI">
<sensor_attach_point/>
</technique>
</extra>
..............
</node>
Ancillary Syntax in Ancillary File (*.anc)
<sensor_origins>
AP13_HGA_AP
</sensor_origins>
Effect Attach Points
Effect attach points are used for attaching vapor trails to the 3D model.
Ancillary Syntax in COLLADA (*.dae)
<node id="AP13_HGA_AP">
..............
<extra type="attach_point">
<technique profile="AGI">
<effect_attach_point/>
</technique>
</extra>
..............
</node>
Ancillary Syntax in Ancillary File (*.anc)
<effect_origins>
AP13_HGA_AP
</effect_origins>
Pointable Elements
Pointable elements are components (e.g., radio dishes, cameras, and sun tracking panels) that can automatically point to and target other objects.
Ancillary Syntax in COLLADA (*.dae)
<node id="ParentLayer1_ikonos_M2L-Refer-3">
.............
<extra type="attach_point">
<technique profile="AGI">
<pointing_attach_point>
<pointable_vector>
0 0 1
</pointable_vector>
</pointing_attach_point>
</technique>
</extra>
..............
</node>
Ancillary Syntax in Ancillary File (*.anc)
<pointing_data>
<pointing node = "ParentLayer1_ikonos_M2L-Refer-3" vector = "0 0 1" />
</pointing_data>
Solar Panel Groups
Solar Panel Groups are components defined as solar panels and assigned an efficiency value. This is useful when running the STK solar panel tool.
Ancillary Syntax in COLLADA (*.dae)
<node id="SolarPanel-PolygonMesh">
......................
<extra type="attach_point">
<technique profile="AGI">
<solar_panel group="Ikonos" efficiency="14"/>
</technique>
</extra>
......................
</node>
Ancillary Syntax in Ancillary File (*.anc)
<solar_panel_groups>
<solar_panel_group efficiency = "14" name = "Ikonos">
<assigned_nodes>
SolarPanel-PolygonMesh
</assigned_nodes>
</solar_panel_group>
</solar_panel_groups>
Non-obscuring Material
Non-obscuring materials are components (e.g., secondary mirrors, and radar domes) that are invisible to sensors. This is useful when running the STK sensor obscuration tool.
Ancillary Syntax in COLLADA (*.dae)
<node id="Camera-PolygonMesh">
............................
<extra type="attach_point">
<technique profile="AGI">
<no_obscuration/>
</technique>
</extra>
............................
</node>
Ancillary Syntax in Ancillary File (*.anc)
<no_obscuration_nodes>
Camera-PolygonMesh
</no_obscuration_nodes>
Collada does not contain the equivalent BoundRadius keyword from the MDL format. The bound radius is automatically computed with COLLADA models but not with MDL.
Advanced Shading
Collada models also support the ColladaFX framework, which allows users to write GLSL code to calculate vertex positions, pixel colors, etc. This allows for models to exhibit lighting properties of materials such as metal, glass, plastic, etc. ColladaFX also allows changing OpenGL States, use of all supported OpenGL Texture types (1D, 2D, 3D, cubemap, rectangle, shadow), and render to texture for use with multipass rendering techniques.
![]() |
Satellite that uses a metallic BRDF based on the work of Ashikhmin and Shirley. The paper can be found here. |
Within your shader code, you have access to scene data that is useful for shading your model. We refer to these as Preset Uniforms because they are accessed as uniform variables in your vertex or fragment shader. These variables must be declared as uniforms and then can be used. Here is an example using Insight3D's animation time to move a vertex.
GLSL
uniform float agi_Time; uniform float fullOffset; // Vertex Shader that oscillates from position to position+fullOffset along the Z axis. void main() { // Get fractional part of time float t = fract(agi_Time); // Move apply modelview and projection vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex; // Move vertex a certain percentage of offset pos.z += fullOffset * t; // Set position gl_Position = pos; }
Preset Uniform | Type | Description |
---|---|---|
agi_ActiveLights | bool[gl_MaxLights] | Light i is active if agi_ActiveLights[i] is true and inactive if false. Light properties can be accessed through gl_LightSources. |
agi_CameraPosition | vec3 | Position of the camera relative to the model's reference frame. |
agi_CentralBodyDepthTexture0, agi_CentralBodyDepthTexture1, ..., agi_CentralBodyDepthTexture7 | sampler2D | A texture that contains the depth values after rendering the Central Body. The number binds the texture to a particular texture unit. See example image below. |
agi_LightingEnabled | float | 1 if lighting is enabled and 0 otherwise |
agi_LODGeometricToleranceOverDistance | float | When multiplied by the distance from the vertex or fragment to the viewer, the result is the geometric error in world space. |
agi_LODNegativeGeometricToleranceOverDistance | float | Negative of agi_LODGeometricToleranceOverDistance |
agi_ModelViewMatrix | mat4 | Modelview matrix |
agi_ModelViewMatrixRelativeToCameraPosition | mat4 | Modelview matrix relative to the camera position |
agi_ModelViewMatrixRelativeToPrimitiveCenter | mat4 | Modelview matrix relative to the model's center |
agi_ModelViewProjectionMatrix | mat4 | Modelview projection matrix |
agi_ModelViewProjectionMatrixRelativeToCameraPosition | mat4 | Modelview projection matrix relative to the camera position |
agi_ModelViewProjectionMatrixRelativeToPrimitiveCenter | mat4 | Modelview projection matrix relative to the model's center |
agi_OrthographicProjectionMatrix | mat4 | Orthographic projection matrix |
agi_PerspectiveProjectionMatrix | mat4 | Perspective projection matrix |
agi_PrimitiveBoundingSphere | vec4 | The model's bounding sphere relative to the model's reference frame. The structure is xyz components are the position and w is the radius in meters. |
agi_PrimitiveBoundingSphereRelativeToCameraPosition | vec4 | The model's bounding sphere relative to the camera position. The structure is xyz components are the position and w is the radius in meters. |
agi_PrimitiveColor | vec4 | The color of the primitive |
agi_SnapshotPixelScale | float | Scale for when rendering high resolution snap shots. Otherwise it is 1. |
agi_TerrainSilhouetteTexture0, agi_TerrainSilhouetteTexture1, ..., agi_TerrainSilhouetteTexture7 | sampler2D | A texture that contains the silhouette of the terrain. The number binds the texture to a particular texture unit. See example image below. |
agi_Time | float | Number of seconds since the time specified to Animation StartTime property. |
agi_Viewport | vec4 | The viewport in the format (left, bottom, width, height) |
![]() | ![]() |
Central Body rendered normally | Central Body Depth Texture |
![]() |
Example of Terrain Silhouette Texture |
Supported OpenGL States
ColladaFX Element | OpenGL State | Notes |
---|---|---|
alpha_func | glAlphaFunc | |
alpha_test_enable | glEnable/glDisable with GL_ALPHA_TEST | |
blend_color | glBlendColor | |
blend_enable | glEnable/glDisable with GL_BLEND | |
blend_equation | glBlendEquation | |
blend_equation_separate | glBlendEquationSeparate | Requires OpenGL 2.0 |
blend_func | glBlendFunc | |
blend_func_separate | glBlendFuncSeparate | Requires OpenGL 1.4 |
color_mask | glColorMask | |
cull_face | glCullFace | |
cull_face_enable | glEnable/glDisable with GL_CULL_FACE | |
depth_clamp_enable | glEnable/glDisable with GL_DEPTH_CLAMP_NV | Requires GL 3.2 or GL_ARB_depth_clamp |
depth_func | glDepthFunc | |
depth_mask | glDepthMask | |
depth_range | glDepthRange | |
depth_test_enable | glEnable/glDisable with GL_DEPTH_TEST | |
fog_color | glFogfv with GL_FOG_COLOR | |
fog_density | glFogf with GL_FOG_DENSITY | |
fog_enable | glEnable/glDisable with GL_FOG | |
fog_end | glFogf with GL_FOG_END | |
fog_mode | glFogi with GL_FOG_MODE | |
fog_start | glFogf with GL_FOG_START | |
front_face | glFrontFace | |
line_smooth_enable | glEnable/glDisable with GL_LINE_SMOOTH | |
line_stipple | glLineStipple | |
line_stipple_enable | glEnable/glDisable with GL_LINE_STIPPLE | |
line_width | glLineWidth | |
point_size | glPointSize | |
point_smooth_enable | glEnable/glDisable with GL_POINT_SMOOTH | |
polygon_mode | glPolygonMode | Only FRONT_AND_BACK |
polygon_offset | glPolygonOffset | |
polygon_offset_fill_enable | glEnable/glDisable with GL_POLYGON_OFFSET_FILL | |
scissor | glScissor | |
scissor_test_enable | glEnable/glDisable with GL_SCISSOR_TEST | |
shade_model | glShadeModel | |
stencil_func | glStencilFunc | |
stencil_func_separate | glStencilFuncSeparate | Requires OpenGL 2.0 |
stencil_mask | glStencilMask | |
stencil_mask_separate | glStencilMaskSeparate | Requires OpenGL 2.0 |
stencil_op | glStencilOp | |
stencil_op_separate | glStencilOpSeparate | Requires OpenGL 2.0 |
stencil_test_enable | glEnable/glDisable with GL_STENCIL_TEST | |
texture1D | glBindTexture with GL_TEXTURE_1D | |
texture2D | glBindTexture with GL_TEXTURE_2D | |
texture3D | glBindTexture with GL_TEXTURE_3D | |
textureCUBE | glBindTexture with GL_TEXTURE_CUBE_MAP | Requires OpenGL 1.3 |
textureDEPTH | glBindTexture with GL_TEXTURE_2D | Used for depth textures. |
textureRECT | glBindTexture with GL_TEXTURE_RECTANGLE_ARB |
Unsupported OpenGL States
ColladaFX Element | Notes |
---|---|
auto_normal_enable | |
clip_plane | Can be emulated in the fragment shader. Removed from OpenGL 3.2 core. |
clip_plane_enable | Can be emulated in the fragment shader. Removed from OpenGL 3.2 core. |
color_logic_op_enable | Rarely used. |
color_material | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
color_material_enable | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
depth_bounds | Only affects performance, not the visual output. Not in core GL, requires EXT_depth_bounds_test. |
depth_bounds_enable | Only affects performance, not the visual output. Not in core GL, requires EXT_depth_bounds_test. |
dither_enable | Rarely used. |
light_ambient | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_constant_attenuation | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_diffuse | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_enable | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_linear_attenuation | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_model_ambient | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_model_color_control | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_model_local_viewer_enable | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_model_two_side_enable | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_position | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_quadratic_attenuation | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_specular | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_spot_cutoff | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_spot_direction | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
light_spot_exponent | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
lighting_enable | Can be emulated in fragment shader. Fixed function lighting was removed from OpenGL 3.2 core. |
logic_op | Rarely used. |
logic_op_enable | Rarely used. |
material_ambient | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
material_diffuse | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
material_emission | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
material_shininess | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
material_specular | Can be emulated in the fragment shader by implementing a BRDF. Removed from OpenGL 3.2 core. |
model_view_matrix | Can be emulated in the shader. Removed from OpenGL 3.2 core. |
multisample_enable | Requires an OpenGL context be created with multisample buffers, which is currently not supported in Insight3D. |
normalize_enable | This is always enabled. |
point_distance_attenuation | |
point_fade_threshold_size | |
point_size_enable | |
point_size_max | |
point_size_min | |
polygon_offset_line_enable | |
polygon_offset_point_enable | |
polygon_smooth_enable | |
projection_matrix | Can be emulated in the shader. Removed from OpenGL 3.2 core. |
sample_alpha_to_coverage_enable | Requires an OpenGL context be created with multisample buffers, which is currently not supported in Insight3D. |
sample_alpha_to_one_enable | Requires an OpenGL context be created with multisample buffers, which is currently not supported in Insight3D. |
sample_coverage | |
sample_coverage_enable | |
texture_env_color | Can be emulated in the fragment shader. Removed from OpenGL 3.2 core. |
texture_env_color | Can be emulated in the fragment shader. Removed from OpenGL 3.2 core. |
texture_pipeline | GLES profile only. GLSL is currently the only supported profile. |
texture1D_enable | This isn't required when using a texture in a shader. Removed from OpenGL 3.2 core |
texture2D_enable | This isn't required when using a texture in a shader. Removed from OpenGL 3.2 core |
texture3D_enable | This isn't required when using a texture in a shader. Removed from OpenGL 3.2 core |
textureCUBE_enable | This isn't required when using a texture in a shader. Removed from OpenGL 3.2 core |
textureDEPTH_enable | This isn't required when using a texture in a shader. Removed from OpenGL 3.2 core |
textureRECT_enable | This isn't required when using a texture in a shader. Removed from OpenGL 3.2 core |