Is it possible to use transparent models in spring?
I don't mean a total transparent. Something between two values, like RGB 0 to 255.
Transparent models?
Moderators: MR.D, Moderators
With LUA, maybe. Trepan / Jk / Quantum / Whoever: can LUA get and read the primary / secondary texture of a given S3O now? Because alpha-trans should just require two OpenGL function calls, pretty much- read the blue channel, render model alpha per texel == blue value... if what I read on the OpenGL reference was as simple as it looked...
it is damn hard to integrate.
As KDR said you need to z-order all those transparent polygons and render them in a 2nd render process (1. render all none transparent parts 2. render alpha transparent parts in correct z-order). The ordering is slow and you can't use buffered display lists anymore.
But Iirc can you set the drawing of an unit under full control of lua in the next spring release. But you would have to use a totaly different file format, if you want to use it to render alpha transparent parts, cause you need already to differ between 100% opac and alpha parts in the file format itself (lua is much slower in any cpu work, so you should still try to use display lists/vertex arrays etc. to shift work to the gpu).
Btw the full transparent model drawing (used for cloaking etc.) isn't 100% correct. You only can't see those issues 'cos the whole model is transparent! (-> not usable for alpha transparent units ...)
As KDR said you need to z-order all those transparent polygons and render them in a 2nd render process (1. render all none transparent parts 2. render alpha transparent parts in correct z-order). The ordering is slow and you can't use buffered display lists anymore.
But Iirc can you set the drawing of an unit under full control of lua in the next spring release. But you would have to use a totaly different file format, if you want to use it to render alpha transparent parts, cause you need already to differ between 100% opac and alpha parts in the file format itself (lua is much slower in any cpu work, so you should still try to use display lists/vertex arrays etc. to shift work to the gpu).
Btw the full transparent model drawing (used for cloaking etc.) isn't 100% correct. You only can't see those issues 'cos the whole model is transparent! (-> not usable for alpha transparent units ...)