Qbasicnews.com
May 11, 2021, 11:33:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Amount of lightmaps in q3  (Read 2758 times)
SBM Productions
Senior Member
**
Posts: 163


« on: December 23, 2005, 03:28:17 PM »

Does anyone know how many lightmaps are used per level in quake 3(on average) ? Also, how big would the overall total size of all the lightmaps be in kb? I presume that each lightmap is only loaded into the gfx card vram when needed...
Logged

 am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
LooseCaboose
I hold this place together
*****
Posts: 981



« Reply #1 on: December 23, 2005, 08:59:40 PM »

I think its one lightmap per surface in the level. The lightmaps are basically just gray-scale textures and many of them will compress fairly well, so I doubt they take up a huge amount of space.

Not too sure about when the lightmaps are loaded though. You could always have a look at the Quake 3 source, its available now from Id's website.
Logged

esus saves.... Passes to Moses, shoots, he scores!
etko
Member
*
Posts: 45


WWW
« Reply #2 on: December 28, 2005, 09:51:22 AM »

Lightmap size is based on material for smaller surfaces it is like LooseCaboose said for bigger ones, surfaces are split because of older hardware limitations i think it was 128x128.
Logged
Blitz
I hold this place together
*****
Posts: 853



WWW
« Reply #3 on: January 17, 2006, 08:19:28 AM »

In quake as any other 3d renderer that uses lightmaps, each polygon has it's own lightmap. There are some minor differences between the quake 1-3

Quake 1 - The lightmaps were stored in a big lump, they were greyscale and you had to find out their size and the polygons lightmap coordinates yourself.

Quake 2 - Same as q1, except the lightmaps now were 24 bit rgb images, so now lightning had colors.

Quake 3 - This version is a bit more hardware optimized. Every polygon still has it's own lightmap, except now the lightmaps are optimally orginased in 128x128 24 bit rgb textures. This is no problem, as the lightmap coordinates that are given in at each vertex are already translated to the correct place in the texture. And the polygon has the index to the lightmap. So all you have to do is upload all the textures to the video card, upload all the lightmaps. Then while rendering the polygon you just enable multitexturing and set te texture coordinates and the second texture (lightmap) coordinates. Meaning that you basically don't really have to do anything. To get the number of lightmap textures, you divide the size of the lightmap lump by 128*128*3, and the size of each polygons lightmap is in the polygon structure itself.

And don't look int to the quake source. It sucks.
Logged

oship me and i will give you lots of guurrls and beeea
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!