Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79
oZone3D.Net - Demoniak3D Developer Guide




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 <material> node

Function

The material node is a fundamental node in Demoniak3D. A material gathers the various physical coefficients which define how an object reacts to the light. It also gathers one or more textures (depending on which texturing technique: simple texturing or multi texturing). It also contains an increasingly significant element due to the latest generation of graphics boards: the vertex/pixel shader.

General syntax

<material
	name=""
	specular_exp="16.0"
	opacity="1.0" 
	shader_program_name="" 
	shader_program_name_for_ambient_pass="" 
	preset="USER" >
	
	<ambient
		r="0.9" 
		g="0.9" 
		b="0.9" 
		a="1.0" />

	<diffuse
		r="0.9" 
		g="0.9" 
		b="0.9" 
		a="1.0" />

	<specular
		r="0.1" 
		g="0.1" 
		b="0.1" 
		a="1.0" />
	
	<self_illumination_factor
		r="0.0" 
		g="0.0" 
		b="0.0" 
		a="0.0" />
	
	<add_texture
		texture_unit="0" 
		texture_name="" />
</material>

Elément material

material est la balise xml qui définit un noeud material.

Attributs:
  • name - [STR127] - nom du noeud. Ce nom permettra de référencer ce noeud tout au long du script XML.

  • opacity - [CLAMPED_REAL] - spécifie la valeur du coefficient d'opacité du matériau. L'opacité permet de créer des effets de transparence: une opacité de 1.0 signifie que le matériau est totalement opaque et une opacité de 0.0 signifie que le matériau est totalement transparent - valeur par défaut: 1.0

  • specular_exp - [REAL] - spécifie la valeur du coefficient exponentiel spéculaire du matériau - valeur par défaut: 16.0

  • shader_program_name - [STR127] - nom du noeud vertex/pixel shader à attacher à ce matériau. Dans le cas d'un rendu avec ombres volumiques, ce shader sera utilisé pour la passe d'illumination.

  • shader_program_name_for_ambient_pass - [STR127] - nom du noeud vertex/pixel shader à attacher à ce matériau. Ce shader sera utilisé pour le rendu de la passe ambiante des ombres volumiques.

  • preset - [ENUM] - permet d'initialiser les coefficients ambiant, diffus et spéculaire avec des valeurs correspondants à différents matériaux:
    • BLACK_PLASTIC: plastique noir
    • CHROME: chrome (opacité=1.0)
    • GOLD: or (opacité=1.0)
    • SILVER: argent (opacité=1.0)
    • POLISHED_SILVER: argent poli (opacité=1.0)
    • BRONZE: bronze (opacité=1.0)
    • BRASS: laiton (opacité=1.0)
    • COPPER: cuivre (opacité=1.0)
    • PEWTER: étain (opacité=1.0)
    • JADE: jade (opacité=0.95)
    • EMERALD: émeraude (opacité=0.55)
    • RUBY: rubis (opacité=0.55)
    • PEARL: perle (opacité=0.922)

Elément ambient

ambient spécifie la valeur du coefficient de reflection ambiant du matériau.

Attributs:
  • r - [CLAMPED_REAL] - composante rouge. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.9
  • g - [CLAMPED_REAL] - composante verte. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.9
  • b - [CLAMPED_REAL] - composante bleue. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.9
  • a - [CLAMPED_REAL] - composante alpha. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 1.0

Elément diffuse

diffuse spécifie la valeur du coefficient de reflection diffus du matériau.

Attributs:
  • r - [CLAMPED_REAL] - composante rouge. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.9
  • g - [CLAMPED_REAL] - composante verte. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.9
  • b - [CLAMPED_REAL] - composante bleue. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.9
  • a - [CLAMPED_REAL] - composante alpha. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 1.0

Elément specular

specular spécifie la valeur du coefficient de reflection spéculaire du matériau.

Attributs:
  • r - [CLAMPED_REAL] - composante rouge. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.1
  • g - [CLAMPED_REAL] - composante verte. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.1
  • b - [CLAMPED_REAL] - composante bleue. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.1
  • a - [CLAMPED_REAL] - composante alpha. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 1.0

Elément self_illumination_factor

self_illumination_factor spécifie la valeur du coefficient de reflection d'auto-illumination (ou composante émissive) du matériau.

Attributs:
  • r - [CLAMPED_REAL] - composante rouge. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.0
  • g - [CLAMPED_REAL] - composante verte. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.0
  • b - [CLAMPED_REAL] - composante bleue. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.0
  • a - [CLAMPED_REAL] - composante alpha. Valeur réelle comprise entre 0.0 et 1.0 - valeur par défaut: 0.0

Elément add_texture

add_texture permet d'attacher une texture à un matériau. Jusqu'à 4 textures peuvent être attachées à un matériau afin de faire du multitexturing.

Attributs:
  • texture_name - [STR127] - nom du noeud de texture.
  • texture_unit - [INTEGER] - unité de texture à laquelle attacher la texture. Valeur entière comprise entre 0 et 3 - valeur par défaut: 0

material element

material is the xml tag that defines a material node.

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

  • opacity - [CLAMPED_REAL] - specifies the value of the material opacity coefficient. Opacity makes it possible to create transparency effects: an opacity of 1.0 means that the material is completely opaque and an opacity of 0.0 means that the material is completely transparent - default value: 1.0

  • specular_exp - [REAL] - specifies the value of the exponential specular coefficient of the material - default value: 16.0

  • shader_program_name - [STR127] - name of the vertex/pixel shader node to be attached to this material. In the case of shadow volumes, this shader is used for the illuminatiom pass.

  • shader_program_name_for_ambient_pass - [STR127] - name of the vertex/pixel shader node to be attached to this material and used for shadow volumes ambient pass.

  • preset - [ENUM] - makes it possible to initialize the ambient, diffuse and specular coefficients with the corresponding values of various materials:
    • BLACK_PLASTIC: black plastic
    • CHROME: chromium plate (opacity=1.0
    • GOLD: gold (opacity=1.0)
    • SILVER: money (opacity=1.0)
    • POLISHED_SILVER: polished silver (opacity=1.0)
    • BRONZE: bronze (opacity=1.0)
    • BRASS: brass (opacity=1.0)
    • COPPER: copper (opacity=1.0)
    • PEWTER: pewter (opacity=1.0)
    • JADE: jade (opacity=0.95)
    • EMERALD: emerald (opacity=0.55)
    • RUBY: ruby (opacity=0.55)
    • PEARL: pearl (opacity=0.922)

add_texture element

add_texture makes it possible to attach a texture to a material. Up to 4 textures can be attached to a material in order to perform multitexturing.

Attributes:
  • texture_name - [STR127] - name of the texture node.
  • texture_unit - [INTEGER] - texture unit to which attach the texture. Integer value ranging between 0 and 3 - default value: 0

ambient element

ambient specifies the value of the ambient reflection coefficient of the material.

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

diffuse element

diffuse specifies the value of the diffuse reflection coefficient of the material.

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

self_illumination_factor element

self_illumination_factor elementspecifies the value of the self-illumination reflection coefficient (or emissive component) of the material.

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

specular element

specular specifies the value of the specular reflection coefficient of the material.

Attributes:
  • r - [CLAMPED_REAL] - red component. Float value ranging between 0.0 and 1.0 - default value: 0.1
  • g - [CLAMPED_REAL] - green component. Float value ranging between 0.0 and 1.0 - default value: 0.1
  • b - [CLAMPED_REAL] - blue component. Float value ranging between 0.0 and 1.0 - default value: 0.1
  • a - [CLAMPED_REAL] - alpha component. Float value ranging between 0.0 and 1.0 - default value: 1.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.0030519962310791 seconds.