Game Development Community

Problem with fade effect

by Ivan Mandzhukov · in Torque Game Engine Advanced · 11/15/2007 (1:59 pm) · 5 replies

I have a permanent problem with visiblity animation on ShapeBaseData objects. in ShowToolPro the animation plays i.e. my object starts to fade, but when i use it in the engine (TGEA) the animation doesn't work properly . the objects just pops immediatelly and gets back immediately. there's no fade effect as i can be seen in ShowTooPro. Does anyone know how to solve this problem?
here's the code i use for the object :

datablock StaticShapeData(flag)
{
category = "fading cube";
shapeFile = "~/data/shapes/cube/flag.dts";
};

function cube1::onAdd(%this, %obj)
{
%obj.playThread(1, "fading");
}

#1
11/15/2007 (2:01 pm)
Alpha fading does not work in TGEA
there are attempts of reintegrating it thought but it will need a costum shader
#2
11/15/2007 (3:17 pm)
Indeed. Too bad it wasn't integrated into the official release.
#3
11/15/2007 (4:03 pm)
Don't think you will think the same after you've seen what happens to transparent stuff when reflected and refracted and what especially happens to your games performance ...
#4
11/15/2007 (6:15 pm)
Hm, I suppose. Crysis doesn't even utilize distance fading on their world objects/trees/etc.
#5
11/16/2007 (1:54 am)
Yeah, thanks, pals.i supposed so. Doinf it with custom materials suppose to have support for dinamically changable custom materials , which become just the second problem to solve. You know.. when i pick up the "coin" it must dissapear which means that i have to call addMaterialMapping() in one of its itemdata methods.