Archived

This topic is now archived and is closed to further replies.

Rendering transperent faces in Octree

This topic is 5237 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve implemented a basic octree but, the i''ve run on to a problem with transperent objects/faces. I know that trasperent objects should be drawn after all other objects, but in an Octree/ABT the faces of a transperent object may be distributed over several nodes. In this case how to sort them properly or handle them so that i can use correct blending technique for transperent faces correcttly?

Share this post


Link to post
Share on other sites
Doing a bsp at runtime with transparent faces? If you don''t have many it must be fast.

Or use a octree for opaque and a bsp for transparent (but isn''t a good idea if something transparent can move inside the transparent bsp, like a model).

Share this post


Link to post
Share on other sites
quote:
Why not use a combination of Portals and Octree?

I don't know how portals could help but i don't want to use portals, i'll try occlusion culling later.

quote:
You could maybe tag them on your way through the octree (perhaps add them to a list somehow), then render them later.

If i do this i have to seperate them from the octree while construction, ... but last resort maybe

quote:
Doing a bsp at runtime with transparent faces? If you don't have many it must be fast.

Not a bad idea, i can do the same thing with Octree, i don't think i'll need a bsp.

quote:
Or use a octree for opaque and a bsp for transparent (but isn't a good idea if something transparent can move inside the transparent bsp, like a model).

I really don't want to use a bsp, i believe there are better ways to handle transperent faces within Octree.



[edited by - skremon on August 14, 2003 1:41:36 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Judging by your problem you are not sorting the objects that you are drawing. Use your octree to determine what objects need to be drawn then sort them based on opacity,then texture, then buffers etc. You can use a list, hash table, tree, whatever to sort them. For those objects that are transparent you will draw them after the non transparent objects and also you will want to draw them ordered from back to front (unless you turn off z-read).
PS. ideally you would want to sort each tri of a transparent object to ensure best visual effect, but even this can still have visual anomalities (though rarely) and in most cases per tri z sorting for alpha objects just isn''t worth the cost for the what little bonus to ''visual correctness'' it will achieve.
Just draw the entire alpha object, if there is noticable transparency problems resulting from poorly sorted alpha then maybe use the per tri.
A good example of thsi is the cockpit for a fighter plane where you can get some problems from not sorting the fighter on a per tri basis but you can beat this prob by making the transparent cockpit a seperate object.

Good luck,
SoulSpectre.

Share this post


Link to post
Share on other sites