"No one can be told what GeeXLab is, you have to see it for yourself!"

"Stop Playing Games and Start Making Them! With GeeXLab, your are on your way!"


Quick Links
What is GeeXLab
Download GeeXLab
GeeXLab Requirements
Online Help
Articles and Tutorials
Samples Screenshots
Videos

GeeXLab Changelog

XML Ref. Guide
Scripting Ref. Guide
Code Samples

Purchase GeeXLab
GeeXLab SDK

Shader Library

Follow GeeXLab's News
GeeXLab news, articles, tutorials and demos @ Geeks3D.com
GeeXLab @ Twitter GeeXLab RSS Feed

Subscribe to GeeXLab news by email

[ Back to Geeks3D.com ]

GeeXLab

GeeXLab

Laboratory for Real Time 3D Programming (prototyping and demos)
OpenGL, Lua, Python, GLSL,
PhysX and more...

Reference Guide
XML Nodes



Back to homepage
Back to Developer's Guide Index

<model> XML Node


XML Node Summary
<model
  name=""
  filename=""
  render="TRUE"
  texturing="FALSE"
  lighting="FALSE"
  improve_specular_highlight="TRUE"
  shading_mode="SMOOTH"
  shadow_caster="TRUE"
  back_face_culling="FALSE"
  auto_spin="FALSE"
  compute_normals="FALSE"
  compute_tangent_space="FALSE"
  flip_normals="FALSE"
  average_normals="FALSE"
  display_bounding_box="FALSE"
  display_bounding_sphere="FALSE"
  two_sides_lighting="FALSE"
  display_tripod="FALSE"
  normalize="FALSE"
  auto_update_direction="FALSE"
  polygon_mode="SOLID"
  use_vbo="TRUE"
  nx_add_to_physics_engine="FALSE"
  use_user_transformation="TRUE"
  >
  <add_child
    name=""
    >
  </add_child>
  <alpha_test_params
    active="FALSE"
    func="CMP_FUNC_GREATER"
    ref="0.5"
    >
  </alpha_test_params>
  <blending_params
    active="FALSE"
    src_factor="BLENDING_FACTOR_SRC_ALPHA"
    dst_factor="BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA"
    >
  </blending_params>
  <apply_ambient
    r="0.0"
    g=""
    b=""
    a=""
    >
  </apply_ambient>
  <apply_diffuse
    r="0.0"
    g=""
    b=""
    a=""
    >
  </apply_diffuse>
  <apply_specular
    r="0.0"
    g=""
    b=""
    a=""
    >
  </apply_specular>
  <apply_specular_exp
    r="0.0"
    >
  </apply_specular_exp>
  <bump_mapping_attach_light
    name=""
    >
  </bump_mapping_attach_light>
  <loading_option
    load_texture="TRUE"
    load_normal_map="FALSE"
    pixel_format ="RGB_BYTE"
    s3tc="FALSE"
    auto_gen_mipmaps="TRUE"
    compute_vertices_normals="FALSE "
    compute_tangent_space_vectors="FALSE"
    average_vertices_normals="FALSE"
    free_pixmap_after_upload="TRUE"
    >
  </loading_option>
  <orientation
    ang="0.0"
    x="0.0"
    y="0.0"
    z="0.0"
    >
  </orientation>
  <orientation_pitch_yaw_roll
    pitch="0.0"
    yaw="0.0"
    roll="0.0"
    >
  </orientation_pitch_yaw_roll>
  <position
    x="0.0"
    y="0.0"
    z="0.0"
    >
  </position>
  <remove_child
    name=""
    >
  </remove_child>
  <scale
    x="1.0"
    y="1.0"
    z="1.0"
    >
  </scale>
  <spin_values
    x="0.0"
    y="0.0"
    z="0.0"
    >
  </spin_values>
  <vertices_color
    r="1.0"
    g="1.0"
    b="1.0"
    a="1.0"
    >
  </vertices_color>
  <nx_linear_velocity
    x="0.0"
    y="-9.81"
    z="0.0"
    damping="0.5"
    sleep_threshold="0.14*0.14"
    >
  </nx_linear_velocity>
  <nx_angular_velocity
    x="0.0"
    y="-9.81"
    z="0.0"
    damping="0.5"
    sleep_threshold="0.15*0.15"
    >
  </nx_angular_velocity>
  <nx_misc_data 
    mass="0.0"
    density="0.0"
    actor_type="DYNAMIC"
    >
  </nx_misc_data >
  <shader_program
    name =""
    gpu_shader_for_ambient_pass=""
    apply_to_all_materials="FALSE"
    >
  </shader_program>
</model>


<model>

Description


model element has 24 attributes and 20 sub-element(s)

Attributes
  • name [STRING]: Name of model
  • filename [STRING]:
  • render [BOOLEAN]: Activates (TRUE default) or desactivates (FALSE) the rendering of the model. - Default value = TRUE
  • texturing [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE default) application of textures. - Default value = FALSE
  • lighting [BOOLEAN]: Activates (TRUE) or desactivates (FALSE, default) the lighting computations - Default value = FALSE
  • improve_specular_highlight [BOOLEAN]: Allows to improve the specular highlights by a method applied to true 'half vectors'. Gives more realistic highlights but also a load on perfomances. - Default value = TRUE
  • shading_mode [STRING]: Sets the coloring mode of faces. - Default value = SMOOTH
  • shadow_caster [BOOLEAN]: Activates (TRUE, default) or desactivates (FALSE ) the projection of volumic shadows. - Default value = TRUE
  • back_face_culling [BOOLEAN]: Activates (TRUE) or desactivates (FALSE, default) the suppression of backfaces. - Default value = FALSE
  • auto_spin [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE, default) the rotation around the local system axis as specified in the tag. - Default value = FALSE
  • compute_normals [BOOLEAN]: Activates (TRUE, default) or desactivates (FALSE) the computation of vertices normals. - Default value = FALSE
  • compute_tangent_space [BOOLEAN]: Activates (TRUE, default ) or desactivates (FALSE) the computation of tangent space normals of vertices.Useful for bump mapping. - Default value = FALSE
  • flip_normals [BOOLEAN]: Activates (TRUE) or desactivates (FALSE, default) the inversion of the model faces normals. - Default value = FALSE
  • average_normals [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE, default) the computation of the normals average. - Default value = FALSE
  • display_bounding_box [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE default) the rendering of the bounding box. - Default value = FALSE
  • display_bounding_sphere [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE default) the rendering of the bounding sphere. - Default value = FALSE
  • two_sides_lighting [BOOLEAN]: Activates(TRUE) or desactivates (FALSE, default) the lighting computations on both sides back and front of the model polygons. - Default value = FALSE
  • display_tripod [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE, default) the rendering of the local system with the following color code : X axis, Red ; Y axis Green; Z axis Blue. - Default value = FALSE
  • normalize [BOOLEAN]: Activates (TRUE) or desactivates (FALSE default) the normalization of vertices normals after a call to SetObjectScale(). - Default value = FALSE
  • auto_update_direction [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE default) the automatic update of direction (Z axis) for the local system. - Default value = FALSE
  • polygon_mode [STRING]: Sets the render mode for a mesh: SOLID for filled faces, WIREFRAME for faces rendered by their edges only. - Default value = SOLID - Values = SOLID|WIREFRAME
  • use_vbo [BOOLEAN]: Activates (TRUE ) or desactivates (FALSE default) the use of the Vertex Buffer Objects). The VBO allows to use the hardware vertex buffer to store more efficiently a model in memory. It is recommended to sue VBO for large static model meshes (models non affected by vertices transformations ). - Default value = TRUE
  • nx_add_to_physics_engine [BOOLEAN]: Activates (TRUE) or desactivates (FALSE default )physics engine management by PhysX. The physics must be activated in then node. - Default value = FALSE
  • use_user_transformation [BOOLEAN]: - Default value = TRUE

<add_child>

Description
Allows to add a child to the current model.Useful for building easily complex hierarchies. The transformations rotation ans translation of the current mesh will affect the children.

add_child element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: name of the object to add, this object must exist.

<alpha_test_params>

Description
Sets the parameters of the hardware alpha test.

alpha_test_params element has 3 attributes and 0 sub-element(s)

Attributes
  • active [STRING]: Activates (TRUE) or desactivates (FALSE default) the alpha test. - Default value = FALSE
  • func [STRING]: - Default value = CMP_FUNC_GREATER - Values = CMP_FUNC_NEVER, CMP_FUNC_LESS, CMP_FUNC_LESS_OR_EQUAL, CMP_FUNC_GREATER, CMP_FUNC_GREATER_OR_EQUAL, CMP_FUNC_EQUAL, CMP_FUNC_NOT_EQUAL, CMP_FUNC_ALWAYS
  • ref [REAL]: Value to which the incoming value of alpha is compared. This value is comprised between 0.0 and 1.0 - Default value = 0.5

<blending_params>

Description
Specify the blending parameters in blending equation C = Cs*Sf + Cd*Df where C is the final color (R, G, B, A), Cs the source color or incoming (Rs, Gs, Bs, As) and Cd is current color in framebuffer (Rd, Gd, Bd, Ad). Sf is the blending source factor(Sr, Sg, Sb, Sa) and Df is the blending destination factor(Dr, Dg, Db, Da).

blending_params element has 3 attributes and 0 sub-element(s)

Attributes
  • active [STRING]: Activates (TRUE) or desactivates (FALSE default) the blending. - Default value = FALSE
  • src_factor [STRING]: Specify the blending source factor. Authorised values are: BLENDING_FACTOR_ZERO: (0 0 0 0) BLENDING_FACTOR_ONE: (1 1 1 1) BLENDING_FACTOR_SRC_ALPHA: (As, As, As, As) BLENDING_FACTOR_ONE_MINUS_DST_ALPHA: (1-Ad, 1-Ad, 1-Ad, 1-Ad) BLENDING_FACTOR_ONE_MINUS_DST_COLOR: (1-Rd, 1-Gd, 1-Bd, 1-Ad) BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA: (1-As, 1-As, 1-As, 1-As) BLENDING_FACTOR_DST_COLOR: (Rd, Gd, Bd, Ad) BLENDING_FACTOR_DST_ALPHA: (Ad, Ad, Ad, Ad) BLENDING_FACTOR_SRC_COLOR: (Rs, Gs, Bs, As) BLENDING_FACTOR_ONE_MINUS_SRC_COLOR: (1-Rs, 1-Gs, 1-Bs, 1-As) - Default value = BLENDING_FACTOR_SRC_ALPHA - Values = BLENDING_FACTOR_ZERO, BLENDING_FACTOR_ONE, BLENDING_FACTOR_SRC_ALPHA, BLENDING_FACTOR_ONE_MINUS_DST_ALPHA, BLENDING_FACTOR_ONE_MINUS_DST_COLOR, BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA, BLENDING_FACTOR_DST_COLOR, BLENDING_FACTOR_DST_ALPHA, BLENDING_FACTOR_SRC_COLOR, BLENDING_FACTOR_ONE_MINUS_SRC_COLOR
  • dst_factor [STRING]: Specify the blending destination factor. Authorised values are: BLENDING_FACTOR_ZERO: (0 0 0 0) BLENDING_FACTOR_ONE: (1 1 1 1) BLENDING_FACTOR_SRC_ALPHA: (As, As, As, As) BLENDING_FACTOR_ONE_MINUS_DST_ALPHA: (1-Ad, 1-Ad, 1-Ad, 1-Ad) BLENDING_FACTOR_ONE_MINUS_DST_COLOR: (1-Rd, 1-Gd, 1-Bd, 1-Ad) BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA: (1-As, 1-As, 1-As, 1-As) BLENDING_FACTOR_DST_COLOR: (Rd, Gd, Bd, Ad) BLENDING_FACTOR_DST_ALPHA: (Ad, Ad, Ad, Ad) BLENDING_FACTOR_SRC_COLOR: (Rs, Gs, Bs, As) BLENDING_FACTOR_ONE_MINUS_SRC_COLOR: (1-Rs, 1-Gs, 1-Bs, 1-As) - Default value = BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA - Values = BLENDING_FACTOR_ZERO, BLENDING_FACTOR_ONE, BLENDING_FACTOR_SRC_ALPHA, BLENDING_FACTOR_ONE_MINUS_DST_ALPHA, BLENDING_FACTOR_ONE_MINUS_DST_COLOR, BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA, BLENDING_FACTOR_DST_COLOR, BLENDING_FACTOR_DST_ALPHA, BLENDING_FACTOR_SRC_COLOR, BLENDING_FACTOR_ONE_MINUS_SRC_COLOR

<apply_ambient>

Description
allows to apply a new value of the ambient reflection coefficient to the first material of each submesh.

apply_ambient element has 4 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: red component. Float value ranging between 0.0 and 1.0 - default value: 0.0 - Default value = 0.0
  • g [REAL]: green component. Float value ranging between 0.0 and 1.0 - default value: 0.0
  • b [REAL]: blue component. Float value ranging between 0.0 and 1.0 - default value: 0.0
  • a [REAL]: alpha component. Float value ranging between 0.0 and 1.0 - default value: 0.0

<apply_diffuse>

Description
apply_diffuse makes it possible to apply a new value of the diffuse reflection coefficient to the first material of each submesh.

apply_diffuse element has 4 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: red component. Float value ranging between 0.0 and 1.0 - default value: 0.0 - Default value = 0.0
  • g [REAL]: green component. Float value ranging between 0.0 and 1.0 - default value: 0.0
  • b [REAL]: blue component. Float value ranging between 0.0 and 1.0 - default value: 0.0
  • a [REAL]: alpha component. Float value ranging between 0.0 and 1.0 - default value: 0.0

<apply_specular>

Description
apply_specular makes it possible to apply a new value of the specular reflection coefficient to the first material of each submesh.

apply_specular element has 4 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: red component. Float value ranging between 0.0 and 1.0 - default value: 0.0 - Default value = 0.0
  • g [REAL]: green component. Float value ranging between 0.0 and 1.0 - default value: 0.0
  • b [REAL]: blue component. Float value ranging between 0.0 and 1.0 - default value: 0.0
  • a [REAL]: alpha component. Float value ranging between 0.0 and 1.0 - default value: 0.0

<apply_specular_exp>

Description
apply_specular_exp makes it possible to apply a new value of the exponential specular reflection coefficient to the first material of each submesh.

apply_specular_exp element has 1 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: exponent of the specular reflection coefficient - default value: 0.0 - Default value = 0.0

<bump_mapping_attach_light>

Description
bump_mapping_attach_light specifies the light to be taken into account for the DOT3 bump mapping. Several calls to mesh_bump_mapping_attach_light will allow to attach several lights. This instruction is to be used when the LOAD_BUMP_MAP option has been used for the 3d model loading..

bump_mapping_attach_light element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: name of the light node to be attached

<loading_option>

Description
loading_option makes it possible to modify the default options of the 3d objects loaders. Several calls to loading_option make it possible to modify several options.

loading_option element has 9 attributes and 0 sub-element(s)

Attributes
  • load_texture [BOOLEAN]: load_texture enables the automatic loading of textures with the model. It has the same effect as the load_texture attribute of the model node - Default value = TRUE
  • load_normal_map [BOOLEAN]: load_normal_map loads bump textures (the normals maps) of the model when the bump mapping is performed with a pixel shader - default value: FALSE These textures have the same basic name as the base textures but with the DOT3 suffix.If base = wood.tga bump = woodDOT3.tga. The base map is loaded on the texture unit 0 and the normal map on the unit 1. - Default value = FALSE
  • pixel_format [ENUM]: pixel_format specifies the pixel format of each texture - default value: RGB_BYTE RGB_BYTE: pixel coded on 3 bytes (1 byte for each component) - default value RGBA_FLOAT: pixel coded on 16 bytes (4 bytes for each component) - Default value = RGB_BYTE - Values = RGB_BYTE, RGBA_FLOAT
  • s3tc [BOOLEAN]: s3tc enables compression hardware of texture according to the S3TC diagram - Default value = FALSE
  • auto_gen_mipmaps [BOOLEAN]: auto_gen_mipmaps enables the hardware mipmaps generation for textures accompanying the model. In this case, trilinear filtering is activated - Default value = TRUE
  • compute_vertices_normals [BOOLEAN]: compute_vertices_normals enables calculations of the normal vectors (faces and vertices) necessary for lighting - Default value = FALSE
  • compute_tangent_space_vectors [STRING]: compute_tangent_space_vectors enables calculations of the space tangent vectors. These vectors, more known as the tangent vectors and the binormal vectors are used in the bump mapping algorithms. - Default value = FALSE
  • average_vertices_normals [BOOLEAN]: average_vertices_normals enables the averaging of vertices normals. - Default value = FALSE
  • free_pixmap_after_upload [BOOLEAN]: free_pixmap_after_upload allows to destroy the pixmap and to release the system memory after the texture has been transfered on the graphics controller - Default value = TRUE

<orientation>

Description
orientation specifies the orientation of the model around an arbitrary axis in its local reference mark.

orientation element has 4 attributes and 0 sub-element(s)

Attributes
  • ang [REAL]: Rotation angle in degrees - Default value = 0.0
  • x [REAL]: X component of the rotation axis - Default value = 0.0
  • y [REAL]: Y component of the rotation axis - Default value = 0.0
  • z [REAL]: Z component of the rotation axis - Default value = 0.0

<orientation_pitch_yaw_roll>

Description
Sets the model orientation around the axis of its local system.

orientation_pitch_yaw_roll element has 3 attributes and 0 sub-element(s)

Attributes
  • pitch [REAL]: Rotation angle in degrees around the X axis. - Default value = 0.0
  • yaw [REAL]: Rotation angle in degrees around the Y axis. - Default value = 0.0
  • roll [REAL]: Rotation angle in degrees around the Z axis. - Default value = 0.0

<position>

Description
Specify the model position in its local system or relative to its parent (may be an other model).

position element has 3 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: X coordinate of position. - Default value = 0.0
  • y [REAL]: Y coordinate of position. - Default value = 0.0
  • z [REAL]: Z coordinate of position. - Default value = 0.0

<remove_child>

Description
Allows to remove a child from its parent model.This allows to build complex hierarchies.

remove_child element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: name of child.

<scale>

Description
Allows to apply a scale factor to each vertex.The scale factors are set along the 3 axis.

scale element has 3 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Scale factor in X - Default value = 1.0
  • y [REAL]: Scale factor in Y - Default value = 1.0
  • z [REAL]: Scale factor in Z - Default value = 1.0

<spin_values>

Description
Specify the rotation angle around the X,Y and Z axis. Each frame rotation angle are incremented by this spin values. It provides a simple animation around the local system axis

spin_values element has 3 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Rotation angle in degrees around the X axis - Default value = 0.0
  • y [REAL]: Rotation angle in degrees around the Y axis - Default value = 0.0
  • z [REAL]: Rotation angle in degrees around the Z axis - Default value = 0.0

<vertices_color>

Description
Sets a new color to apply to all vertices of the model.

vertices_color element has 4 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: Red component of the - Default value = 1.0
  • g [REAL]: Green component of the - Default value = 1.0
  • b [REAL]: Blue component of the - Default value = 1.0
  • a [REAL]: Alpha component of the - Default value = 1.0

<nx_linear_velocity>

Description
Sets the linear velocity of an object. The parameters are taken into account only if the physics engine has been activated.

nx_linear_velocity element has 5 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Coordinates in X of the gravity vector. - Default value = 0.0
  • y [REAL]: Coordinates in Y of the gravity vector. - Default value = -9.81
  • z [REAL]: Coordinates in Z of the gravity vector. - Default value = 0.0
  • damping [REAL]: Damping factor of speed. - Default value = 0.5
  • sleep_threshold [REAL]: Threshold under which a physical object is considered inactive (sleeping) - Default value = 0.14*0.14

<nx_angular_velocity>

Description
Sets the velocity of an object. The parameters are taken into account only if the physics engine has been activated.

nx_angular_velocity element has 5 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Coordinates in X of the gravity vector. - Default value = 0.0
  • y [REAL]: Coordinates in Y of the gravity vector. - Default value = -9.81
  • z [REAL]: Coordinates in Z of the gravity vector. - Default value = 0.0
  • damping [REAL]: Damping factor of speed. - Default value = 0.5
  • sleep_threshold [REAL]: Threshold under which a physical object is considered inactive (sleeping) - Default value = 0.15*0.15

<nx_misc_data >

Description
Sets the type

nx_misc_data element has 3 attributes and 0 sub-element(s)

Attributes
  • mass [REAL]: Concentional mass of object. - Default value = 0.0
  • density [REAL]: Density of object as evaluated by physics engine.For a DYNAMIC actor mass and density can not have both zero value. - Default value = 0.0
  • actor_type [STRING]: Type of actor (object).A STATIC actor can interact with moving actors but doesn't move itself. A KINEMATIC actor has a fixed movement (limited by axis, a joint). A DYNAMIC actor is free to move and interact in every direction. - Default value = DYNAMIC - Values = STATIC, KINEMATIC, DYNAMIC

<shader_program>

Description


shader_program element has 3 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: Name of shader applied to the model material.
  • gpu_shader_for_ambient_pass [STRING]: Shader used for ambient pass.
  • apply_to_all_materials [STRING]: Allows one shader to be applied to all materials Default value: FALSE. - Default value = FALSE
Random Projects

2D Shockwave Effect
2D Shockwave Effect

Bump Mapping Multiple Lights
Bump Mapping Multiple Lights

Depth Buffer Visualization
Depth Buffer Visualization


Random Code Samples

Skybox
Skybox

Sound Phaser
Sound Phaser

Motion Path Editor
Motion Path Editor



(C)2009-2010 Geeks3D.com