MVisio: a multi-device 2D/3D graphic engine for PDAs, PCs and CAVEs Achille Peternier, Ph. D....

Preview:

Citation preview

MVisio: a multi-device 2D/3D graphic engine for PDAs, PCs and CAVEs

Achille Peternier, Ph. D. Student

VRLab, EPFL, Switzerland

3D Mental Vision

Plan

• Foreword…

• Goals of the Mental Vision project

• MVisio Graphic Engine

Foreword…

• Mental Vision is a long term on-going project: these are the first results

• MVisio is a graphic engine and it is a part of the Mental Vision project

• Let me introduce this project goals with an example…

Foreword…

“You enter a toy-store, looking for the new version of your favorite videogame. You find the game, you turn the box to read what the content should look like and what you find is…”

Foreword…

“DirectX 10 compatible! 4 GB of textures! 10 km x 10 km environment! 1kk of triangles per frame! Real-time this, pixel shader that, etc…”

Ok, but… what about the game??

Foreword…

• It’s like finding on the back of a book, instead of the summary or the author’s biography, something like:– 1.321.324 words!– 24 chapters!– Made with recycled papers!– 400 pages!– 53 occurrences of the word “occlusion”!

Ok… But, what about the content??

Foreword…• Back to CG: today, in most of cases, users have to follow the rule:

– I have this hardware configuration -> I can access this 3D content (games, VE, …)

– I don’t have this hardware configuration -> I can’t access this content

• Making a 3D content so strictly depending on a specific technology limits the fruition and the freedom of the content itself:– Reduces the potential application scenarios of your content– Reduces the number of potential users

• Briefly, binding content with technology so tightly that they can only be used on an extremely specific hardware configuration or device creates monsters…

Foreword…

ContentContent

TechnologyTechnology

Goals

Goals (long term overview)

• This project aims to let authors (artists and programmers) to create virtual contents in a way less closed and limited to a specific hardware configuration or device

• The Mental Vision will let you define an abstract virtual content and the technology itself will adapt it for you, in order to fit the device and context you actually want to use to access it

Goals

Virtual content

Mental VisionMental Vision

3D models3D modelsTexturesTextures

Semantic descriptors

Semantic descriptors

PhysicsPhysics

AudioAudioShadersShaders

MVisio Graphic Engine

MVisio graphic engine• The first available element of this project is a

graphic engine• MVisio (Mental Vision) is a lightweight, robust

and user-friendly graphic engine developed originally for pedagogical purposes in our laboratory

• MVisio brings high-quality real-time 3D graphics on heterogeneous devices (PDAs, PCs and CAVEs)

• The user doesn’t have to modify his/her code: MVisio exposes an unified and common interface

MVisio graphic engine

• MVisio reduces the lines of code to write to obtain results and the complexity of the code itself, by automatically optimizing the models and the scene-graph, managing the resources, auto-tuning the performances, etc.– Extremely useful when you want to create cross-

device applications• MVisio simplify the import of 3D content through

a powerful plugin for 3D Studio Max: with just one button click, the whole content displayed in 3D Studio Max is exported to a file directly loaded by MVisio (“wysiwyg-like”)

MVisio graphic engine3D Studio Max

MVisio application

Our exporter

.MVE

(MVisio Entity file format)

MVisio graphic engine

• Technically spoken, MVisio is:– Built in C++ on the top of OpenGL, OpenGL|

ES and SDL (Simple DirectMedia Library) to handle context initialization and keyboard/joystick/mouse events

– Just a 250 KB DLL– Capable to display a complex textured scene

with dynamic lighting and shadows in just 7 lines of code

MVisio graphic engine#include <mvisio.h>

#pragma comment(lib, "mvisio.lib")

#pragma comment(lib, "sdl.lib")

#pragma comment(lib, "sdlmain.lib")

int main(int argc, char *argv[])

{

MVISIO::init(NULL);

MVNODE *bar = MVISIO::load("bar.mve");

MVISIO::clear(true, true, true);

MVISIO::begin3D(NULL);

bar->pass();

MVISIO::end3D();

MVISIO::swap();

_sleep(5000);

MVISIO::free();

return 0;

}

Initialize MVisio (NULL means auto-setup)

Load the scene exported from 3D Studio MAX

Clear buffers, start a 3D rendering, tell MVisio to render the bar entity, execute the rendering, swap back to front bufferFree resources

MVisio Graphic Engine• MVisio is a modern 2D/3D graphic engine featuring:

– Extremely user-friendly API, based on an C++ class-oriented architecture – Multi-device rendering on PC, PDA and CAVE, without changing the source code – Full OpenGL and OpenGL|ES support – Dynamic scene graph management – Dynamic lighting and real-time shadows – Vertex and pixel shaders – Skinning and animations – Particle emitters – Terrain engine – Loading of scenes directly exported from 3D Studio MAX through a specific

plugin – 2D GUI system with event handling– Loading of GUI from XML files– Object picking – Support for Head-Mounted Displays (HMD) – New customizable objects directly pluggable to the MVisio core

MVisio Graphic Engine

Mvisio (.dll)Mvisio (.dll)

User application (.exe)

User application (.exe)

OpenGL (1.1->1.5)OpenGL (1.1->1.5)

OpenGL|ES (1.0 CM)OpenGL|ES (1.0 CM)

ImagesImages

PDA enginePDA engine

Models (.mve)

Animations (.mva)

Models (.mve)

Animations (.mva)

PC enginePC engine

CAVE engineCAVE engine

client/server architecture

client/server architecture

Wall Wall Wall Wall

Wall Wall Wall Wall

MVisio on PDA

MVisio on PC

MVisio on CAVE

MVisio graphic engine

MVisio graphic engine

• More details on

http:/vrlab.epfl.ch/~apeternier

Thanks!

…questions?