Energy bolt representation

Started by
22 comments, last by Lord_Evil 14 years, 11 months ago
Everyone here is missing the point.

I was suggesting a method for laser beams, not "particles".

The main idea is this:

render a cylinder mesh for a laser beam to a render target. Then you blur this and then additively blend the texture over the scene. Then you get perfect beams with very little work.
Advertisement
No. Aside from being a stupid amount of GPU work for a simple effect, it has the extra problem that it's not going to sort correctly.
Sorting can be done using a depth texture which any decent renderer should have available.

Its not "stupid"...modern GPUs should be used. Is it ideal for the original poster? I dont know. He doesnt have to use it.
Thank you all for your input. ^_^

First of all, my apologies for the delay in my response - I was away from the internet yesterday, I'm afraid. ^^;

As to the use of shaders or separate render targets, surely a geometric solution, perhaps including some form of billboarding, would be simpler than rendering to a separate target, blurring it, and then blending that over the main render target?

I believe that I should have access to shaders and separate render targets; I'm just loath to do so without first looking for a solution that better suits me. ^^;

It also occurs to me that the separate-render-target-and-blurring technique is likely to be slower than geometry-and-additive-blending on at least some cards; while these may not be in the majority any more, might it not be preferable to look for a solution that might work in those cases, if it seems that one should be available?

As to the suggestion of an axis-oriented three-billboard solution, as suggested by Lord_Evil, I've considered it further and have come up with situations in which it seems to me that the illusion should break down, such as from angles of incidence that are too high (in which case the end-pieces should seem to become very thin, until disappearing at 90 degrees). Additionally, I doubt that it would be effective for a bolt that didn't have semi-circular ends (such as one that tapers quite a bit).

Thank you, however - it was worth investigating, at least. ^_^

Quote:Originally posted by zedz
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)


Unfortunately, I've tried that, and, unless I implemented it poorly in some way, I found the flatness of the billboard to be quite apparent to me. :/

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

>>
Unfortunately, I've tried that, and, unless I implemented it poorly in some way, I found the flatness of the billboard to be quite apparent to me. :/

yes it is noticable for static stuff but u will find lazers etc move quickly across the svreen thus the player shouldnt notice it (youre looking erhaps through the critical eyes of a developer)
Well, the end parts of the billboard should always face the user, so even if the user looks at it at 90 degrees you should fully see them (it appears as a circle made of both "end" billboards then).

If the bolt tapers a bit, it shouldn't be a problem to have one end be bigger than the other.
Only around the 90 degree viewing angle the solution might break. In that case you could consider of making the smaller end as big as the bigger one (maybe taking perspective/z-divide into account).
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
Quote:Originally posted by Lord_Evil
Well, the end parts of the billboard should always face the user, so even if the user looks at it at 90 degrees you should fully see them (it appears as a circle made of both "end" billboards then).


Aah, I see - I think that I perhaps missed this the first time. ^^;

Hmm... Well, I still have some misgivings, but I think that I probably will give it a shot, at least.

As to tapering, if the taper is too high (and I tend to prefer tapered bolts to rod-shaped bolts, I think), then at near-to-zero angles of incidence one should see something pointy, rather than the expected round profile, it seems to me.

(My apologies if it seems that I'm "moving the goalposts" a bit in this thread - perhaps I should have been rather more specific about my intentions in the original post, at the expense of risking greater length...)

Quote:Originally posted by zedz
yes it is noticable for static stuff but u will find lazers etc move quickly across the svreen thus the player shouldnt notice it


Unfortunately, as I recall I did try it in motion. :/

Quote:Originally posted by zedz
(youre looking erhaps through the critical eyes of a developer)


This, admittedly, is quite possible. ^^;

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

http://developer.download.nvidia.com/SDK/9.5/Samples/samples.html
look for -> cg volume lines

>>Unfortunately, as I recall I did try it in motion

post a screenshot, in white wireframe on a black background
the best thing to do is run up quickly a little demo app that draws a lazer to screen + then lets u rotate around this lazer looking at it from many angles
Quote:Originally posted by zedz
http://developer.download.nvidia.com/SDK/9.5/Samples/samples.html
look for -> cg volume lines


That's quite an interesting idea - thank you for pointing me to it. ^_^

Quote:Originally posted by zedz
the best thing to do is run up quickly a little demo app that draws a lazer to screen + then lets u rotate around this lazer looking at it from many angles


Heh, I do indeed do that sometimes when experimenting with various energy bolt types - since my game already allows movement in 3D, and has controls that make it reasonably easy for me to fly around the bolt, I just alter the weapon that fires the bolts to create unmoving (or very slow) bolts that last for a long period of time. ;)

As to a screenshot, I may well try to remember to do that on Tuesday (the place from which I'm posting today is going to close soon, I think, and Monday is a public holiday here).

Thank you! ^_^

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

(My apologies that this is a double-post; I thought it better to double post and make the update apparent than to risk it slipping by.)

Update:
I think that I've found something that I'm happy with. ^_^

Specifically, what I've settled on is essentially Lord_Evil's suggestion, but with a single billboarded circular sprite in the centre of the bolt rather than two at the ends. The result does produce a single pair of "rays" at low angles of incidence, and a "blob" in the centre near 90 degrees, but I find the latter to be not unpleasing, and the former to not be as disagreeable as two pairs, as I had earlier. Overall, the solution seems to work fairly well. ^_^

Thank you to all who helped! ^_^

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

This topic is closed to new replies.

Advertisement