VR JuggLua: A Framework for VR Applications Combining Lua, OpenSceneGraph, and VR Juggler

Ryan Pavlik
Virtual Reality Applications Center
Iowa State University
Ames, Iowa 50011-2160

Judy M. Vance
Ph.D.
Fellow ASME
Department of Mechanical Engineering
Virtual Reality Applications Center
Iowa State University
Ames, Iowa 50011-2160

R.A. Pavlik and J.M. Vance, “VR JuggLua: A Framework for VR Applications Combining Lua, OpenSceneGraph, and VR Juggler,” Workshop on Software Engineering and Architectures for Realtime Interactive Systems (SEARIS) in IEEE Virtual Reality, Singapore: 2011.

Abstract

A gap exists between virtual reality (VR) software platforms designed for optimum hardware abstraction and cluster support, and those designed for efficient content authoring and exploration of interaction techniques through prototyping. This paper describes VR JuggLua, a high-level virtual reality application framework based on combining Lua, a dynamic, interpreted language designed for embedding and extension, with VR Juggler and OpenSceneGraph. This work allows fully-featured immersive applications to be written entirely in Lua, and also supports the embedding of the Lua engine in C++ applications. Like native C++ VR Juggler applications, VR JuggLua-based applications run successfully on systems ranging from a single desktop machine to a 49-node cluster. The osgLua introspection-based bindings facilitate scenegraph manipulation from Lua code, while bindings created using the Luabind template meta-programming library connect VR Juggler functionality. A thread-safe run buffer allows new Lua code to be passed to the interpreter during run time, supporting interactive creation of scene-graph structures. It has been successfully used in an immersive application implementing two different navigation techniques entirely in Lua and a physically-based virtual assembly simulation where C++ code handles physics computations and Lua code handles all display and configuration.

Links