home *** CD-ROM | disk | FTP | other *** search
- Main Point for Bullet Slide...
-
- Silicon Graphics Computer Systems
- 3D Programming
- for Humans!
- Open Inventor 3D Toolkit
- Open Inventor 3D Toolkit
- ¿
- a fast way to write high performance graphics
- ¿
- an object¡oriented approach to 3D graphics
- ¿
- SGI's 3D data format standard
- ¿
- a simple, new paradigm for 3D interaction
- ¿
- an object model above OpenGL
- ¿
- a class lib that you can customize & extend
- X
- Open GL
- Motif Toolkit
- Inventor Toolkit
- API
- SPI
- API
- SPI
- Applications
- Hardware
- What is Open Inventor?
- What is Open Inventor?
- Major Rewrite!
- Release 2.1 (Zippy)
-
-
- è Optimized immediate mode rendering
-
- caching, scene graph traversal, rendering loops,
- culling algorithms
-
- è Reduced memory usage
- è File read optimizations
- è Improved picking
- è VRML support
-
- anchor and inline nodes recognized
- New!
- 2
- RE I Extreme Indy
- 1.5-2x
- <=2x
- >1.5x
- 2.5-3x
- textured
- Slot Cars!
- Slot Cars!
- Release 2.1 (Zippy)
- - a common 3D data format (cut¡copy¡paste)
- - a common 3D programming environment
- - a common 3D look¡and¡feel
- - 10x better productivity
- - 10 years of SGI's graphics programming expertise at y
- our fingertips
- - focus on solution, not graphics drudgery
- The Benefits of
- Open Inventor
- The Benefits of
- Open Inventor
- Powerful 3D Programming Environment
- Powerful Architecture
- Open Inventor books
- from Addison-Wesley
- Available in Bookstores
- ¿
- Converters available for major file formats
- to Open Inventor format
-
- è Alias è SDRC è DXF
- è 3DS è Wavefront è Intergraph
- è IGES è SLA è RIB (out)
-
- è Pro-Engineer è Catia è ComputerVision
- Open Inventor
- C++ Reference Manual
- The Official Reference Document
- for Open Inventor, Releease 2
- Open Inventor Architecture Group
- Josie Wernecke
- The Inventor Toolmaker
- Extending Open Inventor, Releease 2
- Open Inventor Architecture Group
- Josie Wernecke
- The Inventor Mentor
- Programming Object-Oriented 3D
- Graphics with Open Inventor, Releease 2
- Open Inventor Architecture Group
- Josie Wernecke
- Interoperabliity
- Interoperability
- 3D Data Exchange
- ¿
- ILM, Princeton, Stanford, Brown, Cambridge, NCSA, Ch
- rysler, Alias, ...
- ¿
- ILM used Inventor for Jurassic Park and more
- ¿
- Voted Top Ten Graphics S/W Product of 1992*
- ¿
- Indy
- Out¡of¡Box
- is Inventor¡based
- ¿
- Explorer, Annotator, Showcase 3D, CASEVision/WorkShop A
- rray Visualizer, and more
- ¿
- Cartoon Channel's host Moxy Moto
- ¿
- A variety of new apps based on Inventor
- ¿
- Open Inventor licensed to 3rd parties
- * IEEE Computer Graphics & Applications Jan `93
- It's Everywhere . . .
- It's Everywhere . . .
- Group
- Perspective
- Camera
- Sphere
- Point
- Light
- // Create a scene with a camera
-
- scene = new SoGroup();
- camera = new SoPerspectiveCamera();
- scene->addChild( camera );
- // Create a light and add to scene
- light = new SoPointLight();
- light->location.setValue( 10, -5, 5 );
- scene->addChild( light );
- // Create a sphere and add to scene
- sphere = new SoSphere();
- scene->addChild( sphere );
- camera->viewAll( scene )
-
- Easy 3D Programming
- Easy 3D Programming
- Comprehensible, Object Oriented Style
- dpy = XOpenDisplay(0);
- vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeList)
- ;
- cx = glXCreateContext(dpy, vi, 0, GL_TRUE);
- cmap = XCreateColormap(dpy, RootWindow(dpy,
- vi->screen),
- vi->visual, AllocNone);
- swa.colormap = cmap;
- swa.border_pixel = 0;
- swa.event_mask = StructureNotifyMask;
- win = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
- 0, 0, 400, 400,
- 0, vi->depth, InputOutput,
- vi->visual,
-
- CWBorderPixel|CWColormap|CWEventMask, &swa);
- XMapWindow(dpy, win);
- XIfEvent(dpy, &event, WaitForNotify, (char*)win);
- glXMakeCurrent(dpy, win, cx);
- glEnable(GL_DEPTH_TEST);
- glClearColor(0,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- SoXtRenderArea ra;
- ra.show();
- 3D Programmer
- Productivity Advantage
- 3D Programmer
- Productivity Advantage
- Example: Creating a Rendering Window
- X and OpenGL
- Open Inventor
- Example: Rendering a Textured 3D Object
- root = new SoSeparator;
- camera = new SoPerspectiveCamera;
- light = new SoDirectionalLight;
- texture = new SoTexture2;
- cube = new SoCube;
-
- root->addChild(camera);
- root->addChild(light);
- root->addChild(texture);
- root->addChild(cube);
- texture->filename = brick.rgb ;
- ra.setSceneGraph(root);
- 3D Programmer
- Productivity Advantage
- 3D Programmer
- Productivity Advantage
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=-1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=-1;tVec[2]=1;
- glVertex3fv(tVec);
- glEnd();
- glDisable(GL_CULL_FACE);
- glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
- glDisable(GL_TEXTURE_2D);
- glDisable(GL_TEXTURE_2D);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, tVec);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- glDisable(GL_LIGHT0);
- tMat[0] = 1.000;tMat[1] = 0.000;tMat[2] = 0.000;tMat[3] =
- 0.000;
- tMat[4] = 0.000;tMat[5] = 1.000;tMat[6] = 0.000;tMat[7] =
- 0.000;
- tMat[8] = 0.000;tMat[9] = 0.000;tMat[10]= 1.000;tMat[11]=
- 0.000;
- tMat[12]= 0.000;tMat[13]= 0.000;tMat[14]= 0.000;tMat[15]=
- 1.000;
- glLoadMatrixf(tMat);
- glMatrixMode(GL_PROJECTION);
- tMat[0] = 1.000;tMat[1] = 0.000;tMat[2] = 0.000;tMat[3] =
- 0.000;
- tMat[4] = 0.000;tMat[5] = 1.000;tMat[6] = 0.000;tMat[7] =
- 0.000;
- tMat[8] = 0.000;tMat[9] = 0.000;tMat[10]= 1.000;tMat[11]=
- 0.000;
- tMat[12]= 0.000;tMat[13]= 0.000;tMat[14]= 0.000;tMat[15]=
- 1.000;
- glLoadMatrixf(tMat);
- glMatrixMode(GL_MODELVIEW);
- glDisable(GL_DEPTH_TEST);
- float tVec[4];
- float tMat[16];
- /* glGetIntegerv(GL_DEPTH_BITS, ...);*/
- glViewport(0, 0, 400, 400);
- glClearIndex(0);
- glClear(0x4000);
- glEnable(GL_DEPTH_TEST);
- glClear(0x100);
- glDisable(GL_DEPTH_TEST);
- /* glGetIntegerv(GL_DEPTH_BITS, ...);*/
- glViewport(0, 0, 400, 400);
- glClearColor(0, 0, 0, 0);
- glClear(0x4000);
- glEnable(GL_DEPTH_TEST);
- glClear(0x100);
- tVec[0]=0.2;tVec[1]=0.2;tVec[2]=0.2;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, tVec);
- tVec[0]=0.8;tVec[1]=0.8;tVec[2]=0.8;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, tVec);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, tVec);
- /* glGetBooleanv(GL_RGBA_MODE, ...); */
- glEnable(GL_LIGHTING);
- glDisable(GL_LINE_STIPPLE);
- glLineWidth(1);
- glEnable(GL_NORMALIZE);
- glPointSize(1);
- glDisable(GL_CULL_FACE);
- glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
- glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 25.6);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, tVec);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, tVec);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT)
- ;
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)
- ;
- glDisable(GL_POLYGON_STIPPLE);
- glDisable(GL_TEXTURE_2D);
- glDisable(GL_POINT_SMOOTH);
- glDisable(GL_LINE_SMOOTH);
- glViewport(0, 0, 400, 400);
- glScissor(0, 0, 400, 400);
- glMatrixMode(GL_PROJECTION);
- tMat[0] = 2.414;tMat[1] = 0.000;tMat[2] = 0.000;tMat[3] =
- 0.000;
- tMat[4] = 0.000;tMat[5] = 2.414;tMat[6] = 0.000;tMat[7] =
- 0.000;
- tMat[8] = 0.000;tMat[9] = 0.000;tMat[10]=-2.414;tMat[11]=-
- 1.000;
- tMat[12]= 0.000;tMat[13]= 0.000;tMat[14]=-8.363;tMat[15]=
- 0.000;
- glLoadMatrixf(tMat);
- glMatrixMode(GL_MODELVIEW);
- tMat[0] = 1.000;tMat[1] = 0.000;tMat[2] = 0.000;tMat[3] =
- 0.000;
- tMat[4] = 0.000;tMat[5] = 1.000;tMat[6] = 0.000;tMat[7] =
- 0.000;
- tMat[8] = 0.000;tMat[9] = 0.000;tMat[10]= 1.000;tMat[11]=
- 0.000;
- tMat[12]= 0.000;tMat[13]= 0.000;tMat[14]=-4.182;tMat[15]=
- 1.000;
- glLoadMatrixf(tMat);
- /* glGetIntegerv(GL_MAX_LIGHTS, ...);*/
- glEnable(GL_LIGHT0);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glLightfv(GL_LIGHT0, GL_AMBIENT, tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=1;tVec[3]=1;
- glLightfv(GL_LIGHT0, GL_DIFFUSE, tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=1;tVec[3]=1;
- glLightfv(GL_LIGHT0, GL_SPECULAR, tVec);
- tVec[0]=0;tVec[1]=0;tVec[2]=1;tVec[3]=0;
- glLightfv(GL_LIGHT0, GL_POSITION, tVec);
- glLightf(GL_LIGHT0, GL_SPOT_EXPONENT, 0);
- glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 180);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, tVec);
- glEnable(GL_TEXTURE_2D);
- glGenLists(1);
- glNewList(1, GL_COMPILE_AND_EXECUTE);
- glPixelTransferf(GL_RED_SCALE, 1.000000);
- glPixelTransferf(GL_GREEN_SCALE, 1.000000);
- glPixelTransferf(GL_BLUE_SCALE, 1.000000);
- glPixelTransferf(GL_ALPHA_SCALE, 1.000000);
- glPixelTransferf(GL_RED_BIAS, 0.000000);
- glPixelTransferf(GL_GREEN_BIAS, 0.000000);
- glPixelTransferf(GL_BLUE_BIAS, 0.000000);
- glPixelTransferf(GL_ALPHA_BIAS, 0.000000);
- {
- gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 64, 64, GL_RGB, GL_U
- NSIGNED_BYTE, b);
- }
- glEndList();
- glFrontFace(GL_CCW);
- glEnable(GL_CULL_FACE);
- glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
- tVec[0]=0.8;tVec[1]=0.8;tVec[2]=0.8;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, tVec);
- tVec[0]=0.2;tVec[1]=0.2;tVec[2]=0.2;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, tVec);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, tVec);
- tVec[0]=0;tVec[1]=0;tVec[2]=0;tVec[3]=1;
- glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, tVec);
- glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 25.6);
- glBegin(GL_QUADS);
- tVec[0]=0;tVec[1]=0;tVec[2]=1;
- glNormal3fv(tVec);
- tVec[0]=0;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=-1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=-1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=0;tVec[2]=-1;
- glNormal3fv(tVec);
- tVec[0]=0;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=-1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=-1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=-1;tVec[1]=0;tVec[2]=0;
- glNormal3fv(tVec);
- tVec[0]=0;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=-1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=-1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;tVec[2]=0;
- glNormal3fv(tVec);
- tVec[0]=0;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=-1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=-1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;tVec[2]=0;
- glNormal3fv(tVec);
- tVec[0]=0;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=1;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=0;tVec[1]=-1;tVec[2]=0;
- glNormal3fv(tVec);
- tVec[0]=0;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=-1;tVec[1]=-1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=0;
- glTexCoord2fv(tVec);
- tVec[0]=1;tVec[1]=-1;tVec[2]=-1;
- glVertex3fv(tVec);
- tVec[0]=1;tVec[1]=1;
- OpenGL
- Open Inventor
- ¿
- Automatic caching yields OpenGL rates
- ¿
- Objects are tuned for OpenGL
- ¿
- Culling and level¡of¡detail can pay off
- ¿
- Viewers include degradation options
- ¿
- Picking uses bounding boxes
- ¿
- Fast manipulators
- Performance Features
- Performance Features
- ¿
- Shapes
- Cubes, Cones, Cylinders, Surfaces, 3D Text
- ¿
- Properties
- Color, Materials, Textures, Transparency
- ¿
- Lights & Cameras
- Point, Directional & Spot Lights
- ¿
- Manipulators
- Trackball, Handlebox, Transform
- ¿
- Actions
- Render, Pick, Print, Write
- ¿
- Components
- Editors, Viewers, Browsers, Sliders and Buttons
-
- Nodes-R-Us . . .
- Toolkit Components
- Nodes-R-Us . . .
- Toolkit Components
- ¿
- Objects, not drawings!
- - picking, files, bounding boxes, searches,...
- ¿
- Direct 3D manipulation
- ¿
- Open Inventor objects call OpenGL
- ¿
- Caching == speed
- ¿
- Subclassing is a good thing
- Important Concepts
- to Remember
- Important Concepts
- to Remember
-