Game Development Community

startFade not working - LOGGED

by Rex Hiebert · in Torque 3D Professional · 02/24/2010 (10:45 am) · 20 replies

I tested with a StaticShape using the call:
objName.startFade(2000,2000,true);

In version 1.0.1 (and back to at least T3D B5), the object just disappears after 4 seconds (2000ms delay + 2000ms fade).

In version 1.1B1, the object dissolves but in an odd way. In Advanced Lighting the object looked like it was covered with blue then dissolves (random dots). In Basic Lighting it dissolves to a shadowy shape that then disappears and leaves what looks like a decal on the ground.

It seems that this functionality was removed or broken when moving to T3D from previous versions of Torque. Is being re-worked? Is there another option to get a nice clean fade like the previous versions of Torque? Something other than the "dissolve" that it looks like is the current direction?

#1
02/24/2010 (11:02 am)
I think that's supposed to happen, Rex. It's a "fizzle" fade effect (for reasons that I can't remember) --- but I haven't noticed it covered in blue when it does it. Not tested in BL.
#3
02/24/2010 (11:38 am)
@Ivan
Your code change from post#1 on that thread seems to break the "fizzle" effect, and turns fadeout() to a straight off/on vanish just like setmeshhidden().

I haven't tried the later ones for Basic Lighting.
#4
02/24/2010 (12:29 pm)
Steve,this is an old fix and I thought it will work.
I have not tested it in the current beta.
#5
02/24/2010 (12:54 pm)
The blue color was when I tried it on the Deathball level. When I tried it on Empty Room it overlaid black. It seems to be pulling in the background color.

How would this "fizzle" effect be considered a good replacement for the standard fade? I'm working on an app that needs to have a function much like you would find in an RPG. When a player walks into a building the roof fades out so you can see what's inside. Very basic stuff that worked previously but no long works (or attempts to work in the same way) in T3D.

My guess is that it has something to do with the big changes in the rendering pipeline but I wouldn't even know where to start to dig through to resolve the issue.
#6
02/25/2010 (6:52 am)
Is this something that is being worked on for the next beta version? Is there another way to do this other than the startFade function? Would this need to be rewritten as a post effect?
#7
02/26/2010 (7:38 am)
Does anyone from GG have a comment? What direction is the headed? Don't let this thread just fade out! ;)
#8
02/26/2010 (7:44 am)
No no, Rex - this thread will fizzle out! ;)
shortlisted for worst forum joke 2010
#9
06/10/2010 (1:06 pm)
Logged TQA-343
#10
07/07/2010 (11:26 pm)
I think this is because you have not set the material's "Transparency" property.

Open the scene editor.
Select your object in scene. (If there is not, add one)
Open the material editor.
Open the "Advanced (All layers)" section.
select "Transparency" and make sure the text value of the list before it not "None". Normally I use "LerpAlpha".

You can also get some information from this document:
http://docs.torquepowered.com/tgea/official/content/documentation/Materials%20and%20Shaders/Translucent%20Materials.html
#11
07/08/2010 (6:59 am)
Not looking for an object that always has transparent parts. I want a solid object to fade out just as it did in TGEA. With the re-write of the renderer, this function was broken. It has been logged (post #9). We'll see if it is fixed in T3D 1.1
#12
07/11/2010 (11:31 pm)
I have a temporary solution:

Manually create a material with translucent=true;
like this:
In materials.cs:

singleton Material(XXX_base)
{
mapTo = "XXX_base";
// your material definations
...
...
};
singleton Material(XXX_trans : XXX_base)
{
mapTo = "XXX_trans";
translucent = true;
translucentBlendOp = "LerpAlpha";
};

In your program, just before fade out action, change the object material to XXX_trans (using changeMaterial function).
Use schedule function to make a delayed material change, setting it back to its orginal XXX_base just after fade in action is over.
#13
07/13/2010 (6:59 am)
Interesting solution. Looks like it would work but I have to fade quite a few objects. I'll just wait a few more weeks and see if the issue is resolved in 1.1beta2.

But I'll keep this in mind in case that fix is not in there.
#14
08/02/2010 (5:39 pm)
Fixed in 1.1 Beta 2
#15
08/18/2010 (5:33 am)
Quote:
Fixed in 1.1 Beta 2
Truly? The new effect is quite horrid and utterly undesirable (need I say craptastic?) compared to the original fade effect!

EDIT: no offense intended -- well... not much ;) -- to whoever decided windowscreening was a suitable replacement for fading but you definitely fell short here.
#16
08/18/2010 (6:43 am)
I think the entirety of planet Earth agrees MH.
windowscreening IS NOT a suitable replacement for fading
#17
08/18/2010 (1:53 pm)
I agree. This not the look that people expect. And in basic lighting it still leaves a decal or shadow on the ground when the fade completes.

While you are working on this piece of the code, it would be nice if we had the option to fade to a certain level. Instead of fadeOut being boolean, make it a percent and fade to that from whatever the current level is.
#18
09/23/2010 (7:43 pm)
So, now in B3 things have progressed but there are still issues. Aside from the horrible screen door effect instead of the nice FADE that was in TGEA there is still an issue in Basic Lighting. When you have an object fade out it places what looks like a shadow decal on the ground below the object. It also moves with the now invisible object.
#19
09/24/2010 (12:16 am)
That horrible screening effect also does bad things to dts based explosions which automatically fadein and fadeout, unless you explicitly force transparency -- and in some cases I don't want to! I know that not many people actually make use of dts explosions but still that's another indication that this stupid fizzle/dissolve replacement for proper fading wasn't very well thought out in keeping with previous functionality which makes it less than desirable.
#20
12/15/2010 (12:29 pm)
The fizzle is quite funny.. again I thought my hardware is broken ;)
Until I found the fizzle function, and that it is not a bug - it's a feature.