Health?

Post your scripting questions / solutions here

Moderator: Moderators

Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

jv_map wrote:They're used for spherical lighting (rgbGen lightingSpherical) and to calculate shadows of players/AI.
*slaps his forehead*
Yeah, that's right! Still, I think that placing them in the entity lump is rather inefficient, they could make another BSP lump to contain the coords, colours and radiuses of the lights in binary. Some disk space (entities are plain ASCII strings) and entity count could be saved.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Hey, I was working on HDRR simulation for MW2 and had to take an in-depth look into how the lights are stored. And what I found out is that I was both right and wrong when I said that light entities are just a waste of space. ;)

Quake engines use Gouraud shading for entities based on a 3D light grid. This means that I was right when I said they could be removed from the entity lump.

On the other hand, however, they do not eat up entity slots, as the game library spawn function frees it immediately:

Code: Select all

void SP_light( gentity_t *self ) {
	G_FreeEntity( self );
}
Still, if I'm ever going to edit q3map2's code, I'll make it remove the light entities after the lighting stage. :P
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply