The Glest Wiki
Line 5: Line 5:
 
You cannot use the alphachannel in the texture to create this effect ( because its already used for [[teamcolor]] )! This effect is done by transparency material in blender!
 
You cannot use the alphachannel in the texture to create this effect ( because its already used for [[teamcolor]] )! This effect is done by transparency material in blender!
 
The whole object with this material will be transparent! If you want transparency and non transparency parts you have to work with 2 objects. One with transparency material one with non transparent material. I think this is the way the magic energy fontain was made.
 
The whole object with this material will be transparent! If you want transparency and non transparency parts you have to work with 2 objects. One with transparency material one with non transparent material. I think this is the way the magic energy fontain was made.
  +
 
 
[[File:TransparentTeamColor.png]]
 
[[File:TransparentTeamColor.png]]
  +
  +
However, one must be careful when using transparency in Glest, as it can make objects appearing behind it ''also'' appear transparent. The way it works is that if the object with transparency is the ''actively selected'' object, it will take precedence over objects behind it, both in the same unit and other units (but not tileset objects). The way to avoid this is to have a different object as the actively selected object when exporting. This can be illustrated with the following example.
  +
  +
In this example, we have everything selected, but the CRYSTAL (transparent object) is the ACTIVE object, indicated by its lighter outline and having its name in the corner.
  +
  +
  +
 
  +
[[File:Blender_fail.jpg|thumb|left|Selected objects in Blender]]
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
When we export like this, the active object (the crystal) takes precedence and we get this result:
  +
  +
  +
  +
  +
[[File:G3d_fail.jpg|thumb|left|Objects in the g3d viewer, where everything behind the transparent object is obscured.]]
  +
  +
  +
  +
As you can see, the transparency shows all the way through, so we see straight through the base to the grid floor.
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
In this example, we have everything selected, but the BASE (opaque object) is the ACTIVE object, indicated by its lighter outline and having its name in the corner.
  +
  +
  +
[[File:Blender_success.jpg|thumb|left|Selected objects in Blender]]
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
When we export like this, the active object (the base) takes precedence and we get this result:
  +
  +
  +
  +
  +
[[File:G3d_success.jpg|thumb|left|Objects in the g3d viewer, where everything behind the transparent object is visible.]]
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
As you can see, the base is not obscured by the transparent crystal because it was the active object when we exported.
  +
  +
  +
  +
So, when you have an object with transparency and an object that is completely opaque, make sure that the opaque object is the active one if you don't want it (and everything behind it) to be obscured!

Revision as of 03:10, 4 January 2010

Transparent Teamcolor

Here is how to switch on transparent teamcolor! You cannot use the alphachannel in the texture to create this effect ( because its already used for teamcolor )! This effect is done by transparency material in blender! The whole object with this material will be transparent! If you want transparency and non transparency parts you have to work with 2 objects. One with transparency material one with non transparent material. I think this is the way the magic energy fontain was made.

TransparentTeamColor

However, one must be careful when using transparency in Glest, as it can make objects appearing behind it also appear transparent. The way it works is that if the object with transparency is the actively selected object, it will take precedence over objects behind it, both in the same unit and other units (but not tileset objects). The way to avoid this is to have a different object as the actively selected object when exporting. This can be illustrated with the following example.

In this example, we have everything selected, but the CRYSTAL (transparent object) is the ACTIVE object, indicated by its lighter outline and having its name in the corner.



File:Blender fail.jpg

Selected objects in Blender











When we export like this, the active object (the crystal) takes precedence and we get this result:



G3d fail

Objects in the g3d viewer, where everything behind the transparent object is obscured.


As you can see, the transparency shows all the way through, so we see straight through the base to the grid floor.









In this example, we have everything selected, but the BASE (opaque object) is the ACTIVE object, indicated by its lighter outline and having its name in the corner.


File:Blender success.jpg

Selected objects in Blender











When we export like this, the active object (the base) takes precedence and we get this result:



G3d success

Objects in the g3d viewer, where everything behind the transparent object is visible.










As you can see, the base is not obscured by the transparent crystal because it was the active object when we exported.


So, when you have an object with transparency and an object that is completely opaque, make sure that the opaque object is the active one if you don't want it (and everything behind it) to be obscured!