Lightning/laser/electricity
by Very Interactive Person · in Torque Game Builder · 01/16/2007 (1:49 am) · 5 replies
How would I make a lightning/laser/electricity/tesla effect in TGB? Creating a path and sending a particle effect over it very fast? Or make a couple of animated sprites and position and rotate? Or? I don't see any built in components capable of doing something like this... or am I overlooking something?
Any ideas?
Any ideas?
#2
Just did a search on google, and I found this, this looks a bit like what I'm trying to do:

I'm talking about a single beam (In the pic there's more then 1). It goes from point A to point B, but its not a straight line. Its jagged.
01/16/2007 (2:35 am)
I know... but I don't want a straight horizontal or vertical line. I want something that looks more like lightning.Just did a search on google, and I found this, this looks a bit like what I'm trying to do:

I'm talking about a single beam (In the pic there's more then 1). It goes from point A to point B, but its not a straight line. Its jagged.
#3
In that case I would do it in source and create a polygon which follows the lightning line, using the texture and some wave function that modifies the vertex UVs so it seems like flowing.
01/16/2007 (9:31 am)
Hmm ok that would be a little more complicated.In that case I would do it in source and create a polygon which follows the lightning line, using the texture and some wave function that modifies the vertex UVs so it seems like flowing.
#4
[edit] I totally LOVE tesla coils... so pretty.
01/24/2007 (11:43 am)
I would either write a custom render object or still go with a particle solution. You could draw different kinds of lighting bolds and then make them emit with no velocity, in a point with a random angle. That would give you a pretty neat plasma ball.[edit] I totally LOVE tesla coils... so pretty.
#5
The program should move those nodes violently every few milliseconds (or whatever time you design). The source and destination stay the same. You might want to move all the points relative to one another with a little bit of randomness, or just randomly. The first will look like a controlled laser beam of lightning. The second will look more like a Tesla coil thing.
From point to point, you'll want to put a sprite that looks like a "piece" of lightning. You can probably use the Torque default lightning, or at least use it in order to draw your own.
01/27/2007 (11:08 pm)
I did a little research on this, too. The geometry of the lightning effect is to take a point mid-way between source and destination and move it, then to take the points mid-way between those and move them, then the 4 points between all those poinst and move them, etc. The more points you work with, the more detail you have. There are lightning emmitters--I found it on google somewhere--with the source. With a programming knowledge, these can be coded into your game. Every node can also have a little spike that shoots off from it.The program should move those nodes violently every few milliseconds (or whatever time you design). The source and destination stay the same. You might want to move all the points relative to one another with a little bit of randomness, or just randomly. The first will look like a controlled laser beam of lightning. The second will look more like a Tesla coil thing.
From point to point, you'll want to put a sprite that looks like a "piece" of lightning. You can probably use the Torque default lightning, or at least use it in order to draw your own.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft