Game Development Community

Can T2D Palette Swap out of the box? What is needed?

by Dave Calabrese · in Torque Game Builder · 11/09/2005 (12:45 pm) · 4 replies

In Mortal Kombat 1, SubZero, Reptile and Scorpion all used the same character graphics, only they had been palette swapped. I'm looking to see if I can do this in t2d.

I am thinking I need to create an animation sequence (like an IFL or something) in my modeling software, but render the animation in greyscale. Now that I have my graphics, is it possible to do a palette swap on it in t2d? If not, how hard would this be to add to the engine? Has anyone added it?

Thanks in advance,
-Dave C.

#1
11/09/2005 (2:40 pm)
I don't think its easy to do. T2D uses 3D hardware to render stuff, sprites on screen are textured quads. From my impression there are very few graphics cards that support palettized textures.

You can however assign colors to every vertex of the quad but that's a very restricted means.

I don't know what can be done with shaders, maybe they provide the functionality you need.

Sorry if I sound confused, I am.

cheers,
michael
#2
11/09/2005 (3:16 pm)
You can call .setBlendColour but it tints the whole sprite with the RGB settings that you use.
#3
11/09/2005 (4:31 pm)
@Philip: I'm actually looking to tint the whole graphic in this case. Imagine a block of animated plastic or something, and I want to change its full color tint.
#4
11/10/2005 (12:37 am)
In that case it sounds like .setBlendColour is exactly what you're after :)