# Energy bolt representation

This topic is 3491 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm currently working on a small space-like shooter (in the first-person and a 3D environment), and seem to have hit a bit of a snag. In other games of this type I'm sure that I've seen some quite effective representations of "energy bolt"-like weapons - that is, bright "darts" of light - and I would like to include something similar in my game. I've considered a number of options, but nothing yet has seemed to produce the desired effect. Some of the most prominent ideas that I've entertained have been:
• Axial billboards
• The billboard's flatness is fairly apparent at low angles of incidence (such as just after firing), as the billboard rotates only about the axis of its velocity.
• Particle trails
• I find them to not be very effective for representing a cohesive whole, as opposed to a, well, particulate trail.
• 3D geometry
• Slightly awkward to create a blurred edge and internal "glow"; I imagine that it could be done in a shader, but I'd rather not for this project - surely there's a simpler way?
• (Three or six (depending on whether back-face culling is enabled or not) quads aligned with the base axes of the projectile, each textured with an appropriate image and rendered additively.)
• Tends to produce a lobed or rayed effect at some angles of incidence.
I did consider a few other ideas, including a half-bolt constructed in 3D, hollowed away from the player, aligned axially and textured with a fuzzy image, or 3D geometry textured with a fuzzy image and using texture coordinates that are calculated from update to update, but, while the latter might actually work, both seem like overkill to me. I'm currently using the last of the list that I gave above (axis-aligned quads); it's the best that I've come up with thus far, producing a decently volumetric effect and working for a number of angles. That said, I don't seem to recall having seen the lobe- or ray- effect in other games, and so suspect that I might be missing some other technique. Searches have thus far availed me little, but that may well be due to poor keyword selection on my part. Does anyone have any suggestions, and if so, what are they, please? My thanks for any help. ^_^

##### Share on other sites
I don't remember the correct term nor any links to tutorials on the web, but one way of doing it is using "capped" axial billboards.

Basically you use a billboard but draw additional quads that face the camers at bot ends.

Something like that:
      ___    /|   | _ / |   || |  |   ||_|  |   |   \ |   |    \|___|

The left portion is the far end of the beam, the right one is the near end.

Maybe someone can elablorate a bit more on that and/or provide a link.

Hope that helps.

##### Share on other sites
why not render a mesh like a cylinder to a render target, blur it and change color then additively blend it over the scene? Then you could get perfect beams that look good from all angles.

##### Share on other sites
Thank you both for your replies. ^_^

Lord_Evil, your idea looks interesting, and worth exploring - I haven't yet considered it carefully, but I'll probably give it a shot. A quick search of both this site and the 'net didn't turn up any useful-looking links for "capped axial billboard", but I think that I have a sufficiently clear impression at this point - it seems fairly straight-forward.

Matt Aufderheide, that would probably work indeed, but it seems a little like overkill, for my purposes, at least - surely this task is simpler than that?

##### Share on other sites
I dont see why its overkill, or why it would be difficult..its seems like the easiest to me...

##### Share on other sites
the method lord evil said is one way
though watch out u must take care of what texture u use for the energy bolt, its a bit of mucking around in an image program

personally though first Ild ignore the two end billboards, i.e. just use the center axial billboard which looks ok in 99% of cases (which may be ok for your needs)

##### Share on other sites
Quote:
 Original post by Matt AufderheideI dont see why its overkill, or why it would be difficult..its seems like the easiest to me...

Would it still sound like the easiest if you were developing on a GBA? It's doubtful that he's got shader or off screen rendering support and or is Fillrate / memory bound.

##### Share on other sites
Quote:
Original post by bzroom
Quote:
 Original post by Matt AufderheideI dont see why its overkill, or why it would be difficult..its seems like the easiest to me...

Would it still sound like the easiest if you were developing on a GBA? It's doubtful that he's got shader or off screen rendering support and or is Fillrate / memory bound.

Where does it say he's developing for GBA?

##### Share on other sites
Quote:
Original post by Matt Aufderheide
Quote:
Original post by bzroom
Quote:
 Original post by Matt AufderheideI dont see why its overkill, or why it would be difficult..its seems like the easiest to me...

Would it still sound like the easiest if you were developing on a GBA? It's doubtful that he's got shader or off screen rendering support and or is Fillrate / memory bound.

Where does it say he's developing for GBA?

It doesn't say it anywhere, but that doesn't make it any less a valid answer to your question.

A more applicable one is that rendering of a cylinder for each and every particle is overkill due to the vertex bandwidth and extended number of draw calls (not all current hardware supports instancing yet, remember). Just because it seems easy to implement doesn't mean its efficient.

(edit, fixed typos. its too early in the morning for me to contribute here while at work)

##### Share on other sites
the problem with a mesh for a lazer bolt is not cause its overkill
but because its gonna look visually worse, unless u do some fancy shader

see the nvidia developer website IIRC theres another technique (where the use a collection of images for the lazer + then chose which one to use depending on the incidence angle)

1. 1
Rutin
73
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633424
• Total Posts
3011806
• ### Who's Online (See full list)

There are no registered users currently online

×