Post #11by chris » 30.01.2007, 09:30
In this case, the problem is that the flames and the spacecraft are two separate objects, and the spacecraft is surrounded by an invisible cube.
To explain why this is a problem, you have to understand that Celestia only does very coarse sorting of translucent objects. Generally, translucent objects are rendered in order from back to front after all opaque objects have drawn. This doesn't solves opaque/translucent ordering issues, but translucent objects may not be ordered properly with respect to each other if they overlap.
Obviously, the flames are translucent. But, the invisible box causes the spaceship to be marked as translucent as well, and thus the usual translucent/opaque sorting fails. If the flames were part of the spacecraft model, they would be sorted correctly. A workaround that I attempted was to ignore completely transparent objects (opacity = 0) when determining opacity. Unfortunately, the boxes in the Cosmostrator model are not quite completely transparent. If I nudge the complete transparency threshold up to 0.01, the sorting works fine.
So, in summary: I have a simple fix that will make the Cosmostrator look right, but the opacity of the bounding boxes should really be zero, not ~0.007 as it is now.
Ideally, the boxes shouldn't be necessary at all, but I understand that they're required right now to accurately position the flames relative to the spacecraft, because Celestia normalizes mesh sizes at load time. In upcoming post, I'll propose a scheme in which the rescaling could be avoided, making mesh positioning much easier.
--Chris