A “brute force” method of testing how a user could setup occlusion in a simple manner could be:
Make a max scene where two shapes have the same coodinates.
The shapes overlap; should produce a rendering artifact.
Hypothesis:
if object A has a lower renderbin-setting than B, it’s surface will show, while B will be overlapped.
If I could set ARive to render A with a GL_COLORMASK FALSE then the object would be an occluder for the other.
This is not nearly as elegant as Sylvi’s and Julian Oliver’s soulutions, but it would make it easy for any 3dMax and OSGexporter-user to define an object in the scene as an occluder:
I could just make ARive always occlude renderbin[0] and make it an ARive imperative that a designer:
1. Only use one object for occlusion
-If a complex object, or several non-adjacent objects are needed, this could simply be an attached poly or mesh.
2. Always set that objects renderbin to 0 using OSGexporter’s OSGStateSet-helper
-In turn this could remove the need for XML-input.