Plasma Beams (like in Halo and Halo 2)
Blitz3D Forums/Blitz3D Programming/Plasma Beams (like in Halo and Halo 2)
| ||
OK - I posted this at my own website, I don't really know why. Although I've opened it up to guests. You can reply without registering. (And feel free to put your code in the "Algorithms" section. Here's the link: http://noenemies.proboards34.com/index.cgi?board=advanced&action=display&num=1104116654 |
| ||
Well, if you take the Plasma Gun in Quake 3 for example, that used sprites for the projectiles, and I believe this was also the case in Halo 2. I don't know any specifics, but I'm pretty sure the plasma is a tiled sprite; tiled to make a sort of 'beam', if you will. I assume you're talking about the effect seen with the Scarab's beam cannon (Halo 2) and the distress beacons (Halo). I don't think the Sentinel Beams in Halo 2 were done differently. EDIT: Oh, the plasma rifles (aka the standard weapon for the Elites) did use sprites for the projectiles. If by "sprites wouldn't look right" you mean simple alpha blending will look too dull, use the EntityFX(sprite,3) command which sets the specified entity to be rendered with addictive blending. Plasma, hoy! |
| ||
ok |
| ||
addictive blending? |
| ||
lol @ WolRon. You may need to use a couple of sprites with additive blending to get it looking bright enough. Remember and set the sprites to FULL BRIGHT also. Check this stuff i did a while back. The file called "lightning.bb" is a single beam of lightning. Could be used for a gun. It creates a cylinder mesh, and deforms it in real time. The other file called "lightningTYPES.bb" is the same thing, except i wrapped it all up in types so you can generate as many as you want. Each lightning beam is 2 surfaces, so don't generate too many ^_^. Converting to single surface soon :o) Arrow keys to rotate camera. "LightningTYPES.bb" the mousebuttons zoom in and out too. www.rosscrooks.pwp.blueyonder.co.uk/lightninggun.zip |
| ||
There's the only problem. I'm shooting lots and lots of them. As the in plasma rifles from Halo. But let's see what you got. |
| ||
Well, these are lightning beams. You shouldn't need lots of them, cause, it's like a constant beam. :o) |
| ||
Yeah - I'll probably use these lightning beams for another weapon. |
| ||
No problem. |
| ||
by "sprites wouldn't look right" I meant that they would always be facing the camera - and even if they weren't, they wouldn't look thick enough. |
| ||
You need to use 3 (or more) fullbrigt, doublesided quads that are intersecting like a star. Then you need a few animated lightning textures. You have to edit them so they tile vertically. Then you need to calculate the distance between the plasma impact and player. Use this distance to determine a static texture tile size, so depending on the distance you'll tile the texture on the quads, and of course also scale the quads based on that distance. Playing an animated texture on each quad, choosen and restarted randomly, will give you a nice plasma effect. but of course, needs to be additive blending. I wouldn't use real Sprites here since they are not that flexible and don't support fog. |
| ||
I'll try that.... |
| ||
Also, you might want to have a look at the 'Mega Blast' demo by "Reda Borchardt" in the 'Open DNA' folder of the B3D Samples folder. Might be something of use in there - The demo has a kind of 'plasma gun' look to it. |
| ||
Open DNA Folder????? Where do you see that? I don't think I got that? |
| ||
nope, definately not there.... could you e-mail a .zip to me, puki? steven@... |
| ||
It would also be good if you stayed with one nickname. NoEnemies DigitalFortress and now Optomistic. What's next? |
| ||
. |
| ||
@xmlspy: I know, I'm really bad about that :( Keep thinking of good nicknames that no one likes. :( Ah well...life goes on.... |
| ||
I got it to work using code from "TunnelRun" in Games. :) it works now. Thanks guys. |
| ||
Here's a little something I did: You'll need to grab that texture: |
| ||
nice one there GoSsE :D |
| ||
Great GoSsE!!!! You dont have a Nuclear blast also ?????? Please ? Alienforce |
| ||
All I see is a spinning gray cone. :( |
| ||
Hit lmb! to see some cool beems ;) /Alienforce |
| ||
ooooooooh, ok. |
| ||
Optomistic - here is an old program that I did in Blitz. Source code included. I made some changes to this a while ago, which are not in the download but look a lot better so let me know if you want them. http://home.swiftdsl.com.au/~gezeder/lloyd/SpaceBattle.zip Have a look at the beam.3ds object to get an idea of how it is done. |
| ||
Looks GREAT!!!! Do you have some more stuff? Alienforce |
| ||
OK, currently my computer won't start up because of some stupid hacker, so I'm using this old computer. So I'll take a look at it later, sorry. |
| ||
@ GoSsE Korupted I get Memory Access Violation.. |
| ||
Chad, have you put the image in the same folder as the source code? Nice effect, GoSsE. |