Even without alpha blending, looking through the gear that was further away from the player in the above image worked and I could see the other transparent and opaque objects behind it. But only when I look through the closer one (the second image) does the transparency fail.Do you know why this is happening?
Also, by back to front do you mean drawing the object that is the furthest from 0 (greatest negative) to the greatest positive? This is where I can't understand whether the documents mean relative to the player or the world co-ordinates.
I guess my question is, what is the typical process you would use to render any number of translucent objects in a way that let's you see the ones in front and behind no matter the position of the player (e.g. If I had three objects, what states would I set and in what way would I draw in order to be able to see both object 1 and 3 through parts of the middle object, no 2)?
The typical rendering order goes like this:1) Render opaque objects, sorted front-to-back for performance reasons (more likely to take advantage of early depth test).2) Render transparent objects (alpha 0 or 1), sorted front-to-back, with alpha test enabled.2) Render translucent objects (alpha 0..1), sorted back-to-front, for correct blending. Depending on the object's nature, you may need to depth sort individual triangles as well (e.g. particle systems, objects with layers of translucent surfaces)
Btw, order independent transparency is an active research subject. You can google for it, but it's pretty advanced stuff and requires shaders and high-end hardware to do correctly/efficiently.
I see now, and just for clarification on the back to front drawing, does it not matter which way the camera is facing? So it's solely based on camera position, rendering all objects < camera.z first and all objects > camera.z last?