OpenArena Message Boards

OpenArena Contributions => Development => Topic started by: blz on March 05, 2007, 10:58:38 AM



Title: any torchlight - candle item available ?
Post by: blz on March 05, 2007, 10:58:38 AM
hi people,
I just tried oa and gtkradiant to build custom maps, sounds fun.
I'dl like to build underground networks. For now, I have to put some lights in the tunnels. Are there any light items that the players could size and use to light the unlighted tunnels ?
If not, would it be possible to build a custom weapon that produce some light but does'nt arm ?
thanks


Title: Re: any torchlight - candle item available ?
Post by: Czestmyr on March 05, 2007, 11:06:05 AM
This would require dynamic lighting and Im not sure, whether this can be accomplished in Quake3 engine.


Title: Re: any torchlight - candle item available ?
Post by: dmn_clown on March 05, 2007, 03:30:24 PM
hi people,
I just tried oa and gtkradiant to build custom maps, sounds fun.
I'dl like to build underground networks. For now, I have to put some lights in the tunnels. Are there any light items that the players could size and use to light the unlighted tunnels ?
If not, would it be possible to build a custom weapon that produce some light but does'nt arm ?
thanks

This isn't doom 3, the best we can do is quake 3 lighting.  Basically, no on both counts because all light entities are static.


Title: Re: any torchlight - candle item available ?
Post by: Taiyo.uk on March 26, 2007, 10:45:21 AM
Is it possible to implement a torch without full Doom3 style dynamic lighting? - How did the Half-Life torch work?


Title: Re: any torchlight - candle item available ?
Post by: sago007 on March 26, 2007, 11:00:18 AM
There is a bug in the engine that means that a surface without light on it cannot be lightened up by the semi-dynamic light that Quake 3 used.

As an example: Then a player is running with the flag he is emitting light but if he is in a dark room he no longer emits light.

It has been discussed on this board before and it is something that needs to be corrected in the engine and it is outside the scope of the Open Arena project. I read on map-center that it was one of the highest wishes the mappers had.

If it was easy it would properly already have been done.



Title: Re: any torchlight - candle item available ?
Post by: Caldiar on March 26, 2007, 12:28:37 PM
Not really a bug as much as the lighting method doing exactly what it was meant to do.

From what I understand the lighting method is multiplicative. One of the people over at Map-Center was asking for a switch to additive lighting to solve this problem.
I've been thinking about changing that as part of my current Q3 mod project. Maybe I'll make it a cvar that you can set so you can switch between the two lighting styles. 

And yes, dynamic lighting is a possibility in Q3 to an extent. You can see it in the form of the pool of light under the rockets and, as previously said, when carrying a flag. 
Take a peek at how they do that with those objects. I imagine you can use the same method on a holdable item (like the medikit) to make "dynamic" lighting for those unlit tunnels possible.


Title: Re: any torchlight - candle item available ?
Post by: Taiyo.uk on March 26, 2007, 01:40:54 PM
Could a torch/flashlight be implemented by making it a hitscan weapon that spawns a light at the point of impact? The radius and intensity of the light could depend on the distance to the player to simulate beam projection.


Title: Re: any torchlight - candle item available ?
Post by: MilesTeg on March 30, 2007, 01:33:25 AM
In Jedi Outcast/Academy a character with a lightsaber emitted light. Any idea how this was done?


Title: Re: any torchlight - candle item available ?
Post by: dmn_clown on March 30, 2007, 02:22:30 AM
I would imagine it was done in the same way that q3's flag carriers emit light.


Title: Re: any torchlight - candle item available ?
Post by: Amphetamine on March 30, 2007, 06:16:04 AM
That type of dynamic light needs to be coded at the game (QVM) level. It would certainly be possible to set a worldspawn flag or somthing to give the player a dynamic lightsource held x units in front of them to simulate torchlight because I've seen it done before. As previously stated, due to multiply lighting, fulldark areas will never light (anything x0 is still 0).

A change to addative dynamic lighting would require some engine code changes and a shift in the way that the shader pipeline is processed. You'd need to add the dynamic light to the lightmap of each shader before the rest of the shader was processed. Not sure how difficult that would be, since I'm no coder.

Hope that helps.


Title: Re: any torchlight - candle item available ?
Post by: dmn_clown on July 01, 2007, 04:14:44 AM
In Jedi Outcast/Academy a character with a lightsaber emitted light. Any idea how this was done?

http://code3arena.planetquake.gamespy.com/tutorials/tutorial25.shtml