- 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.
naming: ia_[type]_[id], where [id] is a twodigit number e.g. (00, 23...) and [type] is one of the following possible types:
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 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.
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).
The exporter dialog should look somewhat like that:
In the Authoring Environment choose "Generate VIS".
Search and choose the .osg file you just created.
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
After saving the .vis file the new visualization is available in 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.
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.
- 14 Feb 2006