Jump to content

Home

How to get dynamic lighting from weapons.


Darth Bastard

Recommended Posts

Hey all. I was just tinkering around with JKO this weekend, editing the kyle model so I could play the sp game as Darth Maul, that sort of stuff. (And might I add, it is kinda funny to see Darth Maul sitting and chatting with Mon Mothma in the cutscene.) Anyway, I was looking around some of the .cfg and .dat files and found and interesting one. If you unpack your pk3 files, you will notice a folder titled ext_data. Within that folder is a file called weapons.dat. If you open it up in wordpad, the first thing you will notice is that all of the weapons info pertains to Voyager Elite Force. Ignore it and scroll down aways. A little lower you will find the configurations for all of the weapons in the game. (I'm sure some of you out there have already discovered this, so it's old news.) Anyway, I noticed a setting for the missile launcher that added the glow from the missile exhaust. I thought to myself, "hmm... if the missiles can put off a glow, certainly the blasters can too." So I copied the code from the missile launcher into the blaster, (and other weapons) and viola! now my blaster bolts light up the area around them. :) For anyone who wants to try this, here's the code to insert into each of the weapons:

 

missileLight 125

missileLightColor x x x

altmissileLight 125

altmissileLightColor x x x

 

The missile light can be adjusted as you like, depending on how bright you want light put off by the weapons to be, but I've found that 125 works pretty well. (If you use a red light for the E-11, you might want to bump this up a little, as the red tends to be a little dim.)

 

The x x x in the missileLightColor correspond to Red, Green, Blue. The values range from 0.0 to 1.0, depending on how much of each color you want put in. For example:

 

missileLightColor 1.0 1.0 0.5 will give you a yellowish light, perfect for the Bryar pistol.

 

MissileLightColor 1.0 0.0 0.0 will give you a red light, perfect for the E-11.

 

missileLightColor 0.0 1.0 0.0 = Green

missileLightColor 0.0 0.0 1.o = Blue

 

You get the idea.

 

Anyway, it was kinda cool watching the color reflect off of the white stormtrooper armor as they fired at me. And for those of you who play with volumetric shadows on, the shadows will react to the lights put off by the weapons. I fired at stormtrooper and missed slightly, but as the bolt whizzed past him, his shadow was thrown forward by the light from the blaster bolt.

 

Anyway, I hope ya like it!

 

Darth Bastard

Link to comment
Share on other sites

Interesting... just working on a fully cyan lightsaber, and this might be the way how to get at least the light reflection on the floor to the proper color.

 

Still you don't happen to know a way to control the lighsabers "trail" color as well? It isn't in that file you mentioned, but thanks anyway, this might be a step into the right direction. :)

 

Digital_Ronin

Link to comment
Share on other sites

Unfortunately, no. I couldn't get it to work with the lightsaber. :( Also, one thing to keep in mind, is that the light put off by the weapons is just light the light put off by the lightsaber already, only a little brighter. While you can see the light reflecting off of walls and the floor in lit areas, they still doesn't light up places that are truly dark, and that bugs me to no end. (Damn the limitations of the Quake III engine!) Also, in areas where colored lighting is used extensively, its really hard to see the light that the weapons put off. However in most areas, it works just fine. When I first figured out how to do it, I was in the detention area on Nar Shaddaa. I just sat there firing down the dim hallway, watching the light from the blaster bolts light up the walls and the floor. It was really cool effect. It seems that as long as there's SOME light in the level, the bolts do a pretty good job of casting a glow around them. It's just when the lighting for an area is really dim (or non-existent) that you notice that they won't light up the area around them.

 

Again, it sucks about the lightsaber not really putting off light. I imaging that will have to come in the form of a patch from Raven, if they can figure out how to get the game engine to handle it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...