instantreality 1.0


Important change to ‘zRatio’

July 16th, 2010

Noticed some strange behavior in your Viewspace nodes?

instantreality offers the possibility to automatically adjust the zNear/zFar clipping planes for your scenes. An important context variable for this adjustment is ‘zRatio’. zRatio is the maximal allowed ratio of zFar/zNear and effectively controls how near the near clipping plane can get to the viewpoint.

The default value of this variable was recently (rev. 13473 2010-06-24) changed to 10000. For scenes that use the automatic zNear adjustment of instantreality (i.e. zNear in ViewBindable is set to -1), this will push the near clipping plane farther into the scene. Usually this is desirable, as it gives better z-buffer precision and reduces z-fighting [1]. However, if you were using Viewspace nodes and automatic zNear adjustment the new near clipping plane may clip away some of the elements in the Viewspace.

In general, automatic zNear adjustment should not be used with Viewspace nodes, because the near clipping plane is constantly changing (although within bounds that depend on the scene and zRatio). The prefered way to solve this issue is to explicitly specify Viewbindable.zNear and then use Viewspace.translation to move the children of the Viewspace beyond the near clipping plane. When specifying zNear/zFar manually you should always try to push the near plane as far into the scene as possible, because — as stated above — this improves z-buffer precision (see [1] for a detailed explanation).

That said, it is also possible to restore the old behavior by setting zRatio to 100000. There are three possibilities to do this:

  1. use the “–zRatio=100000” command line parameter (without quotation marks, of course)
  2. use the web interface (press b in instantplayer, this should bring up a web page, then navigate to Setup -> zRatio)
  3. use the ACP_zRatio environment variable (e.g. “set ACP_zRatio=100000” or “export ACP_zRatio=100000”)


Leave a Reply

You must be logged in to post a comment.