Talk:Lightmap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 42: Line 42:


If I recall correctly lightmaps do not actually affect performance at all. They only take video ram memory space (and yes, take time to load), which textures also use. I'd therefore imagine it would be a good idea to compare the amount of textures you have in a map (as well as their sizes) compared to the number of high detail lightmaps you use, and weigh them with your budget in order to make sure the largest number of players can play your maps without lag from swapping in the Video ram.
If I recall correctly lightmaps do not actually affect performance at all. They only take video ram memory space (and yes, take time to load), which textures also use. I'd therefore imagine it would be a good idea to compare the amount of textures you have in a map (as well as their sizes) compared to the number of high detail lightmaps you use, and weigh them with your budget in order to make sure the largest number of players can play your maps without lag from swapping in the Video ram.
--[[User:Bacon333|-bacon333]] 03:01, 12 April 2010 (UTC)

Revision as of 20:01, 11 April 2010

Lightmap console commands

Any command to view the lightmap in game, similar to Q3As r_drawlightmap x maybe? --Hipshot 22:03, 21 Jan 2006 (PST)

Lightmap commands:—ts2do 22:25, 21 Jan 2006 (PST)

mat_filterlightmaps
mat_showlightmapcomponent
mat_showlightmappage
r_avglightmap
r_lightmap
Thanks alot --Hipshot 22:26, 21 Jan 2006 (PST)
For future readers, didn't seem to show the lightmap at all, no one of them. --Hipshot 00:34, 22 Jan 2006 (PST)
Do you mean to just draw the lightmaps, and not any other texture pass, or do you just want an overlay showing the luxels? If you just want overlays of the luxels, use "mat_luxels 1", IIRC. You could probably disable all the other texture passes if you just want the lightmaps getting rendered and not the diffuse/normal/specular etc... Not sure how it would come out looking though. --ReNo 02:47, 10 Jan 2007 (PST)

Does lightmap increase polycount?

I always wondered if yes or no, reducing the lightmap size increases the polycount. One day, I made a test on a small testmap, and this is what came out :

I'm wondering if it was just a particular case, or if it always do that. Because people never talk about this side effect of reducing the lightmap resolution. If that shouldn't do that, I believe we could use a default lightmap of 8 or even 4 instead of 16, couldn't we? (I don't care about the bsp size) --NykO18 02:20, 1 Sep 2008 (PDT)

I'd never noticed that. Perhaps there's a maximum number of luxels per-poly? I count 32 luxels between each chop, so it's certainly possible. --TomEdwards 09:59, 1 Sep 2008 (PDT)
Whoa thats quite Interesting, I never knew this either, until seeing it right now. --Gear 20:10, 1 Sep 2008 (PDT)
Seeing your reactions, I believe I'm the only one facing this kind of situation? That's weird, I should do the test again, to see if there was not a problem with lightmaps at this moment. --NykO18 00:45, 2 Sep 2008 (PDT)
No no, I get it as well. That's how I counted the luxels. :-p --TomEdwards 00:57, 2 Sep 2008 (PDT)
All right, I believe it could be of some use to add this kind of information in your optimization article, or in the lightmap article. --NykO18 02:44, 2 Sep 2008 (PDT)

Powers of 2

Maybe this is obvious to those more experienced but I had a hard time figuring out that the lightmap scale must be a power of two. --VenatioDecorus 07:01, 23 April 2009 (UTC)

I'm pretty sure it doesn't have to be. --TomEdwards 18:21, 23 April 2009 (UTC)
It's best to keep it at half of the original usages, IE: 16, 8, 4, 2. There's usually a case though where you could use 1.--Gear 04:34, 24 April 2009 (UTC)

Performance

I maked a huge map with much static model, and conpile with scale 16 and 1 Lightmap. The FPS it was same (37 for me). So I think the performance isn't affect by Lightmap.

The map test :
Lightmap test.jpg

--Anarkia777 15:41, 27 July 2009 (UTC)

If I recall correctly lightmaps do not actually affect performance at all. They only take video ram memory space (and yes, take time to load), which textures also use. I'd therefore imagine it would be a good idea to compare the amount of textures you have in a map (as well as their sizes) compared to the number of high detail lightmaps you use, and weigh them with your budget in order to make sure the largest number of players can play your maps without lag from swapping in the Video ram.

---bacon333 03:01, 12 April 2010 (UTC)