Determining occlusion from semi-transparent volumes

Started by
5 comments, last by Digitalfragment 16 years, 10 months ago
Hey all. I've run into a technical difficulty on a current project that I'm not too sure how to tackle. In order to minimize the amount of data needed to be processed by the renderer a good occlusion solution needs to be in place. Occlusion for opaque objects is a no-brainer, there are plenty of solutions for that. However the scene that i have is populated by large semi-transparent volumes, which can partially occlude other volumes, the rest of the scene, and even occlude a large portion of itself. Has anyone done anything in the way of determining the above said occlusion?
Advertisement
I haven't worked on this specific problem, but how can a semi-transparent object occlude other objects if it is semi-transparent? Due to the rendering order required (back to front for blending properly) it would certainly be nice to know which objects are occluded and which are not.

If these large objects are made up of several smaller objects, where some of the smaller ones are transparent then you could perform a hardware occlusion query with all of the objects minus the transparent ones? If I am correctly understanding what you mean by transparent, then you can't really assume that anything behind it is not visible until you render it - right?
Quote:Original post by Jason Z
I haven't worked on this specific problem, but how can a semi-transparent object occlude other objects if it is semi-transparent?

Enough depth of a translucent object will eventually stop light. Someone more knowledgeable in physics than me could explain that part.

Anyway, what I would do is calculate for each of those objects the depth needed to completely stop light (or to an extent where you wouldn't want to paint what's underneath). Then I'd build the shape: "zones of the object where the exit of a ray coming from the camera minus the entry of such ray equals the opacity depth".

However, I have no idea of how would I build such a shape. [smile]
Er, Zanshibumi, I doubt it's that physically involved. It could be, but I doubt it. Also, I don't think I really understand the questions, so I'll give you three things for the price of one:

1) if you are talking about concave opaque objects (with holes and whatnot), then I guess the same solutions apply as with regular convex objects. You could also break up the object into convex parts.

2) for screen-door (texture) transparency (as in either completely opaque or completely transparent), per object occlusion seems a bit much. I have no idea whether or not solutions exist for this problem, however, hardware occlusion queries should be able to deal with this, as it's a logical extension to the algorithm (albeit a bit more costly).

3) for simple alpha blending (discarding subsurface scattering and absorption effects), occlusion is unnecessary if alpha < 1.0 - epsilon. Otherwise, the object is opaque.
@Todo

Yeah it is quite physically involved. Volumetric fog is a good example - in some situations you can only see a few metres in front of your face, even though the entire volume is semi-transparent.

The problem is determining an appropriate occlusion volume that is correct from *any* angle.
Fog is different from partially transparent objects. For partially transparent objects, you should just treat them as transparent. I guess I could envision a situation where many partially transparent objects lined up manage to attenuate a distant opaque object into nothingness, but this is such a rare situation, and such a small potential benefit, as to be not worth considering. For fog which is more or less constant over wide distances, you can just adjust the far clipping plane; that won't work for true volumetrically varying fog, but that's not really something that modern engines need to worrk about.
Sneftel, thanks for that reply, but unfortunately these volumes have the potential to be extremely large, say upto 500x the size of the player in any given dimension. I guess the only option i have is to precompute a voxel volume, to which i could then find the largest solid box areas to make as occlusion objects.

This topic is closed to new replies.

Advertisement