ChronoEngine:Unit Irrlicht

From ChronoWiki

Jump to: navigation, search

unit_IRRLICHT

Status:

Stable

Build depends:

Chrono::Engine
Irrlicht SDK

Run depends:

Chrono::Engine
Irrlicht library

Main developers:

Alessandro Tasora
Hammad Mazhar

This is the default visualization system for interactive 3D viewing of Chrono::Engine simulations.

If you develop your custom application based on Chrono::Engine, you may use other visualization systems (ex. Ogre3D, CryEngine, plain OpenGL or others) and you do not need this unit, however this IRRLICHT unit is used here in most demos and tutorials because it is lightweight and simple.

Read the introduction to units for a technical background on the modularity of the Chrono::Engine project.

Features

The IRRLICHT unit is used to show Chrono::Engine tutorials and demos in an interactive 3D OpenGL view.

Here are the main features:

  • Irrlicht shapes and textures can be added as 'assets' to ChBody objects.
  • A default lightweight application framework is provided (ChIrrApp) that can be used for default light/camera managements.
  • The Irrlicht view of the default application supports some mouse and key interaction:
    • mouse left button for camera rotation
    • mouse right button for camera x z motion
    • mouse wheel rotation for camera forward/backward
    • mouse wheel button to pick & drag objects (only if they have a collision shape!)
    • press 'i' to see a setting panel,
    • press arrows to have x z camera motion, press page up & down for y vertical motion
    • press spacebar to stop simulation
    • press 'p' to advance one timestep a time.
  • There are some easy functions to draw grids, lines, springs, plots.

Requirements

  • To run applications based on this unit, you need the Irrlicht library (ie. the Irrlicht.dll library on Windows)
  • To build applications based on this unit you must have the Irrlicht SDK installed.


Building instructions

The new release v.1.8 of Irrlicht is not supported because the support of soft shadows via Xeffects is broken. Until we wait for a fix to this issue, we urge you to download and install only the previous Irrlicht release v.1.7.3

  • Repeat the instructions for the full installation, but when you see the CMake window, you must add the following steps:
  • Set the ENABLE_UNIT_IRRLICHT as 'on', then press 'Configure' (to refresh the variable list)
  • Set the CH_IRRLICHTDIR variable to the directory where you installed Irrlicht, ex.

C:/engine_demos/irrlicht-1.7.3

  • Set the CH_IRRLICHTLIB variable to the Irrlicht library, ex.

C:/engine_demos/irrlicht-1.7.3/lib/Win32-visualstudio/Irrlicht.lib (note, if you run a 64 bit version of Chrono::Engine, you must build and link the Win64-visualstudio Irrlicht library).

  • Press 'Configure' again, then 'Generate', and proceed as usual in the installation instructions.


Differently from all other units, the unit_IRRLICHT does not create a .dll after compilation. All its API is based on .h headers. So it enters into play only if a program includes these headers, as in the tutorials.


Look at the C++ source of irrlicht-based demos (in chronoengine/source/demos/irrlicht/ ) to learn how to use the functions of this unit.

For example, look at the demo_irrassets tutorial.

Personal tools