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
 
Demoniak3D Basis - HyperGraphs

By Jérôme 'JeGX' GUINOT
jegx [at] ozone3d [dot] net

Initial draft: October 17, 2005

Translated from french by Samir Fitouri - soundcheck [at] ozone3d [dot] net




1 - XML

2 - Structure of a HSDL source code

3 - HyperGraphs

4 - Downloads




1 - XML


The scene description language of Demoniak3D or DSDL (for Demoniak3D Scene Description Language) is based on the current XML standard.

The XML language: small recalls

XML documemts are composed of storage spaces, named entities, which contain data. These data are made up of characters strings which represent the data themselves, and markers as well (still called tags) who are intended to define the logical organization of the data. The XML format provides a whole of mechanisms to impose constraints on the organization of the data as well as their logic design.

The principal objectives of the XML formalism are as follows:
  • XML must be easily usable on Internet.
  • XML must be able to support a great number of applications.
  • XML documents must be directly readable by a programmer and reasonably clear as well.
  • XML documents must be easy to create.


Edition of a XML file

But what is a XML document exactly? A XML document is a simple text file (which often bears the xml extension) editable with any text editor.

Caution: softwares such as Microsoft Word are not simple text editors. Indeed, they add a quantity of control and presentation elements which will disturb and ruin the loading of a 3D scene with Demoniak3D.

If you do not own yet a text editor, here is very powerful an friendly user one: Notepad++. It is a completely free text editor. It supports syntactic colouring for the majority of the languages, including XML and LUA. Notepad++ is integrated in Demoniak3D and may be accessed from the Tools menu. The official site of Notepad++ is: http://notepad-plus.sourceforge.net/. The updates are regular which is extremely appreciable, thus do have a look from time to time. In all the cases, the latest version of Notepad++ is always delivered with Demoniak3D.





2 - Structure of a HSDL source code



Structure of a source code in HSDL

A source code (or simply source) in HSDL (thus a XML document) describes the set of data used within the 3d scene in an arborescent form. A source in HSDL is a textual file bearing the xml extension. This source is composed of 2 principal and obligatory parts:
  • a marker indicating that this is a XML type document. This marker is of the form:
    	<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
    	
    This marker must be the first line of the XML file. Let us see the various elements in details:
    • version: version: indicates the xml version used in the file. The 1.0 version is currently employed but standard version 1.1 is ready.
    • encoding: this will specify the encoding of the characters in the XML document. "ISO-8859-1" supports the Latin characters and the accentuated characters.
    • standalone: indicates that the XML document is autonomous, in the sense that it does not depend on any other files like the DTD (Document Standard Definition) or other diagrams.


  • a root element containing all the other XML elements. The markers (or tags) are similar to those used by the HTML language, i.e. an opening marker looks like <mark> and a closing marker like </mark>. The root element or root node in the HSDL terminology is as follows:
    	<hyperion>
    	
Let us see all this more closely. The following example describes a minimal 3d scene: initialization of the scene and the camera.
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>

<hyperion>

<!--
SCENE node: The scene node describes how the new 
window will be (size, background color, ...).
-->
<scene name="hypergraph_01" show_ref_grid="TRUE" >
	<background_color r="0.1" g="0.1" b="0.2" />
</scene>

<!--
CAMERA node: A scene can have more than one 
camera, but only one is active at a given time.
-->
<camera name="Main_Camera" navigation_mode="FLY" >
	<position x="0.0" y="50.0" z="150.0" />
</camera>

</hyperion>

Coding rules
  • With the difference of HTML, XML is CASE sensitive, i.e. <camera> and <Camera> and <CAMERA> are 3 different markers. Therefore take care when writing or copying a XML code!

  • The comments begin with <!-- and end with -->. They are essential for the reader to easily understand the code, but are not obligatory for Demoniak3D. They are authorized anywhere in the document provided that they are not inserted into within a marker. For example, the following syntax
    	<camera_name <!-- un commentaire -->>Main_Camera</camera_name> 
    	
    is not valid and will generate an error message from the Demoniak3D parser.

  • All the Demoniak3D markers are written in small letters and the various words of a marker are separated by the '_' symbol (underscore).

  • Each marker has an opening and a closing tag:
    	<camera>......</camera> 
    	



3 - HyperGraphs


A HSDL source code is a hierarchy of nodes, the node root being materialized by <hyperion>. All the other nodes contained inside the root node compose the various elements of the 3D scene. The tree structure of nodes describing a scene is called HyperGraph:




The 3d scene corresponding to this hypergraph can be as follows:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!--
============================================================
FILE:	 	Simple HyperGraph
AUTHOR:		JeGX
DATE:		29.05.2004
PURPOSE:	Shows a very simple scene: lighting and 3D model
           loading.

This file is part of Demoniak3D Demo-System.
For the latest info, see http://www.oZone3D.net
Copyright (C)2004-2005 The oZone3D Team
===========================================================
-->

<hyperion version="1.0">
	
<!--
+++++++++++++++++++++++++++++++++++++++[ SCENE ]
-->
<scene name="simple_hypergraph" show_ref_grid="FALSE" 
                                display_fps="TRUE" >
    <background_image image="data/luminance.jpg" />
	<window_size width="1024" height="768" />
</scene>


<!--
+++++++++++++++++++++++++++++++++++++++[ CAMERA ]
-->
<camera name="myCamera" fov="60.0" 
        navigation_mode="EXAMINE" >
        
	<position x="0.0" y="50.0" z="150.0" />
	<orientation pitch="20.0" yaw="90.0" />
	<lookat x="0.0" y="0.0" z="0.0" />
</camera>


<!--
+++++++++++++++++++++++++++++++++++++++[ LIGHT ]
-->
<light name="myLight" type="OMNI" >
	<position x="-50.0" y="100.0" z="100.0" />
	<diffuse r="1.0" g="1.0" b="1.0" />
</light>


<!--
+++++++++++++++++++++++++++++++++++++++[ MODEL ]
-->
<model name="skullModel" 
       filename="data/panier/panier.o3mdl" 
      lighting="TRUE" texturing="TRUE" />


<hyperion>


Loading this source in Demoniak3D gives the following result:





4 - Downloads



Accompanying project
Update: October 17, 2005




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.0025689601898193 seconds.