I'm working on a multiplayer mod that uses 3D models with alpha channel textures.
The problem is that that the partially transparent parts get fully opaque. Which I'm not suprised that it happens. I know the GZDoom's limitation when it comes to alpha channel. But I'm still wondering if there's a way to overcome it because I remember myself playing Doom in GZDoom and Skulltag with a model pack originally made for Doomsday engine and the transparency worked pretty fine.
Or is it possible that I'm missing something in DECORATE, MODELDEF or GLDEFS?
This is my plasma gun model with a fake shadow texture. The shadow texture is 40% transparent.
http://sta.sh/020anc36avnm
Model textures with alpha channel
Moderator: Graf Zahl
- Astonov
- Posts: 11
- Joined: Sun Sep 11, 2011 18:45
- Location: Czech Republic
- Enjay
- Developer
- Posts: 4723
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: Model textures with alpha channel
GZDoom does not use the alpha of a model skin. The skin can have fully transparent or fully opaque areas and a skin with something in between seems to get forced to whichever is closest for that particular pixel. Presumably there is a threshold value or some kind of calculation.
However, all is not lost entirely. It is possible to set an actor to be translucent using the usual DECORATE rendering flags and these are respected even when a model is attached to the actor. This is, of course, not as fine-tunable as being able to set varying levels of translucency using a skin alpha channel but it can be useful for some effects.
However, all is not lost entirely. It is possible to set an actor to be translucent using the usual DECORATE rendering flags and these are respected even when a model is attached to the actor. This is, of course, not as fine-tunable as being able to set varying levels of translucency using a skin alpha channel but it can be useful for some effects.
- Astonov
- Posts: 11
- Joined: Sun Sep 11, 2011 18:45
- Location: Czech Republic
Re: Model textures with alpha channel
Perfect. Thanks!
- Rachael
- Developer
- Posts: 3646
- Joined: Sat May 13, 2006 10:30
Re: Model textures with alpha channel
In addition to what Enjay mentioned it's also possible to set the blending mode to "Add" for these models using their DECORATE definition - which does allow you to set varying levels of transparency with the limitation that the resulting pixel must be the same or brighter than the original.
This is the same transparency method that was popularized by the Unreal engine back in 1999 and it is good with a bit of a ghosty effect but it is popular with fire and phaser beams and the like.
This is the same transparency method that was popularized by the Unreal engine back in 1999 and it is good with a bit of a ghosty effect but it is popular with fire and phaser beams and the like.
- Enjay
- Developer
- Posts: 4723
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: Model textures with alpha channel
Another trick is to make an item that is not going to move from more than one actor. The different actors can have different levels of translucency applied and all be placed on the same spot. If their models fit together to form a single item, it looks like the item has varying levels of translucency.
If the actor is going to move, however, (either under its own steam or via a conveyor etc) you run the risk of the parts separating slightly. There are ways to minimise this and depending on the situation, it may or may not be problematic.
If the actor is going to move, however, (either under its own steam or via a conveyor etc) you run the risk of the parts separating slightly. There are ways to minimise this and depending on the situation, it may or may not be problematic.