- ### "dune", what's that ?

- ### What is scenegraph, fieldvalues, routes etc. about ?

- ### The 5 windows of "dune"

- ### Changing the scenegraph

- ### Input/erase of ROUTEs

- ### Changing FieldValues

  - #### Keyboard Input

  - #### Mouse Input

  - #### Changing FieldValues in the 3D Window

  - #### 6D Input (new in Version 0.19beta)

  - #### 6D Local Mode Input (new in Version 0.19beta)

  - #### Changing FieldValues in the ChannelView Window

  - #### Color Circle (new in Version 0.19beta)

- ### Navigation

- ### "dune" crashed, work lost ?

- ### Common tips for working with "dune"

## "dune", what's that ?

dune is a graphical VRML97 editor and animationtool in development. It can read VRML97 files, display and let the user change the scenegraph, fields and routes. This can be used to make simple VRML97 animations and interactions. Dune is normally not suited to work as VRML97 3D modelling tool. It makes sense, to use it together with a static 3D modelling tool with VRML97 export (like wings3d for example).

### What is scenegraph, fieldvalues, routes etc. about ?

Dune is a lowlevel tool to make/change VRML97 Files. It is supposed, the user knows the basic structure of VRML97.
You can find informations about VRML97 (except in a range of books) in the official ISO specification at http://www.web3d.org/technicalinfo/specifications/vrml97/index.htm. For the use of dune, especially the node reference http://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html is important.

### The 5 windows of "dune"

Beside some toolbars with icons "dune" essentially contains 5 windows. Beside the "3D Window" you can switch on/switch off this windows via the menu "View". Switch on/off this windows, when they match your current work status.

- Scene Tree
  This window contains the scenegraph. This shows the structure of a VRML file, the information, how the VRML nodes are arranged.
- Field View
  This window contains the fieldvalues, the numbers (or character strings) in a VRML file. Only the fields of the current selected node are shown.
- Route View
  This windows contains the ROUTEs, the ways of information different VRML nodes can send messages between them.
- Channel View
  This window is only valid for interpolator nodes. Interpolator nodes are most important for animations in VRML97.
- 3D Window
  This Window can not be switched off and shows a preview of the graphical output of a VRML file. In difference to the other windows, the implementation of the VRML97 standard in this window is very incomplete.
  Some nodes like "Extrusion", "PointSet", "Inline", "Background", self defined "PROTO", "EXTERNPROTO" are not shown at all and some nodes like the "Text" node under Unix should be seen as "better than nothing".
  Additional, not all fieldvalues are shown correctly. Most eye-catching is the error about the "ColorPerVertex" and "NormalPerVertex" fieldvalues in the often used "IndexedFaceSet" (Shape made of several polygons):
  Correct and false image of a IndexedFaceSet with "ColorPerVertex false" in Cosmoworlds/Cosmoplayer (left) and Dune (right)
  More correct image of a IndexedFaceSet with "ColorPerVertexflag true" in Cosmoworlds/Cosmoplayer (left) and Dune (right)
  A comparable problem is about "NormalPerVertex". "NormalPerVertex" have some influences to the accounting of light (shading).
  Of course, such a false image in the 3D window of a read in VRML object in the 3D window to not mean, there is a error in the VRML file.
  If in doubt, use File->Preview to start a VRML browser.

### Changing the scenegraph

The most simple way to change the scenegraph is to add new node by clicking to the matching VRML node icon.
To identify a VRML node icon, move the mouse to it and wait. A descriptive text will occure in the status bar at the bottom of the dune window.
Dune tries either to include the new node at the point of selection in the scenegraph,
or to the root of the scenegraph ("Scene" icon).
Dune will gray out all node icons, that are impossible to add.

Another way to change the scenegraph is to drag parts of it with the mouse.
Dune will show you with a icon of a stop sign, if the target node is not possible
If the target node is possible, dune will show the normal mousepointer.

### Input/erase of ROUTEs

ROUTEs are made in dune by finding the right icon in the RouteView Window (if you click to the icons, the matching icons in the scene tree windows are selected) and click to the boxes of the matching events. The name of the matching event is shown, and you can draw a line to the next icon/event.
As required by the VRML standard, only events with the same type (same color of boxes) can be made.
To erase ROUTEs, simply cut the line.

### Changing fieldvalues

There is more than one way to change fieldvalues:

- Keyboard input
  By clicking with the mouse to the matching value and releasing the button. The will open a text input window to input values from the keyboard.
- Mouse input
  By clicking with the mouse to the matching value and not releasing the button, but moving the mousepointer to left or right. This will decrease or increase the value.
  Changing fieldvalues are not implemented completely yet for "MF fields" (multiple Fields). "MF fields" are those, which open via a "+" sign.
- Changing FieldValues in the 3D Window
  Changing in the 3D Window is also a chainging of the fieldvalues. Mainly transform nodes are changed.
  During interactive work with the mouse in the 3D window, the icons select between a
  - translation
  - rotation
  - scale
  - changing center (new in version 0.19beta)
  Please note, you can not use this tools, when there is no transform node in the branch of the scenegraph.
  Beside the Transformnode, other fieldvalues can be changed in the 3D window. This is about moving small white boxes, like in ElevationGrid, PointLight, Box or the VRML200x Nurbsurface Node.
- 6D Input (new in version 0.19beta)
  Since version 0.19beta Dune supports 6D inputdevices (6D is about the 6 degrees of freedom) under Unix/Linux.
  Currently, only transform nodes at the 3 deepest levels of the scenegraph are correctly supported.
  Of course, the problem exist only for 6D Inputdevices (not complete yet) not for Datainput with mouse or keybord.
  is pressed, you can move a Transform node (and the containing objects) in all 6 degrees of freedom. The icon limits the movement to translations, the icon limits to rotations.
  The classic 6D inputdevice is the spaceball, a sort of joystick which allows only small excursions, but in all directions, including rotations.
  If you press the top of the spaceball for example, the object moves down. When you twist the spaceball, the object will follow this movement.
  The configuration of 6D inputdevices (still) works exclusively via commandlineparameters. Beside the type of the 6D inputdevices a scale of the inputvalues is needed for example:

         dune -xinput spaceball -allxyz=20,200 -allrot=40,400

  Beside the support via the Xinput protocol, also Linux joystick and libsball are supported. For details to the commandlineparameters see the man page.
  Another 6D inputdevice are the dials. Per default, the inputaxes are awkward placed.
  Via Commandlineparameters

         dune -xinput dialbox-1 -x=0 -y=2 -z=4 -xrot=1 -yrot=3 -zrot=5 -all=100,100,wheel

  you can exchange the axes.
- 6D Local Mode Input: Do you know RC planes ? (new in version 0.19beta)
  When the 6Dlocal icon is pressed, you can steer via the local axes of a transform node.
  For example, if you move a spaceball into z-direction ("into the screen") the transform node (and the containing objects) move to the direction of it's local z axis, it follows the blue z-arrow. For example, if you move a spaceball into y-direction ("up") the transform node (and the containing objects) move to the direction of it's local y axis, it follows the green y-arrow.
  This is usefull, when object and transformnode are similar arranged. Normally the object is not in the direction of the arrows of it's transform node.
  Therefore the transform node should be put into another and the transform node of the object should be rotated accordingly.
  When you use this type of steering, you will see a effect, which is not surprising for users of RC planes: If the object is moving "toward you", a roll to the left of the spaceball leads to a roll to the right of the object.
  Of course, the 6D local mode works in all Levels of the Scenegraph.
- Changing FieldValues in the ChannelView Window
  The ChannelView Window is used to show or change interpolator nodes. In a interpolator node, input values between 0 and 1 are assigned to a range of output values.
  Interpolators are used in VRML for simple animations in the form

         ROUTE TimeSensorDEFNAME.fraction_changed TO ???InterpolatorDEFNAME.set_fraction
         ROUTE ???InterpolatorDEFNAME.value_changed TO ???DEFNAME.set_???

  The output "fraction_changed" of a TimeSensor node (deliver values between 0 and 1) ist routed into the "set_fraction" Input of a interpolator node. The interpolator node select a matching intermediate value between the output values. The result can be routed into a another VRML node, this leads to a animation without jerk.
  In the following example:
  the output of a PositionInterpolators with the input values 0, 0.3, 1 and the output values x=1/y=0/z=3, x=1/y=2/z=3, x=3/y=3/z=0 is routed to the set_translation Input for a transform node. For example, the transform node (and the containing object) will move in the timecycle from 0 to 0.3 from y=0 to y=2 (to the top).
  Some of the VRML97 interpolators are not supported (yet), they are hard to input, to much data.
  - Easy usable (cause of the Channel View) are:
    - ColorInterpolator:
      Interpolate between Colors.
      Route targets for colors you will find at Shape->Appearance->Material
    - PositionInterpolator:
      Interpolate between Positions.
      Route target can be Transform.set_translation for example.
    - OrientationInterpolator:
      Interpolate between rotations.
      Route target can be Transform.set_rotation for example.
    - ScalarInterpolator:
      Interpolate between single (floating point) numbers.
      Single numbers are possible EventIn's of multiple VRML Nodes.
      There are multiple possibilities of usage.
  - The following interpolators are not supported (yet), cause they require too much data to input:
    - CoordinateInterpolator:
      Interpolate between points in a IndexFaceSet.
      Animations, which use the CoordinateInterpolator are called "morphing".
    - NormalInterpolator:
      Interpolate between the Normales of a IndexFaceSet.

Some simple interpolator animation can be created in dune via changes in the 3D window. PositionInterpolator/Transform.set_translation and OrientationInterpolator/Transform.set_rotation based animations can also created with the recording of 6D inputdevices.
If you want to work with the tools like a VCR recorder (record and playback animations) the following must be true:

- The ROUTEs must have the form

         ROUTE TimeSensor.fraction_changed TO ???Interpolator.set_fraction
         ROUTE ???Interpolator.value_changed TO ???.set_???

- In the Timesensor-Knoten the fieldvalue "loop" must be "TRUE". (the Animation will start again and again).
- The fieldvalue "starttime" of the Timesensor must be greater or equal to the fieldvalue "stoptime" of the Timesensor-Knoten.

When only the recordbutton is pressed , you have to change the timecursor first and then input a value (via keyboard, mouse or 6D inputdevice).
When the recordbutton is pressed together with the playbutton , the change of the values (via mouseinput or 6D inputdevice) is recorded continuesly.
- ColorCircle (new in Version 0.19beta)
  There is a special inputwindow for colors, it takes place of the fieldView Window. To get it, a colorfield must be selected in the fieldView Window and the Colorcircle Icon must be pressed.
  With a mouseclick, you can select a color in the color circle and in the bar beside it, you can select a darker variant.
  Currently, the display of the color circle is slow....
  When the "OK" button is pressed, the normal fieldView window returns.

### Navigation

To navigate in the 3D Window, you have

- Shift-Mouse 1: Zoom View
- ctrl-Mouse 1: Rotate View

Additional you have from version 0.16 a SGI like navigation. Please note, that a misconfigured windowmanager can eat up this input....

- Alt-Mouse1: Rotate View
- Alt-Mouse2: Move View
- Alt-Mouse1-Mouse2: Zoom View

Instead of pressing keyboard buttons, you can also switch with the mouse in a navigation mode by pressing the icon since version 0.19beta. When a 6D inputdevice is active and the Scene icon is selected in the Scene Tree you can navigate depending on the transform icons in the VRML file.

### "dune" crashed, work lost ?

Dune is work in development and it is not as stable as it should be.
If dune crashed, is your work lost ?
Not automatically, "dune" will try to save the VRML97 file short before crash. If this is sucessfull, dune will write under Unix/Linux something like

       Internal Crash !
       Try to save Files
      attempt to write file to /home/someone/.dune_crash_NUMBER_NUMBER.wrl
      write successfull

to standard error of the starting window and to system console (eg. to the window of the xconsole application).
Under M$Windows you get a similar Messagebox
When you restart dune and use the file menu, you should see the filename of this .dune_crash file.
Just click to it and save to another file.

### Common tips for working with "dune"

- Dune is not suited as modelling tool (yet).
  Only primitive shapes like box, sphere, cone, cylinder and text (text will not be displayed good enough yet) have easy input features.
  Other shapenodes like for example IndexFaceSet (a shape made of multiple facets), IndexLineSet, PointSet and ElevationGrid would require the input of a big amount of numbers, therefore this is not implemented yet.
  The remaining shapenode "nurbsPlane" is not part of the VRML97 standard. It will be part of the next VRML200x Standard.
  When you want to work with a "IndexedFaceSet" VRML-modell instead of primitive shapes, you work better with the result of a modeller (like e.g. ac3d, maja, ppe, ppmoder, catia, i3d, wings3d etc.) or search for a free 3D modell in the world wide web.
- To test interactions and script programming, you need "File -> Preview" (or you have to save the file and use it in a VRML Browser). Dune has no testmode for this yet.

You can find some typical VRML examples (you can load into dune) here.