Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Akalabeth Angel on September 08, 2009, 10:57:29 am

Title: Beams alternate shapes?
Post by: Akalabeth Angel on September 08, 2009, 10:57:29 am
Can ship and/or fighter beams be something other than straight lines?

I'm thinking arcs of lighting ala Battletech PPCs. The beams would have a very short duration. Maybe a person could even do a few frames of different shapes for animation??
Title: Re: Beams alternate shapes?
Post by: Dragon on September 08, 2009, 05:40:33 pm
I think it may be possible with a bitmap representing the arc, which would have been streched over entire lenght of the beam.
I see no other way to do this, assuming you don't want to mess with either scripting or code.
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 08, 2009, 05:59:35 pm
How do the beams' FX look like in the VPs?
Title: Re: Beams alternate shapes?
Post by: Enigmatic Entity on September 08, 2009, 06:22:17 pm
Wasn't there some animated effects for the "lasers" at some stage? If there was, you could create a really long laser (which would look weird, since the back end would protrude behind the ship at t=0), or alternatively, one with a long, 100% bright trail that ends suddenly (if lasers can have trails. Maybe it will have to be a missile).
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 08, 2009, 06:26:53 pm
He wants to make a PPC effect. Not sure if you've played MechWarrior, but a PPC has always been described in the novels as a 'white-blue blast of lightning', and the later games portray it as such.
Title: Re: Beams alternate shapes?
Post by: FUBAR-BDHR on September 08, 2009, 06:58:41 pm
TBP has the Vorlon Lightning cannon so it should be at least partially possible.
Title: Re: Beams alternate shapes?
Post by: Spoon on September 08, 2009, 07:02:29 pm
In theory I think it might very well be possible

Code: [Select]
$Section: ;; one section of the beam (you can have up to 5
+Width: 10 ;; width of the section
+Texture: beam-red ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.0 ;; how much it flickers (0.0 to 1.0)
+Zadd: 4.0 ;; hehe
$Section: ;; one section of the beam
+Width: 15 ;; width of the section
+Texture: beam-green2 ;; texture for this section
+RGBA Inner: 160 160 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 60 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.45 ;; how much it flickers (0.0 to 1.0)
+Zadd: 3.0 ;; hehe
$Section: ;; one section of the beam (you can have up to 5)
+Width: 25.0 ;; width of the section
+Texture: beam-green ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.4 ;; how much it flickers (0.0 to 1.0)
+Zadd: 2.0 ;; hehe
$Section: ;; one section of the beam
+Width: 30.0 ;; width of the section
+Texture: beam-green3 ;; texture for this section
+RGBA Inner: 255 0 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 0 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.5 ;; how much it flickers (0.0 to 1.0)
+Zadd: 0.0 ;; hehe

If you have several sections with different textures of different sizes you could create something that might look somewhat lighting like. Just have to create lighting shaped beam textures. Might not be that easy to get it to actually look right though
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 08, 2009, 07:08:46 pm
The things is that unlike beam textures, when making a lightning texture you'll probably have to keep in mind how it might look when fully stretched out. So if you're making a lightning texture you'd probably do it full-length and just shrink it length wise until its the right texture size.
Title: Re: Beams alternate shapes?
Post by: Scooby_Doo on September 08, 2009, 08:30:49 pm
Can't you also have the beam texture repeat, so it doesn't look as stretched out?
Title: Re: Beams alternate shapes?
Post by: Aardwolf on September 08, 2009, 09:36:14 pm
You could probably do that better with a missile + trail (a kind of spruced-up Shivan Super Laser effect)
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 08, 2009, 09:58:10 pm
Can't you also have the beam texture repeat, so it doesn't look as stretched out?
How do you do that? I've messed around with the beams before with Shadow Gorrath's help and succesfully created a black beam before, but that didn't use repeating textures.

You could probably do that better with a missile + trail (a kind of spruced-up Shivan Super Laser effect)
Yea, but I somehow feel that that'd be a last resort.
Title: Re: Beams alternate shapes?
Post by: Nuke on September 08, 2009, 10:33:52 pm
what would look awesome is to take the nebula lighting effect, and make it a weapon.
Title: Re: Beams alternate shapes?
Post by: Akalabeth Angel on September 08, 2009, 11:29:10 pm
TBP has the Vorlon Lightning cannon so it should be at least partially possible.

Oh it does? I'll have to look into that. Though hopefully it's not just on the DN since I've heard from an "interesting debate" that the ship has issues.
Title: Re: Beams alternate shapes?
Post by: FUBAR-BDHR on September 08, 2009, 11:35:40 pm
Not any more it doesn't.  Anyway it's on the VE Fighter. 
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 08, 2009, 11:48:39 pm
Can we use the lightning cannon as a reference if the need arises?
Title: Re: Beams alternate shapes?
Post by: FUBAR-BDHR on September 09, 2009, 01:02:52 am
Yea.  You just can't use the actual stuff in any release unless it's for TBP.  Don't have the rights to give that out. 
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 09, 2009, 01:04:22 am
Kay. That'll be all I need. Thanks.

Can you PM it to me? My TBP VPs aren't on hand atm.
Title: Re: Beams alternate shapes?
Post by: Wanderer on September 09, 2009, 02:16:15 am
Texture repeats on beam sections, see tile factor in beaminfo section of weapons.tbl (http://www.hard-light.net/wiki/index.php?title=Weapons.tbl#.24BeamInfo:)
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 09, 2009, 02:54:41 am
Quote from: Wiki
Tile Factor:

    * Defines the beam texture tileing factor. Second number defines the tileing type. Type 0 tiles the graphic in the beam as many times as defined by the 1st number. Type 1 uses the 1st value as the lenght of the tile.
    * Syntax: Float, Integer
What does it mean by 'Type 1 uses the 1st value as the length of the tile'?
Title: Re: Beams alternate shapes?
Post by: FUBAR-BDHR on September 09, 2009, 02:56:01 am
You can grab it here:  Lightning Cannon (http://fubar5.fubar.org/tbp/VE_Lightning.rar)

That's the weapons table and the effects.
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 09, 2009, 03:05:35 am
Groovy. Thanks, mate.
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 09, 2009, 07:20:21 am
So the Lightning Cannon is basically a re-textured, 2 second beam. It still fires 'straight', so to speak.

I don't think that it's possible (without changing code) to have a curving beam.
Title: Re: Beams alternate shapes?
Post by: Akalabeth Angel on September 09, 2009, 08:18:59 am
Oh sorry hahaha. I think I got everyone confused.
When I said "arcs" of lightning I just meant have a straight-firing beam but a different shape instead of  a straight line. The idea being to have a "particle cannon" weapon which are sometimes depicted as looking like lightning. So the lightning cannon will work well enough I think (modified of course), though I've yet to see it in action since none of the campaigns I've played have made use of it.



Still the research could be applicable to other mods. Might be cool to have some sort of curving direct-fire weapn.
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 09, 2009, 09:17:30 am
Well, as far as lightning beam goes, I have an idea how to do it. Though I'm not really succeeding in making the texture 'backgroundless'. If I can solve that, you should have your tesla beam.
Title: Re: Beams alternate shapes?
Post by: JGZinv on September 09, 2009, 09:33:58 am
Bax and I discussed 2 or 3 ways to accomplish making a beam that changes direction mid stream,
just a matter of not having enough time between RL to work on them.

Just tossing that tidbit in there.
Title: Re: Beams alternate shapes?
Post by: Aardwolf on September 09, 2009, 02:58:12 pm
So, something like Descent 3's "Omega Cannon" ? (not quite the same as D2's)
Title: Re: Beams alternate shapes?
Post by: Wanderer on September 10, 2009, 10:20:07 am
Quote from: Wiki
Tile Factor:

    * Defines the beam texture tileing factor. Second number defines the tileing type. Type 0 tiles the graphic in the beam as many times as defined by the 1st number. Type 1 uses the 1st value as the lenght of the tile.
    * Syntax: Float, Integer
What does it mean by 'Type 1 uses the 1st value as the length of the tile'?
A bit late answer but still... Type one (ie. if the second value was 1, for example 25, 1) spreads the texture so that yeah texture tile is 'float' units (from the example this would be 25 units - meters?) long. On the other type there are set amount of tiles spread over the whole texture, which as beam length may vary could look rather interesting. Default beam draw uses single texture tile spread over the whole beam (by default 30 000 units long).
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 10, 2009, 10:43:52 am
So; type 1 just streches the beam texture, necessitating only a single texture, but type 2 repeats the tile X number of times?
Title: Re: Beams alternate shapes?
Post by: Spoon on September 10, 2009, 12:33:25 pm
Wouldn't tiling on beams give better visual quality?
Title: Re: Beams alternate shapes?
Post by: headdie on September 10, 2009, 02:22:20 pm
He wants to make a PPC effect. Not sure if you've played MechWarrior, but a PPC has always been described in the novels as a 'white-blue blast of lightning', and the later games portray it as such.

the way the games tend to depict PPC is a cluster of 3-5 blue/white streams with a slight corkscrew and the occasional stray lightning bolt with an impact like an exploding lightning ball
Title: Re: Beams alternate shapes?
Post by: Wanderer on September 10, 2009, 02:41:26 pm
So; type 1 just streches the beam texture, necessitating only a single texture, but type 2 repeats the tile X number of times?
No..

Type 0 stretches the texture to fit to the beam the number of times defined in the first number of the tile factor input, type 1 repeats the tile in specified length as many times as it is required regardless of the beam length.. There should be no other types (anything larger than 1 defaults to 0)
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 10, 2009, 08:21:11 pm
the way the games tend to depict PPC is a cluster of 3-5 blue/white streams with a slight corkscrew and the occasional stray lightning bolt with an impact like an exploding lightning ball
The MW4 one always looked like a blast of lightning to me, and let's face it; making it look like lightning is just plain cool.
Title: Re: Beams alternate shapes?
Post by: General Battuta on September 11, 2009, 01:16:03 am
MW3 one was best!
Title: Re: Beams alternate shapes?
Post by: Akalabeth Angel on September 11, 2009, 02:45:35 am
I haven't played either game. Only BT games I played were #1 and #2. Oh and Crescent Hawk's series.

This isn't even for battletech. For something complete unrelated but a mod that may benefit from it. Assuming it's a mod I pursue.
Still lightning guns are cool in any genre. What I might try to eventually implement is a narrow beam with lightning guns around it. Such that the regular shot is a beam but its secondary effect is the lightning. Not that it makes any sense in space but I can't be bothered to care about such things.
Title: Re: Beams alternate shapes?
Post by: NGTM-1R on September 11, 2009, 02:59:21 am
To be honest a directed lightning arc (laser guide beam, for example) looks exactly like retail beam textures in white. An undirected arc is probably beyond the ability of the engine because, well, lightning, angles and stuff.
Title: Re: Beams alternate shapes?
Post by: Getter Robo G on September 19, 2009, 05:16:24 am
I played with diff "type " of beams that repeat.
These were attempts at new primary weapons but just used a BFRED table for the hell of it.
Due to amount I posted links instead of thread images.

Musical notes (sucked!!!)
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/noteweapon.jpg

yellow plasma
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/flamepulse.jpg

Hotter plasma
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/ypartpulse2.jpg

Inferno
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/hotstuff.jpg

bluewave
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/sctesta.jpg

twinfire
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/blackflame-1.jpg

BORG test
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/borgbeam.jpg

RED lightning
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/rlighttest.jpg

BluePlasma2
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/bpartpulse.jpg

Hot particle
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/bullet1.jpg


Ultra white
http://i22.photobucket.com/albums/b321/Star-Dragon/Test%20Concepts/gpulsewhite.jpg



Hope these images are somewhat useful for you for ideas.
none of these were animated, yet, they are all static.


My pride and joy, Macross Cannon test:

http://i22.photobucket.com/albums/b321/Star-Dragon/Humor/sbmoviepromo1.jpg
Title: Re: Beams alternate shapes?
Post by: Stormkeeper on September 19, 2009, 09:55:51 am
I made a musical note cannon. Although it was by accident, and it was only the tail that made them look like notes.
Title: Re: Beams alternate shapes?
Post by: JGZinv on September 19, 2009, 01:25:28 pm
The red lightning and musical note beams were nice.
Title: Re: Beams alternate shapes?
Post by: sigtau on September 19, 2009, 02:12:37 pm
Red lightning would look nice as a Shivan beam.
Title: Re: Beams alternate shapes?
Post by: Snail on September 19, 2009, 02:51:29 pm
In all honesty, they look pretty cool to me...