Eric Posted September 1, 2011 Share Posted September 1, 2011 Can some one point me in the right direction to make a Laser Beam/Tractor beam effect... A glowing beam looking thing. Do coronas actually work.. What do I need to do? Because I can't seem to get them to show up. Do I have to use the Framework? "Create Framework" I don't use it. Any help on this effect would be greatly appreciated. Thanks in Advance. Eric Quote Link to comment Share on other sites More sharing options...
Naughty Alien Posted September 1, 2011 Share Posted September 1, 2011 ..easiest way to create laser beam is to create quad on runtime and scale it up as it fits your design, then simply paint it by animated texture with proper blending mode, and you are set...texture size for such thing (laser) can be rather small and by having them scalled up together with corresponding quad will make them a bit blurry what is actually, more than welcome for such thing as laser beam..other way to do it is trough custom made shader where everything will be done in runtime, including beam itself (no texture anymore), but it will require some shader writing skills, so i guess first one is more than enough, considering that artists should be able to easy modify/tune eventual media for laser or beam of any kind, rather than making shader api to do such thing.. Quote Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted September 1, 2011 Share Posted September 1, 2011 That sounds like a good method Naughty Alien. Below is a rough guide as to how I would go about it. 1. Convert gun pointing foreward local vector (0,0,1) to global coordinates using TFormVector( TVec3 Vec3(0,0,1), TEntity Gun, 0) http://www.leadwerks.com/wiki/index.php?title=Entities#TFormVector 2. Create a cube or quad and use AlignToVector() command to align it to the vector that we determined in step one. 3. Scale the cube or quad along the vector.. you will also have to shift it along the vector as well so that it starts at the gun and is not centered on the gun. You may have to use raycasting to determine how much scale and shifting you need though it would be a semi long explanation so I'll let you figure that out. 4. Apply material and make a shader (personally dunno how myself) to make the glow effect. Anyway thats something how I would approach it. Hope it helps Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
Laurens Posted September 1, 2011 Share Posted September 1, 2011 I second Ken's approach. That's how I'm drawing the sort of energy link between power nodes. It's like a laser beam as well, and it doesn't require Framework. Quote Link to comment Share on other sites More sharing options...
Eric Posted September 1, 2011 Author Share Posted September 1, 2011 I will work on this...Thanks for the Ideas. I have to admit I'm a novice so if there is code examples you can share.. please let me know @ Laurens Would you share your code? Quote Link to comment Share on other sites More sharing options...
Laurens Posted September 1, 2011 Share Posted September 1, 2011 Sure, I won't be home until saturday though. I'll dig it up as soon as I get back. It's in C++ but the engine commands are the same, I hope that's ok. Quote Link to comment Share on other sites More sharing options...
Eric Posted September 1, 2011 Author Share Posted September 1, 2011 Yeah, Actually I just downloaded Visual C++ 2010... Can't seem to get it set up properly though. But in any case, I can certainly convert it to Blitzmax. I do want to start to learn C++, It can't be that hard. Thanks for your offer. Eric Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.