laser bolts

A while back, I posted a question regarding
an effect for laser bolts, in a space game.

The answer I got, satisfied me at the time,
but now I suspect the chap who replied, was doing fixed bolts eminating from guns
to a distant target. This is straight forward
as the laser bolts will always be at the correct angle for the viewer to see them.

What I want to do, is have moving blended laser bolts.

The initial solution proposed, was to use texture mapped quads, with a repeating texture on them to get the effect. And this works great to a point…

This also leads to a difficult problem, as there are certain viewing angles where the quad is not visible.

Check out these screenshots: http://www.dodgyposse.com/images/laser1.jpg http://www.dodgyposse.com/images/laser3.jpg

I tried to get my head around the maths for ‘billboarding’ the texture, but this is no ordinary billboarding problem…
( Billboarding presents the texture so that is is always perpendicular to the viewing vector…for those who are puzzled by that remark )

Does anyone have any ideas how to ensure the laser bolt is always visible?

dd

See “Billboarding around a specific vector ?” by PocketMoon.

– Zeno

Rather than type it up in ASCII, I drew something very quickly and put on my website.
http://www.b500.com/~hplus/laserbolt/

Warning: crude programmer art!

It’s not that bad And it’s not too bad an idea either… I suppose I should try that…? :stuck_out_tongue:

And dodgyposse, just a suggestion, but it helps the visual quality a bit if you turn on bilinear filtering… (or used mipping, but that’s not necessary on a laser bolt like that) )

Oops, did I say that??

> > Warning: crude programmer art!

> It’s not that bad

If you saw the output of the artists at the place I work, you would realize that it is :slight_smile:

Just like I won’t let artists come within ten feet of my mesh skinning code, whatever I can crank out of Photoshop or 3dsmax within finite time is still not worthy. Specialization is a Good Thing ™.

Originally posted by dodgyposse:
I tried to get my head around the maths for ‘billboarding’ the texture, but this is no ordinary billboarding problem…
( Billboarding presents the texture so that is is always perpendicular to the viewing vector…for those who are puzzled by that remark )

i’m sorry, but why isn’t this an ordinary billboarding problem?


Does anyone have any ideas how to ensure the laser bolt is always visible?
dd

my suggestion would be to use billboarding. if you want to get an idea of what it looks like (and some code), you can check out a project i’m doing that does billboarding at glfold.sourceforge.net

[This message has been edited by idiot (edited 06-02-2001).]

[This message has been edited by idiot (edited 06-02-2001).]

> i’m sorry, but why isn’t this an ordinary billboarding problem?

Because when you view the bolts edge-on, a billboard would thin to nothing and disappear. You don’t have that problem in your app because you terminate each strand with a big round blob, so in the edge-on case (or close to that) the blob will obscure the billboarded quad.

I downloaded this Screen Saver a few months ago and it just may have your answer.

Check out the exhaust on the Fighters in the “3dflyingsaver V1.0” screen saver located at http://www.3dscreensaver.com/.

It has two billboards that are perpendicular to one another.

That is a brilliant solution…

If you align the two billboards, so they create a cross, and make their textures symmetrical, no matter where you look at them, they will look like a laser bolt…

dd

dodgy,

If you look at a cross from the “top” (head-on) it will not look like a bolt. You need to add end caps in addition to the cruciform bolt. Might be easier to just billboard the end flaps and use a single quad for the bolt (that’s billboarded vertically and horizontally but not in depth axis).