PDA

View Full Version : Blending problem



Imotiep
04-18-2001, 01:11 AM
Here is the deal :
I've created a molecule object composed of
a transparent sphere (blend = src_alpha, one_minus_src_alpha) and a 3d char inside the sphere.
I create a lot of these and the pb is that i can't see through all of them (because of the order) : i can see any sphere through the last one but none through the first one.
And I want to see them all through anyone...
If i play with the depth mask, my blending effect vanished so ... I NEED YOUR HELP
Thanks
ps : i can send you a sample code to illustrate the pb

Teofuzz
04-18-2001, 10:21 AM
I don't know if I'm on the right way, but I think that you have to sort them to draw the closer last.
If you draw only transparent objects, no matter about depth.
But if you draw solid objects, you have to draw all them first with depth buffer enabled, them mask depth and draw transparent obj in distance order.
Hope this helps...
tFz

Imotiep
04-19-2001, 12:53 AM
[Thanks, but i already sort them but there is no concept of back or front in my problem cause 1) they have all the same z coord
2) i draw them from first to last and as i can do rotation of all of these molecules the first can be the closest to the viewport.
In fact it would be easy if all these molecules couldn't rotate...
PS : sorry for my english ... i'm french...