GeeXLab
Current version: 0.45.1
>GeeXLab homepage

FurMark
Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage


Blogs
>JeGX's HackLab

Geeks3D's Articles
>GPU Memory Speed Demystified

>Multi-Threading Programming Resources

>GeForce and Radeon OpenCL Overview

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

TessMark
Current version: 0.3.0
>TessMark homepage

ShaderToyMark
Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Download
>Libraries and Plugins
>Demos
>Online Help - Reference Guide
>Codes Samples
 
oZone3D.Net - Demoniak3D Developer Guide


» Back To Index

The <mesh> node

Function

The mesh node makes it possible to define a polygonal mesh. Generally, a mesh is an assembly of planar primitives such as the triangle or the quadrangle. In the case of Demoniak3D, a polygonal mesh must be exclusively made of triangles. With this triangles assembly, a mesh can be of any imaginable shape. Generally, a mesh results from a 3d model which has been built in a modeling software (3d Studio MAX, Maya, Lightwave, Cinema4D, etc...). In certain cases, it is useful to be able to quickly generate basic shapes like the sphere. This is why Hyperion includes a number of basic shapes such as the SPHERE, PLAN, TORUS, DISC, CYLINDER and the TERRAIN_PATCH shapes.

The mesh is the true component of a 3d scene: one can light it, texture it (and of course multitexture it), one can allot it parameters or change its existing intrinsic parameters such as materials, vertices, etc..., or apply effects (particles, deformation, volumic shadows, vertex and pixel shader...).
<mesh
	name=""
	render="TRUE"
	shape_type="SPHERE"
	parent_name=""
	lighting="FALSE"
	texturing="FALSE"
	polygon_mode="SOLID"
	shading_mode="SMOOTH"
	shadow_caster="FALSE"
	use_vbo="FALSE"
	improve_specular_highlights="TRUE"
	normalize="FALSE"
	two_sides_lighting="FALSE"
	flip_normals="FALSE"
	compute_normals="TRUE"
	compute_tangent_space="TRUE"
	average_normals="FALSE"
	auto_spin="FALSE"
	back_face_culling="FALSE"
	camera_collision="FALSE"
	camera_collision_bv_shape="BOX"
	cube_mapping_type="STATIC" 
	display_bounding_box="FALSE"
	display_bounding_sphere="FALSE"
	display_motion_path_curve="FALSE"
	display_motion_path_tangents="FALSE"
	display_tripod="FALSE"
	auto_update_direction="FALSE"
	link_to_motion_path="FALSE"
	motion_path=""
	motion_path_time_offset="0.0"
	motion_path_time_step="0.001" 
	play_motion_path="TRUE"
	nx_add_to_physics_engine="FALSE"
	update_shader_mode="READWRITE"  
	display_shadow_silhouette="FALSE"  
	display_shadow_volume="FALSE"  
	depth_test="TRUE" >
	
	<add_child
		name="" />
		
	<alpha_test_params 
		active="FALSE" 
		func="CMP_FUNC_GREATER" 
		ref="0.5" />
		
	<blending_params 
		active="FALSE" 
		src_factor="BLENDING_FACTOR_SRC_ALPHA" 
		dst_factor="BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA" />

	<attach_material
		name="" />
	
	<bump_mapping_attach_light
		name="" />
	
	<optimize
		vertex_epsilon="0.0001"
		method="NONE" />
	
	<orientation
		ang="0.0" 
		x="0.0" 
		y="0.0" 
		z="0.0" />
	
	<orientation_pitch_yaw_roll
		pitch="0.0" 
		yaw="0.0" 
		roll="0.0" />

	<pivot_orientation
		ang="0.0" 
		x="0.0" 
		y="0.0" 
		z="0.0" />
	
	<pivot_position
		x="0.0" 
		y="0.0" 
		z="0.0" />
		
	<position
		x="0.0" 
		y="0.0" 
		z="0.0" />
	
	<remove_child
		name="" />
	
	<scale_vertices
		x="1.0" 
		y="1.0" 
		z="1.0" />
	
	<spin_values
		x="0.0" 
		y="0.0" 
		z="0.0" />
	
	<texture
		texture_unit="0" 
		texture_type="COLOR_MAP" 
		texture_name="" 
		material_name="" 
		mirror="FALSE" 
		u_tile="1.0" 
		v_tile="1.0" 
		u_offset="0.0" 
		v_offset="0.0" 
		u_move="0.0" 
		v_move="0.0" />
	
	<translate_vertices
		x="0.0" 
		y="0.0" 
		z="0.0" />
	
	<vertices_color
		r="1.0" 
		g="1.0" 
		b="1.0" 
		a="1.0" />
	
	<vertices_uv_tiling
		texture_unit="0" 
		u_tile="1.0" 
		v_tile="1.0" />
		
	<plane
		x_size="400.0" 
		z_size="400.0" 
		num_segs_x="32" 
		num_segs_z="32" />
		
	<torus
		radius="60.0" 
		vertex_density="15.0" 
		section_radius="32" />
		
	<box
		width="100.0" 
		height="100.0" 
		depth="100.0" 
		w_segs="5" 
		h_segs="5" 
		d_segs="5" 
		material_face_posx="" 
		material_face_negx="" 
		material_face_posy="" 
		material_face_negy="" 
		material_face_posz="" 
		material_face_negz=""  />
		
		
	<disc
		radius="20.0" 
		radius_density="3" 
		opening_angle="360.0" 
		slices="20" />
		
	<cylinder
		radius="20.0" 
		stacks="10" 
		slices="10" 
		height="100" />

	<ring
		radius="50.0" 
		thickness="10.0" 
		sides="10" />
		
	<sphere
		radius="20.0" 
		stacks="10" 
		slices="10" />
		
	<terrain
		heightmap="" 
		patch_num_segs="32" 
		vertical_scale="50.0" 
		patch_size="400.0" />
		
	<vb_quad
		num_vb_quads="1" />
		
	<nx_linear_velocity 
		x="0.0" 
		y="0.0" 
		z="0.0" 
		damping="0.5" 
		sleep_threshold="0.14*0.14" />

	<nx_angular_velocity 
		x="0.0" 
		y="0.0" 
		z="0.0" 
		damping="0.5" 
		sleep_threshold="0.15*0.15" />
		
	<nx_misc_data 
		mass="0.0" 
		density="0.0" 
		actor_type="DYNAMIC" />
		
	<vertex_normal_field 
		render="FALSE" 
		g="1.0" 
		b="1.0" 
		a="0.0"
		length_factor="10.0" />
		
	<face_normal_field 
		render="FALSE" 
		g="0.0" 
		b="1.0" 
		a="0.0"
		length_factor="10.0" />
		
		
</mesh>

mesh

mesh is the xml tag that defines a mesh node.

Attributes:
  • name - [STR127] - name of the node. This name will make it possible to refer this node throughout the XML script.

  • parent_name - [STR127] - name of the parent object (in general this refers to a 3d model).

  • shape_type - [ENUM] - basic shape of the mesh:
    • PLANE: defines a mesh with a plan shape. See plane for the plane parameters.
    • TORUS: defines a mesh with a torus shape. See torus for the torus parameters.
    • SPHERE: defines a mesh with a sphere shape. See sphere for the sphere parameters - default value
    • DISC: defines a mesh with a disc shape. See disc for the disc parameters.
    • RING: defines a mesh with a ring shape. See ring for the ring parameters.
    • CYLINDER: defines a mesh with a cylinder shape. See cylinder for the cylinder parameters.
    • BOX: defines a mesh with a box shape. See box for the box parameters.
    • VB_QUAD: defines a mesh especially optimized for a great number of quads rendering. See vb_quad for the vb_quad parameters.
    • TERRAIN_PATCH: defines a mesh with a square ground shape (patch of ground). See terrain for the ground patch parameters.
    • MODEL_SUB_MESH: defines a mesh as being a child of a parent model. This mesh is an existing mesh that belongs to the 3d model and is a true part of it. This mesh has a name (like all the other meshes of the 3d model) which must be known in order to modify its properties. The LynX viewer provides this mesh name, as well as those of the other meshes of the 3D model.


  • render - [BOOLEAN] - enables (TRUE) or disables (FALSE) the mesh rendering - default value: TRUE

  • auto_spin - [BOOLEAN] - enables (TRUE) or disables (FALSE) rotation around the axis of the object local reference mark. The values of the rotation angles must be specified with the <spin_values> tag - default value: FALSE

  • lighting - enables (TRUE) or disables (FALSE) lighting calculations - default value: FALSE

  • normalize - [BOOLEAN] - enables (TRUE) or disables (FALSE) the standardization of the vertices' normals after having used the LUA HYP_SetObjectScale function - default value: FALSE

  • two_sides_lighting - enables (TRUE) or disables (FALSE) lighting calculations on both sides (face and back) of every face of the mesh - default value: FALSE

  • flip_normals - enables (TRUE) or disables (FALSE) the inversion of the mesh faces' normals - default value: FALSE

  • improve_specular_highlights - [BOOLEAN] - makes it possible to improve the specular reflections rendering by using a calculation method that utilizes the true "half-vector". The specular reflects are more realistic but this involves a slight performances fall - default value: TRUE

  • back_face_culling - [BOOLEAN] - enables (TRUE) or disables (FALSE) the back faces removal - default value: FALSE

  • texturing - [BOOLEAN] - enables (TRUE) or disables (FALSE) the textures application - default value: FALSE

  • blending - [BOOLEAN] - enables (TRUE) or disables (FALSE) the colors mixture - default value: FALSE

  • shadow_caster - [BOOLEAN] - enables (TRUE) or disables (FALSE) the volumic shadows projection - default value: FALSE

  • compute_normals - [BOOLEAN] - enables (TRUE) or disables (FALSE) the computing of vertices normals - default value: TRUE

  • compute_tangent_space - [BOOLEAN] - enables (TRUE) or disables (FALSE) the computing of vertices tangent space normals (useful for bump mapping) - default value: TRUE

  • average_normals - [BOOLEAN] - enables (TRUE) or disables (FALSE) the averaging of the vertices normals - default value: FALSE

  • display_bounding_box - [BOOLEAN] - enables (TRUE) or disables (FALSE) the bounding box rendering - default value: FALSE

  • display_bounding_sphere - [BOOLEAN] - enables (TRUE) or disables (FALSE) the bounding sphere rendering - default value: FALSE

  • display_tripod - [BOOLEAN] - display (TRUE) or hide (FALSE) the mesh local reference mark - default value: FALSE
    Note: The axis of the tripod are represented with the following colors:
    • X axis: red
    • Y axis: green
    • Z axis: blue
  • auto_update_direction - [BOOLEAN] - enables (TRUE) or disables (FALSE) the automatic direction update (Z axis) of the object's local reference mark (tripod) - default value: FALSE

  • use_vbo - [BOOLEAN] - enables (TRUE) or disables (FALSE) the use of the vertex buffer objects to accelerate mesh rendering - default value: FALSE
    use_vbo makes it possible to use the vertex-buffer materials (the famous VBO in OpenGL) in order to effectively store the mesh vertices into the graphics board memory. It is recommended to activate this state for static meshes featuring a great number of polygons. A mesh is static if it does not undergo any geometric transformation on its vertices.

  • polygon_mode - [ENUM] - specifies the rendering mode of the mesh faces:
    • SOLID: the faces are filled (solid) - default value
    • WIREFRAME: the faces are rendered in wire


  • shading_mode - [ENUM] - specifies the way in which the faces are colored:
    • FLAT: the faces are colored in a uniform way
    • SMOOTH: the faces are colored in order to form a colour gradation - default value


  • motion_path - [STR127] - name of the motion path to which one attaches the gizmo in order to perform automatic displacements

  • play_motion_path - [BOOLEAN] - enables (TRUE) or disables (FALSE) the animation of the position along a motion path - default value: TRUE

  • display_motion_path_curve - [BOOLEAN] - display (TRUE) or hide (FALSE) the motion path - default value: FALSE

  • display_motion_path_tangents - [BOOLEAN] - enables (TRUE) or disables (FALSE) the display of the motion path tangents - default value: FALSE

  • motion_path_time_step - [REAL] - makes it possible to control the animation speed by specifying the temporal increment along the motion-path. Time is standardized along the motion-path, i.e. time equals 0.0 for the first keyframe and 1.0 for the last one - default value: 0.001

  • motion_path_time_offset - [REAL] - makes it possible to control the starting time value of the animation. By default this starting value is the standardized time 0.0. This offset makes it possible to place several objects on one motion-path with a time-lag (offset) between each one of them - default value: 0.0

  • update_shader_mode - [ENUM] - specifies the read/write mode of the internal shader:

    • READONLY: the mesh shader CANNOT be updated by its parent.
    • READWRITE: the mesh shader CAN be updated by its parent - default value

    The update_shader_mode attribute specifies the way in which the parent (in general this refers to a 3D model) updates the shader of this mesh.
    Remark: do not confuse the shader of an object and a shader program. The shader of an object is a concept specific to the oZone3D engine and it is a kind of intrinsic data gathering of the various rendering states of an object (lighting, texturing, wire or solid...). A model has also its shader. By default, it updates its sub-meshes shaders by copying its own. In some cases, the user may want to have one (or more) sub-mesh whose shader is not automatically updated. This may be done by specifying it in the update_shader_mode property.

  • camera_collision - [BOOLEAN] - makes it possible to take (TRUE) or not to take (FALSE) into account this mesh in the calculations of collisions with the camera. The calculation of the collision is based on the including box of the mesh (bounding box) and on the position of the camera - default value: FALSE

  • camera_collision_bv_shape - [ENUM] - makes it possible to specify the shape of the including volume for the collision tests. The shape of the including volume is to be chosen according to the topology of the mesh:
    • BOX: bounding box - default value
    • SPHERE: bounding sphere.


  • cube_mapping_type - [ENUM] - specifies the type of cube mapping to be applied to the mesh:
    • DYNAMIC: defines a dynamic cube mapping. This cubemap is updated at each frame and any modification of the mesh's environment will be reflected in the cubemap. That involves a fall of the performances.
    • STATIC: defines a static cube mapping. This cubemap is updated at the initialization of the scene and is very fast. However any modification of the environment of the mesh will not be reflected anymore in the cubemap - default value


  • group - [STR127] - name of the group in which to add the current node. A group makes it possible to control the behavior of several objects in a single way.

  • nx_add_to_physics_engine - [BOOLEAN] - makes it possible to add (TRUE) or not add (FALSE) this object in the scene of the physical simulation engine. This makes sense only if the physical engine (NovodeX) is available and if it has been activated in the scene node - default value: FALSE

  • display_shadow_silhouette - [BOOLEAN] - allows to enable the silhouette rendering with shadow-volumes. - default value: FALSE

  • display_shadow_volume - [BOOLEAN] - allows to enable the rendering of the volume of the shadow with shadow-volumes. - default value: FALSE

  • depth_test - [BOOLEAN] - enables or disables depth testing for the mesh rendering - default value: TRUE

blending_params element

blending_params allows to set the parameters for the blending (mixture) of the colors.

Attributes:
  • active - [BOOLEAN] - enables or disables the blending - default value: FALSE
  • src_factor - [ENUM] - specifies the blending source factor - default value: BLENDING_FACTOR_SRC_ALPHA
    blending_dst_factor specifies the destination factor in the blending equation:
    C = Cs*Sf + Cd*Df
    where C is the final (R, G, B, A) color, Cs the (Rs, Gs, Bs, As) source (or entering) color and Cd the (Rd, Gd, Bd, Ad) color present in the framebuffer.
    Sf is the (Sr, Sg, Sb, Sa) blending source factor and Df is the (Dr, Dg, Db, Da) blending destination factor.
    • 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)
  • dst_factor - [ENUM] - specifies the destination blending factor. Please refer to src_factor to check the acceptable
    values - default value: BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA

alpha_test_params element

alpha_test_params makes it possible to set the parameters for the alpha-test hardware.

Attributes:
  • active - [BOOLEAN] - enables or disables the alpha test - default value: FALSE
  • func - [ENUM] - alpha comparison function. The following symbolic constant are accepted:
    • CMP_FUNC_NEVER: the test never passes.
    • CMP_FUNC_LESS: the test passes if the value alpha is smaller than the reference value .
    • CMP_FUNC_LESS_OR_EQUAL: the test passes if the value alpha is smaller or equal to the reference value.
    • CMP_FUNC_GREATER: the test passes if the value alpha is larger than the reference value - default value
    • CMP_FUNC_GREATER_OR_EQUAL: the test passes if the value alpha is larger or equal to the reference value.
    • CMP_FUNC_EQUAL: the test passes if the value alpha is equal to the reference value .
    • CMP_FUNC_NOT_EQUAL: the test passes if the value alpha is different from the reference value .
    • CMP_FUNC_ALWAYS: the test always passes.
  • ref - [CLAMPED_REAL] - reference value with which the entering value alpha is compared. This reference value must lie between 0.0 and 1.0 - default value: 0.5

attach_material element

attach_material makes it possible to attach a material to the mesh. If the mesh has already its own material, it will be replaced by the new one.

Attributes:
  • name - [STR64] - material name

bump_mapping_attach_light element

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 make it possible to take into account several lights.

For recall, the DOT3 Bump Mapping is activated when the user specifies a texture with the texture_type="NORMAL_MAP" parameter.

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

orientation element

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

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

orientation_pitch_yaw_roll element

orientation_pitch_yaw_roll specifies the orientation of the mesh around the axis of its local reference mark.

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

plane element

plane specifies the parameters that initialize a PLANE type mesh.

Attributes:
  • x_size - [REAL] - dimension of the plan along the X axis - default value: 400.0
  • z_size - [REAL] - dimension of the plan along the Z axis - default value: 400.0
  • num_segs_x - [INTEGER] - number of segments along the X axis - default value: 32
  • num_segs_z - [INTEGER] - number of segments along the Z axis - default value: 32

position element

position specifies the X, Y and Z position of the mesh in in its local reference mark or compared to its parent (in general a 3D model).

Attributes:
  • x - [REAL] - X coordinate of the position - default value: 0.0
  • y - [REAL] - Y coordinate of the position - default value: 0.0
  • z - [REAL] - Z coordinate of the position - default value: 0.0

pivot_orientation element

pivot_orientation makes it possible to modify the orientation of the mesh pivot (tripod) independently from the vertices position. This is very useful during animations.

Attributes:
  • ang - [REAL] - Rotation angle in degrees - default value: 0.0
  • x - [CLAMPED_REAL] - X component of the rotation axis - default value: 0.0
  • y - [CLAMPED_REAL] - Y component of the rotation axis - default value: 0.0
  • z - [CLAMPED_REAL] - Z component of the rotation axis - default value: 0.0
Remark
Do not confuse pivot_orientation and orientation.

pivot_position element

pivot_position makes it possible to modify the position of the pivot (tripod) of the mesh independently from the vertices position. This is very useful during animations.

Attributes:
  • x - [REAL] - X coordinate of the position - default value: 0.0
  • y - [REAL] - Y coordinate of the position - default value: 0.0
  • z - [REAL] - Z coordinate of the position - default value: 0.0
Remark
Do not confuse pivot_position and position.

sphere element

sphere specifies the parameters that initialize a SPHERE type mesh.

Attributes:
  • radius - [REAL] - value of the radius - default value: 20.0
  • stacks - [INTEGER] - number of horizontal segments - default value: 10
  • slices - [INTEGER] - number of vertical segments - default value: 10

disc element

disc specifies the parameters that initialize a DISC type mesh. .

Attributes:
  • radius - [REAL] - value of the radius - default value: 20.0
  • radius_density - [INTEGER] - number of vertices along the radius - default value: 3
  • slices - [INTEGER] - number of segments composing the disc circumference - default value: 20
  • opening_angle - [REAL] - aperture angle of the disc in degrees - default value: 360.0

ring element

ring specifies the parameters that initialize a RING type mesh.

Attributes:
  • radius - [REAL] - value of the radius - default value: 50.0
  • thickness - [REAL] - thickness of the ring - default value: 10.0
  • sides - [INTEGER] - number of segments composing the circumference of the ring - default value: 10

cylinder element

cylinder specifies the parameters that initialize a CYLINDER type mesh.

Attributes:
  • radius - [REAL] - radius of the cylinder - default value: 20.0
  • height - [REAL] - height of the cylinder - default value: 100.0
  • stacks - [INTEGER] - number of horizontal segments - default value: 10
  • slices - [INTEGER] - number of vertical segments - default value: 10

box element box

box specifies the parameters that initialize a BOX mesh.

Attributes:
  • width - [REAL] - width (X) of the box - default value: 100.0
  • height - [REAL] - height (Y) of the box - default value: 100.0
  • depth - [REAL] - depth (Z) of the box - default value: 100.0
  • w_segs - [INTEGER] - number of X segments - default value: 5
  • h_segs - [INTEGER] - number of Y segments - default value: 5
  • d_segs - [INTEGER] - number of Z segments - default value: 5
  • material_face_posx - [STR64] - name of the material to be attached to the right face (POS X) - default value: none
  • material_face_negx - [STR64] - name of the material to be attached to the left face (NEG X) - default value: none
  • material_face_posy - [STR64] - name of the material to be attached to the top face (POS Y) - default value: none
  • material_face_negy - [STR64] - name of the material to be attached to the bottom face (NEG Y) - default value: none
  • material_face_posz - [STR64] - name of the material to be attached to the front face (POS Z) - default value: none
  • material_face_negz - [STR64] - name of the material to be attached to the back face (NEG Z) - default value: none

spin_values element

spin_values specifies the rotation angles around the X, Y and Z axis. At each frame, the rotation angles of the mesh are incremented by the specified values. This generates an animation of the mesh by doing a simple rotation around the 3 axis.

Attributes:
  • x - [REAL] - Rotation angle around the X axis in degrees - default value: 0.0
  • y - [REAL] - Rotation angle around the Y axis in degrees - default value: 0.0
  • z - [REAL] - Rotation angle around the Z axis in degrees - default value: 0.0
Remark
The previous values will work only if the auto_spin attribute is set to TRUE.

terrain element

terrain specifies the parameters that initialize a TERRAIN_PATCH type mesh.

Attributes:
  • heightmap - [STR255] - specifies the texture of rise which represents the heights of the ground for a ground type mesh. In the current version, this texture must be squared (256x256, 400x400, 2048x2048...) and be in a 24 bits per pixel resolution.
    Remark: unlike the other nodes that use textures, heightmap represents the name of the image file on the hard disk (relative access path to the heightmap).
  • patch_num_segs - [INTEGER] - number of segments for each side of the patch of ground - default value: 32
  • vertical_scale - [REAL] - vertical rise factor - default value: 50.0
  • patch_size - [REAL] - size of the ground patch for each side - default value: 400.0

texture element

texture specifies all the parameters for the application of a texture to the mesh.

Attributes:
  • texture_type - [ENUM] - texture type. Indicate its use. The following values are accepted:
    • COLOR_MAP: standard use of the texture. The values of each pixel represent colors - default value
    • NORMAL_MAP: just for use with the DOT3 Bump Mapping (performed by the native functions of the graphics controller). The values of each pixel represent normal vectors.

      First remark: in case a normal map is used in a pixel shader, use the COLOR_MAP type.
      Second remark: a texture whose type is NORMAL_MAP must always be on the texture unit 0. In that case, the first texture representing the color must start with the texture unit 2, because the texture unit 1 is reserved for the DOT3 Bump Mapping operation.

  • material_name - [STR127] - name of the material on which to apply the texture.
  • texture_unit - [INTEGER] - texture unit to be used for the texture. Integer value ranging between 0 and 3 - default value: 0
  • texture_name - [STR127] - name of the texture.
  • u_tile - [REAL] - tiling factor for the U coordinate - default value: 1.0
  • v_tile - [REAL] - tiling factor for the V coordinate - default value: 1.0
  • u_offset - [REAL] - shift of the U coordinate - default value: 0.0
  • v_offset - [REAL] - shift of the V coordinate - default value: 0.0
  • u_move - [REAL] - increment of the U coordinate at each frame - default value: 0.0
  • v_move - [REAL] - increment of the V coordinate at each frame - default value: 0.0
  • mirror - [BOOLEAN] - enables (TRUE) or disables (FALSE) the reflection texture mode. This property allows to simulate in a realistic way the reflections on a mesh surface : mirror, water surface... - default value: FALSE
Example
<mesh>
	...
	<texture material_name="floor1_mat" 
	              texture_name="ceiling_0_n" 
	              u_tile="12.0" v_tile="12.0"
	              texture_unit="0"
	              texture_type="NORMAL_MAP" />
	
	<texture material_name="floor1_mat" 
	              texture_name="ceiling_0_bs" 
	              u_tile="12.0" v_tile="12.0"
	              texture_unit="2"
	              texture_type="COLOR_MAP" />
	...	              
</mesh>


u_move and v_move specify the texture coordinates increment per frame of every vertex of a mesh for a particular texture unit. That makes it possible to easily create textures animations. For more complex animations, please refer to the Hyperion/LUA API functions concerning the handling of meshes.

u_tile and v_tile specify the multiplying factor to apply to the texture coordinates of each vertex of a mesh for a particular texture unit. See also addressing_mode to control the way a texture is repeated in case of a tiling factor greater than 1.0.

torus element

torus specifies the parameters that initialize a TORUS type mesh.

Attributes:
  • radius - [REAL] - principal radius of the torus - default value: 60.0
  • vertex_density - [INTEGER] - number of vertices along the torus circumference - default value: 32
  • section_radius - [REAL] - radius of the torus section - default value: 15.0

vb_quad element

vb_quad specifies the parameters that initialize a VB_QUAD type mesh. This type of mesh allows in an optimized manner the rendering of a great number of quads. It has been developped for the "Animated Grass" demo (Tutor 84). By default, it is initialized with one quad. To render 1 quad, it is faster to use the quad primitive that is designed for this task. But as soon as the number of quads to be rendered exceeds one hundred (actually 500 quads are used in the Animated Grass demo), the vb_quad is about 2 to 3 times faster. The num_vb_quads attribute makes it possible to reserve the memory capacity for num_vb_quads quads storage. It is necessary then, with a LUA scripting code , to initialize the position of each quad by using the HYP_MeshVBQuad_AddQuad() function (please refer to tutor 84 to see an example).

Attributes:
  • num_vb_quads - [INTEGER] - maximum number of quad handled by this mesh - default value: 1

translate_vertices element

translate_vertices makes it possible to translate the vertices of a mesh without moving its pivot point.

Attributes:
  • x - [REAL] - X component of the translation vector - default value: 0.0
  • y - [REAL] - Y component of the translation vector - default value: 0.0
  • z - [REAL] - Z component of the translation vector - default value: 0.0

vertices_color element

vertices_color specifies the new color to be applied to all the vertices of the mesh.

Attributes:
  • r - [CLAMPED_REAL] - red component . Float value ranging between 0.0 and 1.0 - default value: 0.9
  • g - [CLAMPED_REAL] - green component . Float value ranging between 0.0 and 1.0 - default value: 0.9
  • b - [CLAMPED_REAL] - blue component . Float value ranging between 0.0 and 1.0 - default value: 0.9
  • a - [CLAMPED_REAL] - alpha component . Float value ranging between 0.0 and 1.0 - default value: 1.0
Remark
The color of the vertices takes effect only if lighting is disabled for this mesh.

optimize element

optimize makes it possible to optimize the geometry of a polygonal mesh. This is useful when you want to apply deformation effects to the meshes. By default, the volumic shadows engine optimizes all the meshes.

Attributes:
  • method - [ENUM] - optimization method. The following values are accepted:
    • NONE: does not apply any optimization.
    • VERTICES: optimize the vertices: remove the isolated vertices and merges the vertices that have the same position (by considering an epsilon tolerance adjustable with vertex_epsilon).
    • ALL: optimize the vertices (like the VERTICES mode) and the faces (removal of the degenerated faces).
  • vertex_epsilon - [REAL] - makes it possible to specify the tolerance for the vertices merging in the VERTICES optimization mode - default value: 0.0001

add_child element

add_child allows to add a child to the current mesh. That makes it possible to easily set up complex hierarchies. Any transformation (rotation or translation) of the current mesh will have repercussions on the children.

Attributes:
  • name - [STR127] - name of the child object to be added. Of course, this object must exist.

remove_child element

remove_child allows to remove a child from the current mesh. That makes it possible to easily set up complex hierarchies.

Attributes:
  • name - [STR127] - name of the child object to be removed. Again, this object must exist.

scale_vertices element

scale_vertices makes it possible to apply a scale factor to each vertex of the mesh in the X, Y and Z direction.

Attributes:
  • x - [REAL] - X scaling factor - default value: 1.0
  • y - [REAL] - Y scaling factor - default value: 1.0
  • z - [REAL] - Z scaling factor - default value: 1.0

vertices_uv_tiling element

vertices_uv_tiling makes it possible to apply a tiling factor to the UV texture coordinates of the vertices for a given texture unit.

Attributes:
  • texture_unit - [INTEGER] - applies the tiling factor to all the corresponding texture coordinates with this texture unit - default value: 0
  • u_tile - [REAL] - tiling factor for the U coordinate - default value: 1.0
  • v_tile - [REAL] - tiling factor for the V coordinate - default value: 1.0

nx_linear_velocity element

nx_linear_velocity makes it possible to specify the linear velocity of an object. The speed parameters are taken into account only if the physical simulation engine has been activated in the scene node.

Attributes:
  • x - [REAL] - X coordinate of the gravity vector - default value: 0.0
  • y - [REAL] - Y coordinate of the gravity vector - default value: -9.81
  • z - [REAL] - Z coordinate of the gravity vector - default value: 0.0
  • damping - [REAL] - damping speed factor - default value: 0.5
  • sleep_threshold - [REAL] - sleeping threshold - default value: 0.14*0.14

nx_angular_velocity element

nx_angular_velocity makes it possible to specify the angular velocity of an object. The speed parameters are taken into account only if the physical simulation engine has been activated in the scene node.

Attributes:
  • x - [REAL] - X coordinate of the gravity vector - default value: 0.0
  • y - [REAL] - Y coordinate of the gravity vector - default value: -9.81
  • z - [REAL] - Z coordinate of the gravity vector - default value: 0.0
  • damping - [REAL] - damping speed factor - default value: 0.5
  • sleep_threshold - [REAL] - sleeping threshold - default value: 0.15*0.15

nx_misc_data element

nx_misc_data makes it possible to specify the angular velocity of an object. The speed parameters are taken into account only if the physical simulation engine has been activated in the scene node.

Attributes:
  • mass - [REAL] - mass of the object - default value: 100.0
  • density - [REAL] - density of the object - default value: 0.0
  • actor_type - [ENUM] - actor type (object):
    • STATIC
    • DYNAMIC - default value.
    • KINEMATIC

vertex_normal_field element

vertex_normal_field allows to display mesh vertices normal vectors.

Attributes:
  • render - [BOOLEAN] - enables or disables the rendering of vectors field - default value: FALSE
  • r - [CLAMPED_REAL] - red component of vectors color - default value: 1.0
  • g - [CLAMPED_REAL] - green component of vectors color - default value: 1.0
  • b - [CLAMPED_REAL] - blue component of vectors color - default value: 0.0
  • length_factor - [REAL] - multiplier factor of vectors lenght - default value: 10.0

face_normal_field element

face_normal_field allows to display mesh faces normal vectors.

Attributes:
  • render - [BOOLEAN] - enables or disables the rendering of vectors field - default value: FALSE
  • r - [CLAMPED_REAL] - red component of vectors color - default value: 0.0
  • g - [CLAMPED_REAL] - green component of vectors color - default value: 1.0
  • b - [CLAMPED_REAL] - blue component of vectors color - default value: 0.0
  • length_factor - [REAL] - multiplier factor of vectors lenght - default value: 10.0


GeeXLab demos


GLSL - Mesh exploder


PhysX 3 cloth demo


Normal visualizer with GS


Compute Shaders test on Radeon


Raymarching in GLSL



Misc
>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0019359588623047 seconds.