# White_dune

White_dune is a free (GPL) Cross-Plattform (Linux, FreeBSD, MacOSX, Microsoft Windows, Rasberry PI) 3D-modeller and animationtool.

With white_dune you can create/change 3D objects and animate them. The result can be shown in any webgl enabled web browser or can be converted to the RIB format for movie creation or can be complied to a usual C or C++ OpenGL-rogram.

## Installation and configuration

In Dezember 2019 white_dune was included into Fedora Linux 32 (Installation with "dnf install wdune wdune-docs").
For Ubunutu Linux-Distributionen there is a "snap" Package.
In Debian und Ubuntu there is a white_dune-Package available, that is totally deprecated.
There are packages with installation instructions on the white_dune homepage available for the following Linux distributions:

- OpenSUSE LEAP 15.2 Linux
  Installation with zypper and rpm
- Debian Buster Linux
  Installation with dpkg and apt
- Ubuntu 18.04 LTS Linux
  Installation with dpkg and apt
- Rasbian 10 Linux for the Rasberry PI
  Installation with dpkg and apt
- Arch Linux for ARM-Rechner
  Installation with pacman
- Arch Linux for PCs
  Installation with pacman

The configuration in white_dune takes place via dialogs in the "Options"-menu, which end up in Linux in the text file $HOME/.dunerc after the end of the program.
Internally, white_dune uses the ISO standard X3D/VRML97 as the storage format. Via Options white_dune can be changed from the English language into the German (or Italian or French) language
Under Linux white_dune comes with 2 Icons:

- The 4kids icon starts a GUI, that is suitable for Beginners and children.
- The usual icon starts a GUI, that is made for X3D/VRML97 users (e.g. to add interaktion r scripting to a Architectur-3D-Modell).

With the 4kids-version let you generate (with some practice) the animation of the following screenshot in 15 minutes.
There are Tutorials, hoe white_dune can be used in 3D modeling and animation.

## History

White_dune did not start with the claim to be a tool for 3D modeling and animation, but was initially a special tool for VRML97 3D files.
In 1999 the Canadian Stephan F. White laid the most important foundations of the program, but gave up in 2000.
On May 31, 2000 it was decided to fork the project under the name "white_dune".
Since then, it has been massively expanded.

## Modelling

White_dune has 8 main modelling features:

- NURBS
  NURBS describes a formula that can be used with just a few control-points, that describe many mesh-points.
  A NURBS ball needs e.g. only 20 control points and can then with the By moving the control points, it can easily be changed to a NURBS heart.
  ).
  With the 2D-NURBS formula all mathematical curves can be described, also curves with corners and tips.
  In white_dune all primitives (box, ball, cylinder and cone), as well as all super formula-based surfaces can be transformed into NURBS objects
- Superformula
  The superformula is based on a concept similar to NURBS:
  With only 12 (in white_dune 24) parameters, the mesh-points can be created for many symmetrical surfaces:
  For example, with a super formula starfish 3D model control the number of starfish arms with just one parameter. white_dune knows the following super formula-based objects:
  - SuperShape: the Superformel is used in two dimensionens
  - Superformula in one dimension:
    - SuperExtrusinon:
      Torus and tube/horn
    - SuperRevolver:
      Revolving shape (e.g. mushroom)
    - SuperEllisoid:
      A special case of the superformula: with only 2 (in white_dune 12) parameters a sphere, octraeder and box and all intermediate forms can be described
- Extrusion:
  The extrude command can be used to pull out certain polygons from a mesh (basics: box converted to a mesh (IndexedFaceSet) and "inset" command)
- Subdivision
  The Subdivide command is often used after the Extrude command.
  It can be used to make the (closed if possible) mesh object more rounded.
- Boolean Operations
  With Boolean operations, 3D objects can be combined or subtraced from each other.
- Mesh-Reducer
  There is a parameter "creaseAngle" for Mesh (IndexedFaceSet in X3D), to influcence face normals in a way so the edges are hidden, ,
  but the subdivide command let explode the number of Polygons in a quadratic way.
  For a real-time 3D format like X3D or OpenGL it is important to have a powerful mesh reducer available that decreases the number of polygons, but the rough shape of the mesh is changed as little as possible
  After the mesh reducer command, the extrude command is often used. benutzt.
- Vertex-Modifier
  It can be used to pull dents out or push in dents of mesh or NURBS objects. This modeling ability requires that many mesh-points or NURBS control-points are available.
  There is a command for NURBS objects in white_dune that specifies the number of NURBS control points.
- Convex hull
  Many different objects can be created with the convex hull. Select points (e.g. mesh-points or NURBS control-points) two times and create a mesh with an enclosing hull.

## Animation

White_dune has 2 Animation-Possibilities:

- Normal animation:
  This can animate everything that can be animated in X3D. The animation can be influenced in a "ChannelView" window or an animation (e.g. color with the color wheel) can be recorded with the "Record and Play" buttons.
- curven-animation:
  This is only allowed for the "Transform" node (move and rotate objects) and "Viewpoint" (moving and rotating the camera). An object group or the camera follows a path.

## Movie creation

When there is a X3D-Datei with a animation, you can use
$ run_dune_and_aqsis.sh datei.x3dv
to call white_dune and the free Renderman movierenderer "aqsis" in a way, that the pictures are accounted in paralell.
If the program "mencoder" is available (e.g. under Ubuntu oder Debian Linux), a movie-file "datei.mp4" would be created.
If not, "aqsis" creates many picure files, which an be viewed with imagemagicks "animate":
$ animate -alpha off datei*.tiff

## Comparision with Blender

- Blender has an important 3D object "Metaballs". Is can easily be used to create interconnected 3D objects.
- Blender has more tools to change mesh-objects.
- With Blender you can control the material properties (e.g. reflection) for the individual images better than in white_dune, which is made for real-time 3D graphics
- Blender has material collections available for download
- The vertex modifier in Blender can do not only dents and bumps, but also painting related bulges with the mouse
- The Vertex modifier in Blender cannot edit NURBS objects.
- There are some NURBS operations in white_dune that are not available in Blender.
- Bender has tools for hair, white_dune doesn't
- Blender is far more difficult to use than white_dune 4kids

## white_dune and the graphics performance of a system

White_dune is a real-time 3D program.
The ease of use depends on the graphics card and the number of used objects. If the graphics card is overloaded, the objects are jerky in animation and it becomes difficult to edit, move or rotate an object.
A (NURBS) object in white_dune has 3658 polygons.
Unfortunately there is a problem with the open source driver for Linux NVIDIA graphics cards (noveau driver): certain graphics card models sometimes freeze hard. Then you have to use the special Nvidia driver to install the graphics card.
The following table shows the limit up to how many objects (without morphing) can still be represented as reasonably runny:

Graphicscard | Class | System | System-frequency | NURBS-Objects
--- | --- | --- | --- | ---
PowerVR GX6250 | 1 | ARM Chromebook | 4x2.0 GHz | 1
ATI Radeon HD 6290 | 2 | ADM C-60 Netbook | 2x1.0 GHz | 1
Intel HD Graphics 3000 | 2 | Intel I5 Laptop | 4x2.5 GHz | 11
VideoCore VI | 2 | Raspberry PI 4 | 4x1.5 GHz | 10
Nvidia NVS 5200M | 3 | Intel I7 Laptop | 8x2.2 GHz | 16
Nvidia GT 320 | 3 | Core2Duo Macbook | 4x2.4 GHz | 24

There are faster Systems...
Class:

1: | no 3D-Graphics-driver | (anything has to be accounted by the CPU)
2: | Integrated Graphics | (Shared Memory Graphics)
3: | Dedicated Graphics | (memory on the graphicscard is only used by the graphicscard)

Obviously, a better graphics card is for graphics performance more important than the CPU.
What to do if it stutters because the graphics performance is insufficient ?
Start white_dune with the option "-tessellation"
e.g. "$ dune -tessellation 16 -4kids datei.x3dv"

- 1 (NURBS-)Objekt has now 480 Polygons, but do not look strongly differently from the default (-tessellation 32)
- 4 times more (NURBS) objects possible or less jerky
- Only the display has "more edges", not the (NURBS-)object data
- The display becomes more smooth again when the file (without "-tessellation") runs on a faster computer with a better graphics card
- Rendering with aqsis (for movie creation) is not affected
- X3D problem:
  (NURBS) objects cannot be painted
  As an alternative, images/textures (e.g. * .PNG files) can be placed on the 3D objects

## white_dune for children

White_dune "4kids" was used for children's computer animation projects.
For example, a small animation of an alien spaceship landing was made on two afternoons in the Leonberg "Stadtranderholung" in 2006/2007.
The children were between 7 and 13 years old.

## white_dune and human animation

White_dune supports as X3D Editor all visible X3D Befehle including "HAnim" (human animation).
With the "makehuman"-program (a Blender-enhencement) a configurable mesh of a human can be created. You have to take care, that only relative few Mesh-points are exported.
The mapping of single meshpoints to body-parts (e.g. arm or feet) is made in white_dune, but this alot of work. At the end, the single joints can be rotated, so you can create an animation.

## How can i support the development of white_dune ?

The white_dune menues are available in englisch, french, italian and german Into portugenese only the "4kids"-menue has been translated. The Dialogs are partitialy translated, only the german and english dialogs and error-messages has been full translated.
For the translation, you need not to be a programmer, cause Micro$oft Resource-Files are used. This means, that Words/Sentences a enclosed in "double quotes".
If you have a problem with white_dune (or a new idea), you can send a email to:
mufti11@web.de
white_dune has ca. 300 000 Lines in C++/C/.h/.m4-file, it is a relativ big program.
Intern white_dune uses a 2D-GUI-API in the Programmierlanguage C namend "libswt" (i think it should mean "Stephan White Toolkit").
Under Linux, motif and OpenGL 2 is used.
This is a bit oldfashioned.
The big advance of it, is that only one patch has been need to written cause of a API change.
The Patch was cause of lesstif, a Open-Source-clone of motif. Now is motif for Linux available under a open-source-licence, so lesstif is not developed anymore.
When white_dune crashes, it trys to rescue the X3D-data in a file.
This only works, if the internal datastructure is still intact, e.g. at a crash in the graphics code.
white_dune under Linux usually calls a "rcs" (newer versions: "git") revision-contol-system-command. Afterwards, all changes to an X3D file can be made understood and a specific version from the repository can be restored.
This is a very important feature, if you work with children.