How to implement the grid like in MutantStorm
by Wayne Doherty · in Torque Game Engine · 01/03/2006 (7:53 am) · 5 replies
Hi
I recently aquired the Torque SDK and was wondering how the grid under the player in MutantStorm is implemented. In the demo I found the z_gridder2.bmp file which contains the grid image I assume is rendered with addative blending like much of the game. What I am stuck on is how they implemented the alpha drop off on this repeated tile. The tile is repeated underneath the player, but as the distance from the player increases the grid seems to become more transparent till it is invisible.
From what I have gleaned so far from these forums multi-texture support seems to be an exclusive feature of TSE not TGE. Sure you could potentially create your own renderable object using the fxRenderObject as a base but that seems unlikely in this case (not doubting anyones ability MutantStorm is one sexy use of Addative blending.. just seems like overkill).
How would you most easily go about doing something like this in torque? Could this grid be lit with a point light with some sort of falloff? Could the grid under the player be a dif object rather than a dts (which does seem to support multi-textures), where one bitmap is the grid and the other is the transparency, they total result of which is blended using addative rendering?
Thanks all in advance.
By looking at whats out there and trying to determine how to implement this in torque (easily), I hope to check my understanding of how it all works together.
I recently aquired the Torque SDK and was wondering how the grid under the player in MutantStorm is implemented. In the demo I found the z_gridder2.bmp file which contains the grid image I assume is rendered with addative blending like much of the game. What I am stuck on is how they implemented the alpha drop off on this repeated tile. The tile is repeated underneath the player, but as the distance from the player increases the grid seems to become more transparent till it is invisible.
From what I have gleaned so far from these forums multi-texture support seems to be an exclusive feature of TSE not TGE. Sure you could potentially create your own renderable object using the fxRenderObject as a base but that seems unlikely in this case (not doubting anyones ability MutantStorm is one sexy use of Addative blending.. just seems like overkill).
How would you most easily go about doing something like this in torque? Could this grid be lit with a point light with some sort of falloff? Could the grid under the player be a dif object rather than a dts (which does seem to support multi-textures), where one bitmap is the grid and the other is the transparency, they total result of which is blended using addative rendering?
Thanks all in advance.
By looking at whats out there and trying to determine how to implement this in torque (easily), I hope to check my understanding of how it all works together.
#2
Is this already built into Torque?
01/05/2006 (5:51 pm)
Thanks Paul, but I still unsure how exactly you would implement the dynamic transparency. Is this already built into Torque?
#3
but not too much.
two ways immediately occur,
one is to just manually draw the grid via dglDrawLine,
computing the location of lines and their transparency.
the other would be to use multitexturing
with a grid texture for detail texture
and alpha for falloff,
and dynamically calculating an offset for the detail texture
so that the grid appears fixed to the environment instead of the player.
personally i'd go for the first method,
but that' jsut 'cause i'm not very familiar w/ torque's multitexturing.
01/05/2006 (6:08 pm)
I think this would require a little openGL programming in C++,but not too much.
two ways immediately occur,
one is to just manually draw the grid via dglDrawLine,
computing the location of lines and their transparency.
the other would be to use multitexturing
with a grid texture for detail texture
and alpha for falloff,
and dynamically calculating an offset for the detail texture
so that the grid appears fixed to the environment instead of the player.
personally i'd go for the first method,
but that' jsut 'cause i'm not very familiar w/ torque's multitexturing.
#4
01/05/2006 (6:19 pm)
MutantStorm isn't torque (in case you didn't know)
#5
Josepth: No I didn't realise. The GarageGames logo at start up and that the game is sold here made me think the connection was stronger than that of a publishing one. That said It doesn't change anything, as I still remain curious at to what is already in the TGE to handle that kind of effect.
01/06/2006 (5:31 pm)
Thanks Orion, I didn't even consider just using dglDrawLine. It was so simple it was completely off my radar - brilliant!.Josepth: No I didn't realise. The GarageGames logo at start up and that the game is sold here made me think the connection was stronger than that of a publishing one. That said It doesn't change anything, as I still remain curious at to what is already in the TGE to handle that kind of effect.
Torque Owner Paul /*Wedge*/ DElia