Hi all, I've recently spoken with The_E on irc about this issue and he suggested I post it here.
Before I begin, I'd just like to say that I'm an artist for Diaspora, and know very little about coding - so I have no idea whether or not what I'm suggesting is even possible, or how complicated it is. I thought I'd throw the issue out there and see if a better way of handling transparency can be found. Warning: lots of text ahead
As the thread title suggests, this is about transparency and the way engine handles it in the game. Right now, the alpha channel on the diffuse (color) map is used to determine transparency: black is transparent, white is opaque, and say 50% gray is 50% transparent. That part's fine. The complication comes from the fact that anything you want to see through the transparent object on a ship needs to be set up in the pof as below that object in hierarchy - the transparent object itself (the one that has the alpha map applied) needs to be higher in the hierarchy than the stuff you see through it. This in itself isn't a problem on simpler setups where you only have, say, a cockpit canopy on a fighter - you set up your canopy is as detail0 and slave everything to that, problem solved (FUBAR's been testing this stuff and he actually tells me that your transparent object has to be detail0 to work properly - so you can't have say, the fighter main hull as detail0, then slaved to that the canopy, and below the canopy the cockpit interior - and this causes complications in some examples).
The problems begin on ships that need more, larger surfaces transparent or semi transparent. Since I'm a Diaspora member I'll be using ships from the BSG universe as an example of why this way of doing things causes us problems.
Let's begin with the ringship:

Once this one is built for Diaspora, we definitely want to have the interior of the ring actually modeled out, with transparent glass over it. Ideally, we'll also want to be able to see the inside of the glass as well from certain angles (right now means having two glass objects, one with polygon normals pointing outwards and the other with poly normals pointing inwards).
The problems on this one will arise mainly from the fact that the glass object(s) need to be detail-0, but they also need to spin (the entire ring section including the arms and parts of the main hull rotates). You can rotate sub-objects, but not sure about detail-0..
If the glass can work with not being detail-0 you can still get issues of not seeing some hull parts through it from certain angles (say, you park your fighter so you should be able to see the bridge through the glass, or the connecting arms). We did do some testing on this and the problem is more complex than one might imagine; even if everything is set up seemingly correctly, there's always some ship part you can't see through the glass.
Here's another example:

Not exactly the most accurate depiction of the botanical cruiser, but it'll do. The problems are, of course, the domes. With a single dome, it's not a problem at all. Set up the dome as detail0 and everything else below that. With multiple ones, you have a problem if you want to see other domes through other domes. Say you park you fighter in front of it, you should be able to see several domes right through each other. In parts where the transparent parts intersect you should see less and less transparent surfaces, the more glass objects you're looking through at once.
And finally, on to the actual request part:
We've been thinking of ways to get around these issues, but the best thing would be if the need for hierarchy for transparent objects was eliminated. I'm not sure if it's even possible, but if it is the best thing would be that everything that happens to be behind a transparent object (relative to the player) is visible through that object, no matter if it's another ship part which may or may not be higher in hierarchy, or another ship for that matter.
I hope you lot can make sense of what I wrote. If anybody would like to tackle this, I'd of course be willing to do any test models or textures to test it on - while this would be extremely useful to Diaspora, I'm sure there are other projects which could benefit from this as well. If it can't be done, well, thanks for listening and all your great work so far
