Fading a texture on a model

Materials, textures, lighting, postfx
4 posts Page 1 of 1
Skipper
Posts: 18
Joined: Fri Apr 24, 2015 3:25 pm
by Skipper » Mon Nov 06, 2017 6:30 pm
We are looking at playing an animation in a loop, but at the end of the loop the animation pauses and the model fades out and simultaneously fades back in at the start point of the loop. How do we get the model to fade with transparency instead of the fizzle-fade type effect that you get when switching between LODs?
Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Nov 06, 2017 10:00 pm
I don't know of any game or engine that has a method for it, most just use the pop in without any fade.
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Tue Nov 07, 2017 3:04 am
Check out this post:

How to make a variable that affects alpha?
http://forums.torque3d.org/viewtopic.php?f=10&t=991

It involves engine changes but it appears that he added alpha as a variable, so you could literally add a little alpha, in increments, until it fades then remove alpha.

the code is in his own reply to the thread.
https://pastebin.com/xLYKEdkY
LukasPJ
Site Admin
Posts: 353
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Tue Nov 07, 2017 8:03 pm
@
User avatar
Skipper
the issue lies in the way Torque3D (and most modern engines) render models. The way it is rendered doesn't support transparent objects.

Therefore, in order to have transparent objects, we have to render those objects in another, more simple, way called Forward Rendering. So if you truly want a transparency effect, then you either have to forward render that particular object or fake it somehow.

This is why T3D employs the fizzle-fade technique, and why it isn't just a simple thing to implement.
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest