1dune(1) General Commands Manual dune(1)
2
3
4
6 dune - graphical vrml97/x3d editor and animation tool
7
9 dune [ variantoptions ] [ stereoviewoptions ] [ inputdeviceoptions [
10 axisoptions ] [ miscoptions ] [ file.wrl file.x3dv file.x3d url ... ]
11
12 dune [ conversionoption ] filename
13
14 dune -illegal2vrml [ -prefix prefix ] protofile.wrl file.wrl ...
15
17 dune / white_dune is a graphical editor for the Virtual Reality Model‐
18 ing Language (VRML97), ISO/IEC 14772-1:1997 and X3D.
19 Additionally it has support for the NurbsSurface Node described in
20 VRML97 Amendment 1.
21 It can also load X3D files with XML encoding, if it has been compiled
22 with the expat XML parser library.
23 It can also download files from the internet (to ~/Downloads (default),
24 see "options->output setting"), if it has been compiled with the curl
25 library.
26 A filename of - means standart input.
27 Dune has some basic support for stereographic view usually with shut‐
28 terglases in OpenGL "quadbuffer" mode.
29 When used with the conversionoptions or the -illegal2vrml commandline
30 argument, white_dune is a non graphical commandline program.
31 The conversionoptions are used to convert the VRML/X3DV/X3D file into
32 sourcecode or a other 3D graphics format. This options are used in the
33 commandline, but some options require a graphics context (e.g. in the
34 simplest case a usage within a xterm command), cause some of the con‐
35 version options require the usage of OpenGL commands. To create a
36 OpenGL context, there are 3 different ways.
37 First open a temporay graphics window, do the conversion and close the
38 graphics window and exit. This is currently used under M$Windows.
39 Second is to use Mesa off screen rendering (the program was compiled
40 with the --with-osmesa configure option). With Mesa off screen render‐
41 ing it is possible to use OpenGL commands in a pure commandline pro‐
42 gram.
43 Third is to use glx based off screen rendering under Linux/UNIX/MacOSX.
44 In this case, the program do not open a graphics window, but requires a
45 working X11 display anyway. On a text console the Xvfb X11 server pro‐
46 gram can be used to get a working X11 display.
47 The -illegal2vrml option is used to repair VRML97 files with illegal
48 extensions.
49 See the illegal2vrml(1) manpage for more information.
50
52 -4kids start dune with a simplified GUI as simple 3D modeller for kids.
53
54 -x3dv if no file is loaded, start dune with a new X3DV file.
55 Per default, dune is started with a new VRML97 file.
56 If a file is loaded, dune prints a X3DV to standart out.
57
58 -kambi start dune with support for unportable extension nodes only
59 usable with the kambi VRML gameengine.
60
61 -cover start dune with support for unportable extension nodes only
62 usable with the special immersive VRML97 viewer cover/covise.
63
64 -x3dom start dune with support for unportable extensions only usable
65 with the X3DOM viewer.
66
67 -4catt start dune with a simplified GUI as a exporter/converter for
68 users of the CATT 8 sound simulation software.
69
70 -german
71 Use german menu, dialogs and errormessages
72
73 -italian
74 Use italian menu and dialogs, errormessages are still in english
75 language
76
77 -french
78 Use french menu and dialogs, errormessages are still in english
79 language
80
81 -portuguese
82 Use portuguese 4kids menu, only helpfull with -4kids option,
83 otherwise all in english
84
85 -english
86 Use english menu, dialogs and errormessages. This is the
87 default, it can be used to overwrite the setting of the LANG
88 environment variable.
89
90 -skipchecks
91 Load a errorfree, complex world with much checks skipped.
92 Use with care if white_dune would take hours to load the world.
93
95 -vrml97
96 Convert file to VRML97 ISO/IEC 14772-1:1997, write it to stan‐
97 dart output and exit.
98
99 -vrml97levelx3dv
100 Convert file to VRML97 ISO/IEC 14772-1:1997 compatible parts of
101 X3D classic VRML encoding ISO/IEC ISO/IEC 19776-2:2005, write it
102 to standart output and exit.
103
104 -x3d Convert file to XML encoded X3D, write it to standard output and
105 exit.
106
107 -X3DOM Convert file to X3DOM html, write it to standard output and
108 exit.
109
110 -download
111 Download file from the internet, write filenames to standard
112 error and exit.
113 This makes sense when using a VRML/X3D browser or the -readfrom‐
114 downloads option later.
115
116 -kanim filenamepattern
117 Convert file to the kanim fileformat and write it to standard
118 output.
119 The kanim fileformat is a XML file with references to different
120 VRML files. The VRML files are generated too, their name is gen‐
121 erated based on filenamepattern: The filenamepattern is shortend
122 from the fileextension and then extended with a underscore, a
123 increasing number and the .wrl extension.
124 All VRML files describe the same VRML scene with same the nodes,
125 but some numeric fields are animated.
126 This type of file is used by the open source VRML based Kambi
127 gameengine. It makes no sense to export a kanim file, if the
128 exported VRML file do not contain timesensor/interpolator based
129 animation.
130
131 -rib Convert file to the RIB format (Renderman Image Bytestream),
132 write it to standart output and exit. This option uses OpenGL
133 commands and can not be used in a commandline only environment.
134 The RIB file format is the input file format of movie renderers
135 like renderman or aqsis.
136 The RIB exporter do not support several features of VRML/X3D
137 (e.g. TextureTransform).
138
139 -files integer
140 Only useful with the -rib option.
141 Instead of writing the whole animation into the -o option file,
142 create integer files with parts of the animation. This is use‐
143 full to run the renderman renderer (e.g. aqsis) parallel.
144 A example:
145 $ dune -o RibExport.rib -files 4 -rib Untitled.wrl
146 $ for i in RibExport*.rib ; do (aqsis $i &); done
147
148 -ac3d Convert file to the AC3D format (Version AC3Db), write it to
149 standart output and exit. This option uses OpenGL commands and
150 can not be used in a commandline only environment.
151 The AC3D file format is the input/output file format of the 3D
152 modeller ac3d.
153 The ac3d 3d modeller do not support several features of VRML/X3D
154 (e.g. the ac3d 3d modeller do not support animation or interac‐
155 tion). Therefore the AC3D file format can not keep the complete
156 information of a VRML/X3D file in general.
157
158 -catt8geo outputdir_with_material_geo
159 Convert file to the catt geo format (Version 8), write it to
160 several .geo formats to the directory outputdir_with_mate‐
161 rial_geo and exit.
162 The catt geo file format is the input geometry file format of
163 the catt acustic simulation program.
164 The master.geo file in this directory outputdir_with_mate‐
165 rial_geo will hold include commands for the other produced .geo
166 files.
167 In the directory, a file material.geo with the needed ABS com‐
168 mands must exist before conversion. The material names for the
169 ABS names are generated from the DEF names of the VRML nodes.
170 If the material.geo file do not exist in the output‐
171 dir_with_material_geo directory, white_dune fails with a
172 errormessage.
173 Despite the catt programm can export VRML97 files, it do not
174 support several features of VRML/X3D.
175 Therefore the catt geo file format can not keep the information
176 of a VRML/X3D file in general.
177 This option uses OpenGL commands and can not be used in a com‐
178 mandline only environment.
179
180 -ldraw Convert file to the major part of the ldraw fileformat and write
181 it to standard output.
182 The header of the ldraw file is not generated. The header is a
183 important part of a ldraw file and should have been written to
184 standard output earlier (typically this is done from a batch
185 script).
186 The ldraw fileformat is a ASCII fileformat which is used to
187 exchange 3D data between several open source plastic brick
188 description programs. A example for such a program is LeoCAD.
189
190 -prefix prefix
191 The -prefix option in conjunction with conversion is only used
192 for the following options to create source code. It can be used
193 to define a leading prefix for the name of the data structures
194 in the source code output.
195 For example, the source code creates data types named "Node",
196 "Scenegraph" and "Callback". To avoid problems with other
197 libraries, adding options like for example "-prefix X3d" would
198 change the names to "X3dNode", "X3dSceneGraph" and "X3dCall‐
199 back".
200
201 -c Converts file to a C header/source file, write it to standard
202 output and exit.
203 See section C/C++/JAVA SOURCE EXPORT for more information.
204
205 -3c This option is similar to the -c option, but surfaces are first
206 triangulated and then exported as TriangleSet nodes.
207 This option uses OpenGL commands and can not be used in a com‐
208 mandline only environment.
209
210 -c++ Converts file to a C++ header/source file, write it to standard
211 output and exit.
212 See section C/C++/JAVA SOURCE EXPORT for more information.
213
214 -3c++ This option is similar to the -c++ option, but surfaces are
215 first triangulated and then exported as TriangleSet nodes.
216 This option uses OpenGL commands and can not be used in a com‐
217 mandline only environment.
218
219 -java Converts file to a java source file, write it to standard output
220 and exit.
221 See section C/C++/JAVA SOURCE EXPORT for more information.
222
223 -3java This option is similar to the -java option, but surfaces are
224 first triangulated and then exported as TriangleSet nodes.
225 This option uses OpenGL commands and can not be used in a com‐
226 mandline only environment.
227
228 -manyclasses
229 Deprecated (now default)
230 Only valid after the -java, -3java or -wonderland options.
231 This option is a brute force attempt to fight against the "too
232 much constants" problem in java. It may be impossible to compile
233 the output of a normal java based source code export, cause the
234 current format of java class files are limited to 64K so called
235 "constants". Not only real constants like 1, 2 or 3 are counted,
236 but also things like member variable definitions in classes etc.
237 With the -manyclasses option, all data is distributed into many
238 seperated classes.
239 The -manyclasses option should help, if you run into the "too
240 much constants" problem. In case of a large number of DEF com‐
241 mands in the vrml/x3dv file, you can still run into "too much
242 constants" problem, cause each DEF commands leads to extra mem‐
243 ber variable in the main scenegraph class. In this case, you
244 should reduce the number of DEF commands with the menupoint
245 actions ... rest of scenegraph branch ... remove ... DEF name
246 Beside the need to increase the memory limits of the javac com‐
247 piler (-Xms/-Xmx) options, you may also need to increase the
248 PermSize memory limits (-XX:PermSize=/-XX:MaxPermSize=) of the
249 java interpreter.
250
251 -o outputfile
252 Writes the converted file to outputfile.
253 This is important if the converted X3D/VRML file is not in the
254 same directory as the orignal file (cause of relative paths in
255 URLs like in ImageTexture or EXTERNPROTOs).
256 Note that -o outputfile must be used before the inputfile (file‐
257 name).
258
260 -nostereo
261 force non stereoview mode on Linux/UNIX (e.g. if you do not own
262 shutterglases)
263
264 -stereo
265 force stereoview mode.
266 Stereo is only supported for hardware/software combinations,
267 that allow quadbuffer stereo ("stereo in a window"), NOT
268 splitscreen stereo (eg. "OpenGlVR").
269 Examples for hardware/software combinations with support for
270 quadbuffer stereo are graphicscards with support for shutter‐
271 glasses or "stereo cloneview" to connect beamers of a onewall.
272
273 -anaglyph glassestype
274 force expermential stereoview mode for use with colored anaglyph
275 glasses.
276 glassestype can be red_green, green_red, red_blue or blue_red.
277 This option uses the OpenGL accumulation buffer. This is not
278 hardware-supported by a lot of graphics cards/graphics drivers
279 and can result in miserable performance.
280
281 -eyedist eyedistinmeter
282 Distance between the two eyes of the viewer.
283 Default eyedistinmeter is 0.06, it can be negative to swap eyes
284 (no need to reconfigure your hardware if eye swapping problems
285 occure).
286
287 -screendist screendistinmeter
288 Distance between the eyes of the viewer and the mid of the moni‐
289 tor screen.
290 Default screendistinmeter is 0.8.
291
292 -fieldofview fieldofviewindegree
293 Overwrite Field of View field in VRML viewpoints and set to
294 fieldofviewindegree in degree.
295 Good stereoviewing may want need to ignore the fieldOfView field
296 of viewpoints. The fieldOfView of the human eye is about 18
297 degrees, the VRML default is 45 degrees.
298
300 The following options are only valid, if dune was compiled with match‐
301 ing inputdevice driver support (e.g. there is not support for a Linux
302 joystick under IRIX).
303
304 -joystick joystickdevice
305 Only valid under Linux or M$Windows.
306 Under Linux, joystickdevice is the device of a Linux joystick
307 (usually something like /dev/input/js0 or /dev/js0).
308 Under M$Windows, the joystickdevice is a number. Depending from
309 the M$Windows version, this number is either 0, 1 or a number
310 from 0 to 15.
311
312 -SDLjoystick joystickdevice
313 Currently only valid under MacOSX. The joystickdevice is a num‐
314 ber (e.g. 0, 1, 2, ...).
315
316 -spaceball spaceballdevice
317 spaceballdevice is the serial device connected to the spaceball
318 (usually something like /dev/ttyd2 or /dev/ttyS0).
319 Only valid if binary was compiled with libsball support.
320
321 -nxtdials usbdevice
322 This option support a dials like inputdevice made of mindstorms
323 nxt motors. Just attach a wheel or gear to each of 3 motors,
324 connect them to the brick and connect the brick to the computer
325 via USB.
326 This option is only valid, if white_dune was compiled with sup‐
327 port of the libusb library e.g. available under Linux.
328 usbdevice is the number of the mindstorms nxt brick connected
329 via USB (0 for the first nxt brick, 1 for the second nxt brick,
330 etc).
331 The -nxtdials option automatically set the wheel axisoption.
332
333 -xinput xinputname
334 xinputname is the devicename supported by the Xinput Protocol
335 (usually something like magellan or dialbox).
336 Valid on most Unix/X11 implementations.
337
338 -xinputlist
339 Print a list of Xinput devicenames that can be possibly used as
340 xinputname for the -xinput option and exit.
341 Valid on most Unix/X11 implementations.
342
343 -xinputlistlong
344 Print a list of Xinput devicenames with axis information and
345 exit.
346 Valid on most Unix/X11 implementations.
347
348 -aflock aflockdevice [ aflockoptions ] -tracker birdaddr -wand bir‐
349 daddr
350 aflockdevice is the serial device connected to the Ascension
351 Flock of Birds master transmitter (usually something like
352 /dev/ttyd2 or /dev/ttyS0).
353 Dune assumes the following configuration:
354 Multiple FOBs with single RS232 Interface to Host Computer (see
355 "The flock of Birds, Installation and Operation Guide, Stand‐
356 alone and Multiple Transmitter/Multiple Sensors Configurations",
357 Page 3 (chapter "Introduction"), Figure 2).
358 birdaddr is the adress of the Bird Unit of the magnetic head
359 tracker (-tracker) or "3D Mouse" (-wand) in the Fast Bird Bus
360 (FBB adress) as configured with the dipswitches on the Bird
361 Unit.
362 This program need to have the Flock of Birds configured in the
363 Normal Address Mode only (see Page 12, Figure 4 of the manual
364 decribed above).
365
366 -headnavigation
367 Use current transformmode (including rotations) when using a
368 headtracker.
369 Default without -headnavigation is using only the translation
370 mode. This default gives you a very natural reaction, when your
371 head moves, the virtual world moves, but if your head only
372 rotates, the virtual world stand still. With the headnavigation
373 option, the virtual world reacts to head rotations, depending of
374 the current transform mode. Be carefull when you use this fea‐
375 ture while talking to a audience. Talking cause small and fast
376 head rotations and will cause small and fast rotations of the
377 virtual world. Your audience may get a impression like in a
378 earthquake and is more in danger to get motion sickness.
379
380 -sendalways
381 Tell dune that the device sends (almost) always values. This
382 values will then not be interpreted automatically as transform
383 commands.
384 Automatically used for Ascension Flock of Birds device
385 (-aflock).
386
387 -dontcarefocus
388 Inputdevice actions dont care about the window focus.
389 This can be useful in situations, when you only work with one
390 dune window, e.g. when using a onewall.
391
393 -x|-y|-z|-xrot|-yrot|-zrot=[-][integer_axisnumber]
394 [,[factor][,[accel][,[wheel][,ignore]]]]
395
396 -all|-allxyz|-allrot=[factor][,[accel][,[wheel][,ignore]]]
397
398 -none=integer_axisnumber
399
400 -axes=max_number_axes
401
403 - used to swap sign of value from axis
404
405 integer_axisnumber
406 Integer with the number of the axis, that should be used for the
407 x y z xrot yrot zrot directions.
408 This number may not be greater than the number of axes of the
409 inputdevice.
410 The integer_axisnumber in the none option is used to disable
411 this axis.
412
413 factor Float with a multiplicator for the axes
414 The factors of the all, allrot and allxyz options are indepen‐
415 dend of the factors of the single axes.
416
417 accel Float with a expotential accelerator for the axes
418
419 wheel The string "wheel" means this axis of the inputdevice will not
420 deliver zero if released
421
422 ignore Float with the value (relative to the maximal value from the
423 device) which will be ignored (insensitivity)
424
425 max_number_axes
426 Number of used axes, one of (2,3,4,5).
427 This must be equal or less to the physical available axes of a
428 device. Main usage of this option is to disable bad designed or
429 mechanical defect axes e.g. when you wish, this axis on a joy‐
430 stick would not exist
431
433 This options are only valid for the Ascension flock of birds magnetic
434 tracking system.
435
436 -baud baudrate
437 Baudrate of the serial line communicating with the transmitter.
438 According to the flock of bird manual, the following baudrates
439 are valid for serial line communication: 2400, 4800, 9600,
440 19200, 38400, 57600 and 115200.
441 Default: 38400
442
443 -numbirds numberbirds
444 Number of "data delivering" birds attached to the transmitter
445 (e.g. not counting the transmitter itself, if it is a Extended
446 Range Controller (ERC)).
447 Default: 2 (tracker and wand).
448
449 -master birdaddr
450 Adress of the master transmitter in the Fast Bird Bus (FBB
451 adress) as configured with the dipswitches on the transmitter
452 unit.
453 Default: 1
454
455 -masterIsErc
456 Used to differ between configurations, where the master is a ERC
457 (Extended Range Controller) or not. If the master is not a ERC,
458 the FBB adress is the same as the FBB adress of the tracker or
459 the wand.
460 Default: not set
461
462 -hemisphere FRONT_HEM|AFT_HEM|UPPER_HEM|LOWER_HEM|LEFT_HEM|RIGHT_HEM
463 Hemisphere used. Sit on the antenna block (with the legs near on
464 the side of the text) to see, what is left or right 8-)
465 Default: RIGHT_HEM
466
467 -sync 0|1
468 Synchronise (1) or not (0) data output to a CRT (Monitor) or
469 your host computer.
470 Synchronisation is used to elimiate magnetic effects of a Moni‐
471 tor using the CRT sync cable.
472 Default: 0
473
474 -block 0|1
475 Set (1) or do not set (0) the FNDELAY flag to the filedescriptor
476 of the serial port.
477 Default: 0
478
479
480 -filter AC_NARROW | AC_WIDE | DC_FILTER
481 Enable different filters. Read the Flock of Birds manuals for
482 more information.
483 This option can be repeated to use multiple filters.
484 Default: no filter set, using filter set by Flock autoconfigura‐
485 tion.
486
487 -suddenchangelock 0|1
488 Allow (0) or disallow (1) setting of messured position and ori‐
489 entation when a sudden large messurement occure.
490 Default: 1
491
492 -calfile calibrationfile
493 Use a VR Juggler style file to calibrate position messurement.
494
495 -ignoresize delta
496 Ignore position jumps from flock bigger than delta. This is
497 much like suddenchangelock, but pure software based.
498 Default: 0
499
501 -tessellation integer
502 Set the default tessellation of NURBS and superformula based
503 parametric shapes to integer.
504 The meaning of tessellation decide how many edges are generated
505 in one direction.
506 A low default tessellation result in faster rendering of related
507 shapes with tessellation set to 0 inside the white_dune applica‐
508 tion, but can give a reduced view, so details of a shape may be
509 hidden.
510 If no -tessellation option is used, the default tessellation is
511 32.
512
513 -indirect
514 Forces indirect OpenGL rendering, even when 3D hardware render‐
515 ing accelleration is available. In case of possible 3D hardware
516 rendering accelleration this option can drastically slow down
517 the program.
518 This option is most usefull on machines with problematic graphic
519 drivers or halfbaken 3D desktop features like compiz.
520
521 -nogllist
522 Forces OpenGL to render without glList commands.
523 The use of glList commands can increase the rendering speed of
524 static objects (without morphing) dramatically.
525 This option is only usefull on machines with errors in glList
526 commands or insufficent memory on the graphics card, so the use
527 of glList commands would uselessly fail.
528
529 -hidestandardtoolbar
530 Hide the standard toolbar. This option is usefull on machines
531 with small displays.
532
533 -uninstall
534 Output information (if available) on the commandline, how the
535 white_dune application can be uninstalled and exit.
536 Under Micro$oft Windows it additionally clears all information
537 activly set by white_dune (under HKEY_CURRENT_USER) in the Win‐
538 dows registry.
539
540 -checkSimpleCyclicSceneGraph
541 A cyclic scenegraph is caused by a node, which contains itself
542 (in form of a USE command of itself) in its scenegraph branch.
543 Cyclic scenegraphs are illegal in VRML97/X3D, tools reading such
544 a file may loop infinitely or eat up all the memory and then
545 crash. Nevertheless some tools (or people) tend to generate
546 such cyclic scenegraphs. White_dune is able to detect one depth
547 cyclic scenegraphs, but the detection can result in a perfor‐
548 mance problem when loading huge VRML97/X3D files. Therefore
549 white_dune do not check for cyclic scenegraphs by default. If
550 white_dune loops infinitely or crashes after a long time while
551 loading a VRML/X3D file, a cyclic scenegraph shoud be supposed
552 and this option should be used.
553
554 -scriptHeaderC header
555 It is possible to use Script nodes in C source export. The url
556 field in Script nodes ships code from computer languages. If one
557 string points to a file (e.g. a java class file), this file is
558 executed to process events. Beside that, it is also possible to
559 inline source code below a header. The default header for
560 inlined code for the C source export is "c:". The VRML/X3D
561 standard do not restrict the usage of various programming lan‐
562 guages in the Script node.
563 This option changes this header to avoid name clashes with other
564 tools using the default header in a different context.
565
566 -scriptHeaderC++ header
567 It is possible to use Script nodes in C++ source export. The url
568 field in Script nodes ships code from computer languages. If one
569 string points to a file (e.g. a java class file), this file is
570 executed to process events. Beside that, it is also possible to
571 inline source code below a header. The default header for
572 inlined code for the C++ source export is "c++:". The VRML/X3D
573 standard do not restrict the usage of various programming lan‐
574 guages in the Script node.
575 This option changes this header to avoid name clashes with other
576 tools using the default header in a different context.
577
578 -scriptHeaderJava header
579 It is possible to use Script nodes in java source export. The
580 url field in Script nodes ships code from computer languages. If
581 one string points to a file (e.g. a java class file), this file
582 is executed to process events. Beside that, it is also possible
583 to inline source code below a header. The default header for
584 inlined code for the java source export is "java:". The
585 VRML/X3D standard do not restrict the usage of various program‐
586 ming languages in the Script node.
587 This option changes this header to avoid name clashes with other
588 tools using the default header in a different context.
589
590 -psn_???
591 Only valid under MacOSX.
592 Options starting with the string "-psn_" are generated by the
593 Aqua desktop under on some versions of MacOSX and are silently
594 ignored.
595
596 -exitPid pid
597 Only valid under MacOSX.
598 Needed for the Aqua desktop of MacOSX to kill the whitedune
599 starter program on exit.
600
601 -fn font
602 Only valid under Linux/UNIX/MacOSX.
603 Set the unix font. Check for valid fonts with the xlsfonts(1)
604 command.
605
606 -demomode timeout
607 This options is intended for running the program as eyecatcher
608 eg. on a fair.
609 The animation of a scene (e.g. Viewpoint animation) is started.
610 In case of input from the mouse (mouseclick), keyboard or a 3D
611 inputdevice, the animation is stopped an the user can navigate
612 through the 3D world.
613 timeout seconds after the last input, the animation is starting
614 again.
615
616 -fullscreen
617 Starts dune in full screen mode
618
619 -filedialogdir directory
620 Change to a specific directory before opening a filedialog.
621
622 -proto category protofile
623 Adds the VRML PROTO in the file protofile to the list of avail‐
624 able PROTOs in the create => proto menu in the category submenu
625 and exit.
626
627 -renderslower
628 This option uses a slower render mode.
629
630 -readfromdownloads
631 This option let white_dune read from the download directory
632 instead of a internet URL,
633 Usefull when working offline after working online.
634
635 --version
636 Print out version information and exit.
637
638 --copyrightdetails
639 Print out detailed copyright informations and exit.
640
642 In the 3D view, dune support the following mouse / keyboard commands:
643
644 Mouse Button 1 click:
645 Select objects/3D handlers (e.g. arrows or white boxes) under
646 the cursor (or under the top of 3D cursor in stereoview)
647
648 Mouse Button 2 click:
649 Additionly select white box 3D handlers under the cursor (or
650 under the top of 3D cursor in stereoview)
651
652 Mouse Button 1 drag:
653 Drag objects/3D handles around
654
655 Mouse Button 3 drag:
656 Select multiple 3D handles
657
658 CTRL-Mouse Button 1 drag:
659 Virtual trackball navigation
660
661 SHIFT-Mouse Button 1 drag:
662 Forward/backward navigation
663
664 CTRL+SHIFT-Mouse Button 1 drag:
665 up/down/left/right navigation
666
667 ALT-Mouse Button 1 drag: (SGI style)
668 Virtual trackball navigation
669
670 ALT-Mouse Button 2 drag: (SGI style)
671 up/down/left/right navigation
672
673 ALT-Mouse Button 1+2 drag: (SGI style)
674 forward/backward navigation
675
676 Navigation icon pressed-Mouse Button 1 drag:
677 Virtual trackball navigation
678
679 Navigation icon pressed-Mouse Button 2 drag:
680 forward/backward navigation
681
682 Navigation icon-Mouse Button 1+2 drag:
683 up/down/left/right navigation
684
685 In the route view, dune support the following mouse / keyboard com‐
686 mands:
687
688 Mouse Button 1 click to event socket of a node and drag to a matching
689 event
690 socket:
691 create a ROUTE connection
692
693 Mouse Button 1 click to nothing and drag:
694 cut a ROUTE connection
695
696 Mouse Button 1 click to a node and drag:
697 move node in the route view
698
699 Mouse Button 1 click to a node, hold Mouse Button1, pressing Page
700 Up/Down key
701 move node in the route view by one page (works only on correct
702 motif/lesstif implementations)
703
704 Information about other keyboard usage can be found in the toolbar.
705
706 Tips how to use dune can be found in the docs directory of dune
707
709 The export to source code is a mainly a export of the information (num‐
710 bers and strings) of the VRML/X3D scenegraph tree.
711 White_dune do not export something like C source with OpenGL commands.
712 The exported code is independend of any rendering engine, but should be
713 usable with any 3D API.
714 Additional code is needed to render the scenegraph with a 3D API. Cur‐
715 rently white_dune comes with only two sets of such additinal code for
716 the Java Monkey Engine (JME) and C/C++ OpenGL. This code can be used
717 as a model for writing code for additional renderengines.
718 The information of the scenegraph is written into a class/struct with a
719 name concatinated from the string of the prefix argument (default
720 "X3d") and the string "SceneGraph". The scenegraph class/struct is
721 filled with references to the different VRML/X3D commands ("nodes").
722 The name of the type of such a node is concatinated from the string of
723 the prefix argument (default "X3d") and "Node". Each node type contains
724 the data of the VRML/X3D node in variables named in the same way as the
725 VRML/X3D fields.
726 The following table shows the mapping from the VRML/X3D field type to
727 the C, C++ and java datatypes:
728
729 │ │ │
730 VRML/X3D datatype │ C datatype │ C++ datatype │ java datatype
731 ───────────────────┼──────────────┼──────────────┼────────────────
732 SFBool │ short │ bool │ boolean
733 SFInt32 │ int │ int │ int
734 SFImage │ int* │ int* │ int[]
735 SFFloat │ float │ float │ float
736 SFVec2f │ float[2] │ float[2] │ float[2]
737 SFVec3f │ float[3] │ float[3] │ float[3]
738 SFVec4f │ float[4] │ float[4] │ float[4]
739 SFRotation │ float[4] │ float[4] │ float[4]
740 SFMatrix3f │ float[9] │ float[9] │ float[9]
741 SFMatrix4f │ float[16] │ float[16] │ float[16]
742 SFColor │ float[3] │ float[3] │ float[3]
743 SFColorRGBA │ float[4] │ float[4] │ float[4]
744 SFDouble │ double │ double │ double
745 SFVec3d │ double[3] │ double[3] │ double[3]
746 SFTime │ double │ double │ double
747 SFString │ const char* │ const char* │ String
748 SFNode (***) │ X3dNode* │ X3dNode* │ X3dNode
749 │ │ │
750 MFBool │ short* │ bool* │ boolean[]
751
752 MFInt32 │ int* │ int* │ int[]
753 MFFloat │ float* │ float* │ float[]
754 MFVec2f │ float* │ float* │ float[]
755 MFVec3f │ float* │ float* │ float[]
756 MFVec4f │ float* │ float* │ float[]
757 MFRotation │ float* │ float* │ float[]
758 MFMatrix3f │ float* │ float* │ float[]
759 MFMatrix4f │ float* │ float* │ float[]
760 MFColor │ float* │ float* │ float[]
761 MFColorRGBA │ float* │ float* │ float[]
762 MFDouble │ double* │ double* │ double[]
763 MFVec3d │ double* │ double* │ double[]
764 MFTime │ double* │ double* │ double[]
765 MFString │ const char** │ const char** │ String[]
766 MFNode (***) │ X3dNode** │ X3dNode** │ X3dNode[]
767 (***) The "X3d" part of the name is the default, it can be replaced by
768 the string of the prefix argument.
769 For any MF* type field (and a SFImage type field) the number of int,
770 float etc. values in the array is stored in a variable of the X3dNode
771 struct/class composed from "m_", the name of the field and "_length" in
772 case of a C/C++ export. Java do not need such a variable, cause the
773 length of a array is always available as the .length component of the
774 array.
775
776 The scenegraph is a tree of nodes. The root of the scenegraph is (simi‐
777 lar to the white_dune internals) a VRML/X3D Group node named "root".
778 In a Group node, the contained nodes are attached via a field named
779 "children" of type MFNode.
780 For example imagine the following VRML file:
781
782 #VRML V2.0 utf8
783
784 Group
785 {
786 children
787 [
788 Group
789 {
790 }
791 Group
792 {
793 }
794 DEF NAME_OF_FOGNODE Fog
795 {
796 color 1 0.50000000 1
797 }
798 ]
799 }
800
801 If no prefix argument is used, the first node in a VRML/X3D file is
802 represended in the exported C source as "root->children[0]" in the
803 "X3dSceneGraph" struct.
804 If the first node in the VRML/X3D file is also a Group node and contain
805 three other nodes, the third of this nodes is represended as
806 "root->children[0]->children[2]" in the "X3dSceneGraph" struct.
807 If the third of this nodes is a Fog node, the "color" field of the Fog
808 node is represended in the exported C source as "root->chil‐
809 dren[0]->children[2]->color" in the "X3dSceneGraph" struct.
810 The type of the "color" field of the Fog node is SFColor. The SFColor
811 type is represented as a array of 3 floating point values in the C
812 source, used to store the red, green and blue part of the color.
813 So the green part of the fog color is represended in the exported C
814 source as "root->children[0]->children[2]->color[1]" in the "X3dScene‐
815 Graph" struct.
816 A C++ export would also use "root->children[0]->children[2]->color[1]"
817 in the "X3dSceneGraph" class.
818 A java export would similarly use "root.children[0].chil‐
819 dren[2].color[1]" in the "X3dSceneGraph" class.
820
821 There is a second way to access the fields of the Fog node.
822 In VRML/X3D it is possible to name nodes with a "DEF" command. The
823 string behind the DEF command ("NAME_OF_FOGNODE" in the example) also
824 occures in the in the "X3dSceneGraph" struct and can be directly used
825 to access the matching VRML/X3D data.
826 So the green part of the fog color is represended in the exported C
827 source as "NAME_OF_FOGNODE->color[1]" in the "X3dSceneGraph" struct.
828 A C++ export would also use "NAME_OF_FOGNODE->color[1]" in the
829 "X3dSceneGraph" class.
830 A java export would use similarly "NAME_OF_FOGNODE.color[1]" in the
831 "X3dSceneGraph" class.
832 A problem can occure, if the string behind the DEF command is a
833 reserved keyword in the target language. For example, the 3D modeller
834 wings3d often uses the DEF name "default" when exporting VRML97 files.
835 In this case, the DEF name will be renamed (e.g. to "default1") and a
836 warning would be written to standard error during the export.
837
838 Beside the access of node data directly, there are also 2 sets of call‐
839 backs to handle the data of a whole scenegraph (or a branch of it): a
840 set of callbacks to render the content of the scenegraph branch ("*Ren‐
841 derCallback") and a additional set of callbacks for other tasks
842 ("*DoWithDataCallback").
843 There are also callbacks to replace the functions, which per default
844 alltogether traverse the Scenegraph ("*TreeRenderCallback" and "*Tree‐
845 DoWithDataCallback").
846 The callback mechanism and the scenegraph initialization differs from
847 programming language to programming language.
848
849 C:
850 The scenegraph (default argument "X3d" for prefix) can be declarated
851 with
852 struct X3dSceneGraph sceneGraph;
853 and initialized with
854 X3dSceneGraphInit(&sceneGraph);
855 A callback function for any X3D node type (like Fog, Text, IndexedFace‐
856 Set etc.) has the declaration
857 void mycallbackFunction(X3dNode *self, void *data)
858 To access the fields of the X3D node, you usually cast the X3dNode
859 pointer to a pointer to the type build from the string of the prefix
860 argument (default "X3d") and the name of the X3D node type you access
861 with this callback (e.g. X3dFog, X3dText, X3dIndexedFaceSet etc.).
862 X3dFog *node = (X3dFog *)self;
863 X3dText *node = (X3dText *)self;
864 X3dIndexedFaceSet *node = (X3dIndexedFaceSet *)self;
865 etc.
866 With this variable "node" the fields the X3D node can be accessed.
867 To install the callback, simply assign you function pointer to "call‐
868 backFunction" to a variable build from the string of the prefix argu‐
869 ment (default "X3d"), the the name of the X3D node and the string "Ren‐
870 derCallback" or "DoWithDataCallback". E.g.
871 X3dFogRenderCallback = mycallbackFunction;
872 X3dTextDoWithDataCallback = mycallbackFunction;
873 X3dIndexedFaceSetRenderCallback = mycallbackFunction;
874 To run the Render or DoWithData functions with the scenegraph tree,
875 just use
876 X3dGroupTreeDoWithData(&sceneGraph.root, NULL);
877 Instead of using NULL, other data can be passed to the "data" argument
878 of the callback functions.
879
880 C++:
881 The callback mechanism is very similar to the C mechanism.
882 The main difference is the storage of the callback functions. While the
883 callbackfunctions in C are stored in global space, the C++ callback‐
884 functions are stored in the static part of the matching node type.
885 Instead of using
886 X3dFogRenderCallback = mycallbackFunction; // C
887 a C++ program would use
888 X3dFog::renderCallback = mycallbackFunction; // C++
889 In C++ there is no need to call a initialization function for "scene‐
890 Graph". A constructor is called when the
891 X3dSceneGraph sceneGraph;
892 declaration is used.
893 To run the Render or DoWithData functions with the scenegraph tree
894 "sceneGraph.render(NULL);" or "sceneGraph.doWithData(NULL);" is used.
895 NULL can be replaced by other data, that will be passed to the "data"
896 argument of the callback function.
897
898 java:
899 The java callback mechanism is a bit different, it is based on inheri‐
900 tance.
901 The callback function is part of a class, that extends a matching
902 class:
903 class MyCallbackClass extends X3dFogRenderCallback {
904 public void render(X3dNode node) {
905 The new class is used in the following example:
906 MyCallbackClass myCallback = new MyCallbackClass();
907 X3dSceneGraph sceneGraph = new X3dSceneGraph();
908 X3dText.setX3dTextRenderCallback(myCallback);
909 sceneGraph.render();
910
911 With the the -manyclasses option, the last line changes to "X3dScene‐
912 Graph.render();". The access to a node with a DEF command in the
913 x3dv/vrml file changes also to a static variable in a similar way.
914
915 Finally there are additional callbacks ("*ProcessEventCallback") to
916 process events distributed by VRML/X3D ROUTE commands.
917 A example: a usual animation of a moving Sphere, is driven by a event
918 from a TimeSensor node. There is a ROUTE command to send the event into
919 a PositionInterpolator node, which calculate the matching translation
920 of the Sphere. There is also a ROUTE command to send the translation
921 event to a Transform node.
922 In the source code export, the inputOnly/outputOnly events are stored
923 as usual variables. The functions used for *ProcessEventCallbacks
924 should read the inputOnly event variables and write the outputOnly
925 event variables.
926 Similar to the sceneGraph. render() function, there is a sceneGraph.
927 X3dProcessEvent() function.
928 During the source code export, white_dune searches for the node (and
929 similar nodes) with output events, but no input event.
930 The exported code calls X3dProcessEvent() with this first node of a
931 ROUTE. This should generate data in the outputOnly event variables of
932 this first node of a ROUTE.
933 By following the ROUTE, the exported code copies the data from the out‐
934 putOnly event variable of the first node to the inputOnly event vari‐
935 able of the second node of a ROUTE.
936 The exported code calls X3dProcessEvents() with the second node of a
937 ROUTE to create data in the outputOnly event variable of the second
938 node.
939 By following the ROUTE, the exported code copies the data from the out‐
940 putOnly event variable of the second node to the inputOnly event vari‐
941 able of the third node of a ROUTE.
942 And so on.
943 At the end of the ROUTE chain, X3dProcessEvent() should process the
944 inputOnly event varibles of the last node in the ROUTE chain.
945 In a simple example, the following X3DV file is exported:
946
947 #X3D V3.0 utf8
948 PROFILE Interchange
949
950 DEF Transform1 Transform {
951 children
952 Shape {
953 appearance Appearance {
954 material Material {
955 }
956 }
957 geometry Box {
958 }
959 }
960 }
961
962 DEF TimeSensor1 TimeSensor {
963 cycleInterval 5
964 loop TRUE
965 }
966
967 DEF PositionInterpolator1 PositionInterpolator {
968 key [
969 0
970 1
971 ]
972 keyValue [
973 0 0 0
974 1 0 0
975 ]
976 }
977
978 ROUTE TimeSensor1.fraction_changed TO PositionInterpolator1.set_fraction
979 ROUTE PositionInterpolator1.value_changed TO Transform1.set_translation
980
981 The most simple code, that could be used to implement this (exactly
982 this) PositionInterpolator would be in C (with prefix "X3d"):
983
984 int PositionInterpolatorCallback(X3dNode *node, const char *eventName,
985 void* extraData)
986 {
987 struct X3dPositionInterpolator *data = (struct X3dPositionInterpolator*)node;
988 data->value_changed[0] = data->set_fraction;
989 data->value_changed[0] = 0;
990 data->value_changed[0] = 0;
991 return 1;
992 }
993
994 Just like the Render callback functions, the callback is used with
995 X3dPositionInterpolatorProcessEventCallback = PositionInterpolatorCall‐
996 back;
997 The matching code in C++ is rather similar
998
999 bool PositionInterpolatorCallback(X3dNode *node, const char *eventName,
1000 void* extraData)
1001 {
1002 X3dPositionInterpolator *data = (X3dPositionInterpolator*)node;
1003 data->value_changed[0] = data->set_fraction;
1004 data->value_changed[0] = 0;
1005 data->value_changed[0] = 0;
1006 return true;
1007 }
1008
1009 The callback is used with
1010 X3dPositionInterpolator::processEventCallback = PositionInterpolator‐
1011 Callback;
1012 The matching code in java uses inheritance
1013
1014 class PositionInterpolatorCallback extends X3dPositionInterpolatorProcessEventCallback {
1015 public boolean processEvent(X3dNode node, String eventName) {
1016 X3dPositionInterpolator data = (X3dPositionInterpolator)node;
1017 data->value_changed[0] = data->set_fraction;
1018 data->value_changed[0] = 0;
1019 data->value_changed[0] = 0;
1020 return true;
1021 }
1022 }
1023
1024 The callback is used with
1025
1026 PositionInterpolatorCallback callback = new PositionInterpolatorCallback();
1027 X3dPositionInterpolator.setX3dPositionInterpolatorProcessEventCallback(callback);
1028
1029 The return value of the ProcessEventCallbacks (1/0 for C, true/false
1030 for C++/java) tells the event distributing system (VRML/X3D ROUTE com‐
1031 mands) if there is a generated event that needs to be distributed to
1032 the next VRML/X3D node or not.
1033
1034 It is possible to use a VRML/X3D Script node to process data in C, C++
1035 or java.
1036 Similar to inlined javascript/ecmascript code, the "url" field of a
1037 Script node contains strings with a header.
1038 The syntax of the code in C/C++/java is very similar to the code in a
1039 ProcessEvent callback. The only difference is the node name (Position‐
1040 Interpolator in the callbacks above). Each Script node in a VRML/X3D
1041 file has another set of events and fields. A Script node is useless
1042 without a DEF name, therefore the node name is replaced by the concate‐
1043 nation of the String "Script_" and the DEF name of the Script node.
1044
1045 If no -scriptHeaderC/-scriptHeaderC++/-scriptHeaderJava option is used,
1046 the Script node that replaces the PositionInterpolator in the examples
1047 above would be:
1048
1049 DEF Script1 Script {
1050 eventIn SFFloat float1_in
1051 eventOut SFVec3f vec3f1_out
1052 url [
1053 "javascript:
1054 // eventOut SFVec3f vec3f1_out //
1055 function float1_in(value) {
1056 // value SFFloat
1057 vec3f1_out = new SFVec3f(value, 0, 0);
1058 }
1059 "
1060
1061 "c:
1062 struct X3dScript_Script1 *self = node;
1063 self->vec3f1_out[0] = self->float1_in;
1064 self->vec3f1_out[1] = 0;
1065 self->vec3f1_out[2] = 0;
1066 "
1067
1068 "c++:
1069 X3dScript_Script1 *self = (X3dScript_Script1 *)node;
1070 self->vec3f1_out[0] = self->float1_in;
1071 self->vec3f1_out[1] = 0;
1072 self->vec3f1_out[2] = 0;
1073 "
1074
1075 "java:
1076 X3dScript_Script1 script = (X3dScript_Script1)node;
1077 script.vec3f1_out[0] = script.float1_in;
1078 script.vec3f1_out[1] = 0;
1079 script.vec3f1_out[2] = 0;
1080 "
1081 ]
1082 }
1083
1084 When you use a Script node in the Wonderland module export and the java
1085 code needs a extra "import" statement, create a special WonderlandIm‐
1086 portJava export data container node and add the import statement to the
1087 "code" field.
1088
1089 See the directories docs/export_example_c, docs/export_example_c++ and
1090 docs/export_example_java of the white_dune source archive for examples.
1091
1093 dune -nostereo
1094 start dune this way, if you have a stereo capable visual, but no
1095 shutterglases or other quadbuffer based technology.
1096
1097 dune -xinput magellan -allxyz=10,100,,0.0000002 -xinput dialbox-1 -x=0
1098 -y=2 -z=4 -xrot=1 -yrot=3 -zrot=5 -all=1000,,wheel
1099 starts dune with a magellan xinputdevice with factor 10, accel‐
1100 eration 100 and a ignore value of 0.0000002 on the xyz axes and
1101 a dialbox device with
1102 x axis = 0. axis
1103 y axis = 2. axis
1104 z axis = 4. axis
1105 rotation around x axis = 1. axis
1106 rotation around y axis = 3. axis
1107 rotation around y axis = 5. axis
1108 all axes use factor 1000 and all to not deliver zero if released
1109
1110 dune -joystick /dev/input/js0 -z=,3 -axes=3
1111 starts dune with a linux joystick, set acceleration of the z
1112 axis to 3 and disables the 4. (5., 6., ...) axis.
1113
1114 dune -xinput magellan -z=3 -xrot=2 -none=2
1115 starts dune with a xinput/magellan device, swapping axis number
1116 2 and axis number 3, with axis number 2 disabled.
1117
1118 dune -nxtdials
1119 starts dune with a mindstorms nxt usb device, all axes are auto‐
1120 matic handled as wheels.
1121
1122 dune -aflock /dev/ttyS1 -numbirds 2 -master 1 -wand 2 -tracker 3
1123 starts dune with a Ascension Flock of Birds. Master transmitter
1124 (a Extended Range Controller (ERC)) at FBB adress 1 is connected
1125 to the serial device /dev/ttyS1, use 2 Birds, one attached to a
1126 "3D Mouse" device at FBB adress 2 and one attached to a head
1127 tracking device at FBB adress 3.
1128
1129 dune -wonderland wonderland/modules -manyclasses Test.x3dv
1130 Exports the content of Test.x3dv as java source for wonderland
1131 0.5 to the directory wonderland/modules/exportX3dv/test.
1132 To compile the java source to a wonderland module wonder‐
1133 land/modules/exportX3dv/test/dist/test.jar change to the direc‐
1134 tory wonderland/modules/exportX3dv/test and use "ant" or "ant
1135 deploy".
1136
1138 $HOME/.dunerc
1139 default file to load/store settings
1140 (see DUNERC environment variable for more information)
1141
1142 $HOME/.dune_crash_*_*.wrl
1143 stores the vrml file in case of a crash
1144
1146 DUNERC filename to load/store details of dunes screen layout and
1147 settings of the "options" menupoint.
1148 If this filename is not writable, settings are only loaded, not
1149 stored.
1150 If DUNERC is not set, the file $HOME/.dunerc is used under
1151 Linux/UNIX/MacOSX or the registry under Micro$oft Windows.
1152
1153 DUNEDOCS path to documentation directory
1154
1155 LANG the first two characters of then environment variable LANG
1156 are compared to the ISO 3166 country shortcut of the supported
1157 languages. For example, if LANG is set to de_DE, german menu,
1158 dialogs and errormessages are used.
1159
1161 Dune, graphical vrml97 editor and animation tool
1162 Copyright (C) 2000-2002 Stephen F. White and others
1163 This program is free software; you can redistribute it
1164 and/or modify it under the terms of the
1165 GNU General Public License
1166 as published by the Free Software Foundation; either
1167 version 2 of the License, or (at your option) any later
1168 version.
1169
1171 Dune need valid vrml97/x3dv code to work, it can not load a invalid
1172 VRML97/X3DV file.
1173 White_dune can load XML encoded X3D files via a translator.
1174 Use the menupoint Options -> Input Settings... to configure a X3D/XML
1175 to X3DV translator.
1176 dune is software in development, it is not 100% free of bugs.
1177 Unsucessful crashes should be rare, lucky crashes allow to get back the
1178 data. (see "EXIT STATUS").
1179 Currently not all VRML97/X3D nodes are displayed (e.g. MovieTexture,
1180 NurbsSweptSurface or NurbsSwungSurface) or displayed correctly (e.g.
1181 Text or Viewpoint).
1182
1184 Exit status is 0 for sucessfull operation.
1185 Exit status is 1 if inputfile can not be sucessfully read or other ini‐
1186 tialisation error.
1187 Exit status is 2 in case of a X11 server crash.
1188 Exit status is 11 in case of a X11 initialisation error.
1189 Exit status is 97 in case one of the inputfiles is a VRML 1 file (the
1190 VRML 1 format is not supported).
1191 In case of a coredump/crash, the exit status can be undefined.
1192
1194 In case of a crash (e.g. X11 server crash or signal (coredump) in case
1195 of a internal error), dune tries to write it's contence to the file
1196 $HOME/.dune_crash_*_*.wrl. This works in most cases, but not if the
1197 internal data structure has been destroyed. When white_dune is
1198 restarted, the filename is shown in the "recent files" part of the pro‐
1199 gram menu.
1200 Intermediate files .dune* files (e.g. for preview) are only deleted
1201 when white_dune exits normally. In case of a crash, this files remain.
1202
1204 illegal2vrml(1), javac(1), java(1), Xvfb(1), xterm(1), FreeWRL(1), cos‐
1205 moplayer(1), cosmoworlds(1),
1206
1207 ISO/IEC 14772 ⟨URL: http://www.web3d.org/x3d/specifications/vrml/ ⟩
1208
1209 ISO/IEC 19776-2 ⟨URL: http://www.web3d.org/specifications/ ⟩
1210
1212 Stephen F. White and others
1213 See README file for details
1214
1215
1216
1217white_dune 0.99rc766 2017-09-20 dune(1)