Additional topics

In this chapter we mainly considered representing and drawing 3D objects using openFrameworks. For further learning, we suggest studying the following topics:

  • Working with the ofLight class to control lights, that is, the type of light (spot light and point light), its position, light direction, and color parameters. See openFrameworks examples examples/3d/normalsExample and examples/3d/advanced3dExample.
  • Working with the ofCamera and ofEasyCam classes to control the camera, that is, the position of the observer of the 3D scene. The camera lets you move easily through the virtual 3D world and also change perspective parameters. See openFrameworks examples examples/3d/cameraRibbonExample and examples/3d/easyCamExample.
  • Using 3D model files with the .3ds and .dae extensions. You can load and draw such files as static or animated objects. Note that you can use 3D file models as a source of vertex data for further manipulation and processing. See openFrameworks examples examples/3d/modelNoiseExample, examples/addons/3DModelLoaderExample, and examples/addons/assimpExample.
  • Rendering volumetric data using the marching cubes algorithm. This technique allows rendering isolines of an arbitrary function defined in some volume. It opens the possibility of drawing complex surfaces with constantly changing shape and number of connected components, such as metaballs. To use this algorithm, download and install the ofxMarchingCubes addon from ofxaddons.com and see its example. For more details on installing addons see Appendix A, Working with Addons.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset