Scene modeling

  • use the file emptyScene1-1.max as a starting point (1-1 means that at the moment you need to model in absolute measurement -> one meter on the screen is one meter in the modeler, while we assume a screen that is two meters wide. Scaling the model down with the presets afterwards will be available in a later version, currently that does not work.)

  • the file has to be exported as an .osg with this Exporter
  • After exporting it you need to generate a .vis file. This has to be done every time you make a change in structure or naming of the model (not e.g. in color, size, position...)

  • Axis: if there is a predefined axis (all rigid bodies that are not only decoration etc. need an axis):
Model it as a cylinder, just for intuition. The axis (name=axis_[nameOfTheBody] is parent element of a rigid body. Origin is fixpoint, z axis of the cylinder defines the direction. Attach everything else to that axis in the schema (GraphEditors -> Schematic View). If you want to group something in that way, that it is atomic, you must convert it into a singular mesh.

  • Interactive Elements:
naming: ia_[type]_[id], where [id] is a twodigit number e.g. (00, 23...) and [type] is one of the following possible types:

dr(agger), ve(ctor input), bu(tton), sw(itch), sl(ider)

attaching a vector input to particle has the effect, that the particle will listen to it and the force you generate as a vector will be transmitted to that particle. A dragger will drag around the particle it is attached to. A dragger needs to be an attached to a particle or the behaviour is undetermined! Buttons, Switches and Sliders must be parameterized in the Authoring Environment. Sliders have to be upright or they won't work!

They only have to be placed and named so that the origin will be visible. Will be replaced by default interactable geometry. Just copy the predefined dummies and increment the id-number. Delete those from the scene, that you dont use.

  • No object must be named "Scene Root"
  • No object must be named "PatchNode"
  • The pivot will be registered as center of mass
  • Particles must be named xxx_[name] where xxx is a percent value of the overall mass. 000 means negligible mass.
  • Dont use GroupNodes in scenes, always model with schematic view
  • No name must end on "p" or "P"
  • No two elements must have the same name, names are unique identifiers
  • Dont modify the pivot of an interactable
  • Model the particles as discreet cylinders of uniform size
  • If the body is axis symetric, you can use the "skin" to "fill up" the rest of the weight difference if some is left (e.g the sum of the weight of the particles yields 90, set a 010 in front of the skin's name for a body with 100% mass).
  • Make sure that every thing that should be in the environment is placed within a cube, where the "table" would be the bottom side or it might be out of the screen.


Model your scene in a 3D modeler:

model scene in 3d modeler

Model all relations in the Schematic view (Graph Editors -> New Schematic View/Saved Schematic View). You determine that way what is attached to what. For example the cylinders are all attached to rods and those are attached to the axis, so if we move the axis, all the other objects will move with it.

set relations in the schema

After everything is properly arranged and named, export the scene as .osg. For that choose File -> Export and as file type OpenSceneGraph Exporter (.OSG/.IVE). You need to specify .osg at the end of the filename or the exporter will save the file as .ive. Save it in a directory within the main folder (e.g. geometry).

export as .osg

The exporter dialog should look somewhat like that:

osgExp - the exporter you should use

In the Authoring Environment choose "Generate VIS".

Choose Generate VIS in the file menu

Search and choose the .osg file you just created.

search for the .osg file

If the model is properly formated, the next screen will ask you to save the new .vis file. Otherwise you will see an error message and a description of the problem will be saved next to your model named [modelfilename].log

save in th visualizations folder

After saving the .vis file the new visualization is available in the drop down menu.

choose the visualization from the drop down menu

Choose it and press "Start" in the visualization section to insert it into your script. Then doubleclick it to change its settings.

Press Start - the new visu appears in the script

Interactables modeling

You can redefine all the geometries or interactables (except slider and vector controller in this version). For that you just model it, export it as .osg and place it in the ./resources/interactables/ folder named dragger.osg, button.osg etc. in the same folder you will find .dat files where you can make presets like rotation, translation and scaling. Every interactable model needs one particle that serves as pivot for all others, so the schematic view has to look something like this:

The green box stands for a grouping of the three objects. The trick is, that the topmost element should not be transformed in any way, as it defines the basic attributes of the interactable. The sphere in a non transformed form would be ok as well. As the top most element also defines the pivot point, a sphere is suited better than for example a cylinder for the job.

-- LEMMA - 14 Feb 2006
Topic revision: r5 - 16 May 2007, RainerFink
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Medieninformatik-Wiki? Send feedback