RHTgrCamera

Multibeam echosounder at 200kHz

Multibeam sonar at 200kHz "illuminating" a layer of krill (upper) and a fish school (lower). Color represents the amount of sound the organism reflects back to the sonar head.

With the RHTgrCamera object you no longer need to move your models into your view. Position your models in your world, place and point the camera, and draw. Want to view your objects from a different perspective? Move the camera and draw. Fly over or through? Move. Draw. Move. Draw...

RHTgrCamera works as a replacement to IDLgrView providing intuitive control of object graphics scene composition. The RHTgrCamera object is a subclass of IDLgrView and works by creating a transformation matrix based on its location and orientation and applying that transformation to the models contained within the camera, transforming the models from world space to view (eye) space. RHTgrCamera further simplifies view setup by abstracting away a few of the obtuse properties of IDLgrView.

RHTgrCamera optionally implements view frustum culling allowing you to make better use of your rendering resources. Unless a graphics atom's HIDE property is set, IDL passes that atom's vertex, connectivity, normal, and texture data to OpenGL for rendering even if that atom will never be seen. For simple objects the impact is negligible but for complex objects a considerable amount of time is wasted processing data that is ultimately discarded. View frustum culling works by determining which objects fall outside the viewing frustum and removing those objects from the rendering process on the IDL side by setting their HIDE property.

Unfortunately view frustum culling isn't free and it doesn't come without its restrictions. That being said, with proper implementation large gains in rendering performance can be made. A simple performance profile and hints on optimizing your object graphics scene hierarchy for use with view frustum calling can be found here.

Documentation

RHTgrCamera Reference

Download

RHTgrCamera consists of an IDL object RHTgrCamera__define and a DLM RHTgrCamera.dlm. I am trying to provide compiled DLM's for the more common platforms but currently only have access to win32 and Solaris machines. I will add downloads of compiled DLM's for other platforms as others provide them. RHTgrCamera is developed and tested on IDL 5.5-6.0.

RHTgrCamera is dependent upon the RHTgrQuaterion and RHTgrAABB objects. These objects are included in the packages below. The packages also contain the demo programs and documentation.

rhtgrcamera_win32.zip
rhtgrcamera_sunOS_32.tar.gz
rhtgrcamera_source.zip

Demo Programs

The following demo programs are included in the packages above.

camdemo_basic.pro

This program shows how to configure a basic view using RHTgrCamera. Camdemo_basic.pro is included in the RHTgrCamera package. You can download this program individually below.

camdemo_basic.pro

camdemo_pan.pro

This program provides a basic example of using the Pan method of RHTgrCamera. This example also introduces the "Heads up Display" view which can be used to hold atoms you do not want transformed by the camera such as text labels and legends. Camdemo_pan.pro is included in the RHTgrCamera package. You can download this program individually below.

camdemo_pan.pro

camdemo_lookat.pro

This program provides a basic example of using the Lookat method of RHTgrCamera. In this program the camera tracks individual orbs as it "orbits" a collection of orbs. Camdemo_lookat.pro is included in the RHTgrCamera package. You can download this program individually below.

camdemo_lookat.pro

camdemo_examine.pro

This program shows how to use the THIRD_PERSON keyword to get a trackball like effect to examine an object in a scene. Camdemo_examine.pro is included in the RHTgrCamera package. You can download this program individually below.

camdemo_examine.pro

camdemo_cullnfly.pro

This program demonstrates the use of view frustum culling, pixel aspect ratio locking, zooming, and navigating 3-space using the Truck and Pan methods. This demo requires a very capable computer, IDL 5.6+ and my modified orb__define.pro object. Camdemo_cullnfly.pro is included in the RHTgrCamera package. You can download this program individually below.

camdemo_cullnfly.pro

A version of this program is also available which uses my Win32 only DirectInput DLM providing better input handling and compatibility with pre 5.6 versions of IDL (Windows only, of course). More information can be found on the directInput.dlm page.

Old Code

camera__define.pro is an older version of my camera object. It is not as refined as RHTgrCamera and lacks many of the features of it's sibling, but it only has one dependency and doesn't require any .dlms.

camera__define.pro is dependent upon RHTgrQuaterion. The file below is complete with the dependent object, documentation and some old demo code.

camera__define.zip

IDL @ the FAR Lab

IDL Code

RHTgrCamera

RHTgrAABB

RHTgrQuaternion

directInput.dlm

Miscellaneous

Using jEdit with IDL

CODEC Comparison

IDL Links

About