» Home
» Tutorials
» Documentation
» Screenshots
» Download
» Contact Us

Tutorials

To get you started we have created a few tutorial that takes you through the process of creating simulations using C3D.

Tip: To edit lua files, there is an editor freely available, Crimson Editor which can to syntax highlighting of lua files.

Environment variables

There are a few important environment variables that you should remember:

OSG_FILE_PATH - A semicolon separated list where openscenegraph will search for models and textures

C3D_FILE_PATH - A semicolon separated list where Colosseum3D will sarch for .osv files, lua scripts and sounds.

 

Also have a look at the "demos" in the Colosseum3D/data/osgVortex/scripts directory. They are more of test scripts of the features available in Colosseum3D. But they can be a source of inspiration.

Here is a short description of some of them:

Filename Description
ballsocket.osv Creates a "chain" of spheres with ballsocket joint between each sphere
bluescreen.osv Positions the camera, create a hinge that rotates a container with some spheres

browse_models.osv/
browse_models.lua

Uses lua to read in all files matching *.osg in current directory. User can select which one to look at using arrow up/down
car.osv Very simple "car" with two hinges.
composite.osv Composite object.
example3.osv Many object (spheres, boxes) falling
example4.osv Spheres falling down a stair. Skybox.
fast.osv Box filled with fast moving spheres. Illustrates soundcontact (sound played at contact)
hemispheric.osv A simple hemispheric GL2 shader applied to two Stanford bunnies.
hinge.osv A "barn" door, with two hinges.
hinge_sound.osv Same as hinge.osv with ambient sound played as .ogg file.
kinematic.osv/kinematic.lua Kinematic object controlled by keyboard.
linear1.osv Constraint that keep two objects at the same plane.
linear2.osv  
luaartefact_visitor.osv/
luaartefact_visitor.lua
Shows the use of artefact visitor that can be used to access joints or objects in the world.
luacollisioneventhandler.osv/
luacollisioneventhandler.lua
Shows the use of collisionevent handlers.
luadrawable.osv/luadrawable.lua Shows how to use OpenGL calls directly from Lua.
luaevent1.osv/luaevent1.lua Shows the use of events
luaexample1.osv/luaexample1.lua Demonstrates the use of lua for loading files, building the scenegraph, and using interactors for doing animations.
luaexample2.osv/luaexample2.lua Demonstrates the creation of Joints from lua, keyboard control of joints.
luaexample3.osv/luaexample3.lua Demonstrates the use of lua to access material attributes. Transparency is animated.
luaguiexample1.osv/luaguiexample1.lua Extremely small example of using the fltk gui.
luainteractor.osv/luainteractor.lua Shows the use of interactors for accessing mouse and keyboard events.
luamatrixmanipulator.osv/
luamatrixmanipulator.lua
Show how to control the camera transformation.

luamouseinteractor.osv/
luamouseinteractor.lua

Shows how one can pick objects in the scene using the mouse.
luaparticle.osv/luaparticle.lua Start a fire with 'b' button
luaproperty_collision.osv/
luaproperty_collision.lua
Shows how properties can be used to filter out collision handlers.
luashader1.osv/luashader1.lua Shows how to use OpenGL2 shaders.
luasine.osv/luasine.lua Shows how to use lua to create and position particle systems.
luatexture.osv/luatexture.lua Shows how to load images and animate textures.
maxvelocity.osv
Sets a maxvelocity on an object.
mesh-sensor.osv Shows how to create mesh objects and sensor objects.
relposrelori.osv/relposrelori.lua Shows how to use an RPRO joint to attach one object to another one with a rigid joint.
sound_occlusion.osv Demonstrates how to use sound with simple ray occlusion.
sound_contact.osv/sound_contact.lua Demonstrates how to create sound at contact between objects.
spring.osv, spring2.osv, spring3.osv Demonstrates how to use spring joints.
testcollisionpair.osv Shows how to turn off collision between two named objects.
triplecontact.osv/triplecontact.lua A simple demo that demonstrates the use of collision eventhandlers.
tutorial*.osv, tutorial*.lua Part of the tutorial.