Open Inventor FAQs - Troubleshooting -- Incorrect picture/no picture

How come my texture appears to "warp" on the surface of my objects (when I use a perspective camera)?

What you are seeing is a common visual result, and has an easy cure. At the top of your scene graph, insert an SoComplexity node and set the value of its textureQuality field to at least 0.6.

(The default textureQuality is 0.5 for best performance. However, the visual results may not be acceptable for all situations.)

Here's some sample additional code:

SoComplexity *complexity = new SoComplexity;
SoTexture2 *texture = new SoTexture2; root->addChild(texture); texture->filename.setValue("texturefile.rgb");

Here's the equivalent info as it might appear in an Inventor file:

Complexity {
  textureQuality 0.6
Texture2 { filename "texturefile.rgb" }

Here are "before" and "after" pictures showing textureQuality 0.5 and 1.0:


Why am I getting "splattery" effects in my picture (related to Z-buffering)?

The general idea is this. You may have 24 or possibly 32 bits of depth buffer. Whatever depth buffer precision you have is mapped to the entire distance between the near plane and the far plane. The further apart the near plane and the far plane, the larger "chunk" of space each unit of depth buffer corresponds to. It's a good idea to keep these "chunks" as small as possible. (To this end, the Open Inventor viewers by default automatically and dynamically adjust the clip planes to fit the scene as tightly as possible.)

At any rate, the problem with depth buffer resolution is one of the classic problems of 3D computer graphics and there is no perfect solution. Here are some ways to work with the problem.

  • Don't use the depth buffer at all. Draw your objects back to front.
  • Adjust the clip planes yourself based on your knowledge of the scene. A possibility is to modify the clip planes during traversal.
  • Use a combination of the first two approaches.
    • First draw objects that are far away (e.g. the moon), possibly with the depth buffer turned off (if appropriate).
    •  Then reset the clip planes to tightly bound the nearer objects, then draw them.

[UNIX] "Iv" is prepended to all of the labels and menu items in my Open Inventor viewer. How do I fix this?

Getting rid of the "Iv" is easy:


EXPLANATION: OIV 2.4 for the UNIX platforms was modified so that it could easily be localized. This was achieved by specifying the widget strings in an X resource file rather than hard-coding them inside Open Inventor.

The good news is that to change the widget strings you just have to edit the resource file. Several flavors (French, Japanese, etc.) of resource files have been provided in the $OIVHOME/app-defaults directory. You can add more as you see fit.

The bad news is that if X11 can't find the resource file, it uses the internal widget name for its label, hence the "Iv" prepended to each of the labels. The suggested way to cure the problem is by setting XAPPLRESDIR to point to $OIVHOME/app-defaults. Another way is to copy the resource file (named Inventor) from $OIVHOME/app-defaults into the default location where X11 looks for resource files.

REMEMBER: If you redistribute your application, you will also need to supply the Inventor resource file so that your users will get the appropriate widget labels. If you forget... they'll get the dreaded "Iv" labels.

How come my geometry (a simple face set) is drawn incorrectly? It appears as if some vertices are being skipped.

This can happen if some of the faces of your face set are concave. For performance reasons Open Inventor assumes that all faces are convex. If this assumption is bad, you may get an incorrect picture. The actual visual results will depend on the underlying OpenGL.

Open Inventor can automatically convert concave faces to triangles (which are always convex by definition) by "tessellating" the faces. To tell Open Inventor that faces should be tessellated before rendering, add a ShapeHints node to your scene graph:

Shape Hints {

Note that tessellation takes time and may reduce performance. If the face set node can be render cached, then tessellation will only be done once (on the first render traversal) and there is no subsequent performance penalty. However if the face set is not render cached, tessellation will occur on every traversal. For this reason you should only use UNKNOWN_FACE_TYPE above face sets that you know must be tessellated (or don't know anything about). It may be desirable, in some cases, to pre-tessellate faces to avoid these issues (see the GLU documentation for OpenGL).

Here are "before" and "after" pictures showing a scene graph with no shape hints specified (incorrect picture) and with faceType set to UNKNOWN_FACE_TYPE (correct picture):