Changing the lightmap size

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Changing the lightmap size

Post by lukesmith »

Is it possible to change the size of the faces in the lightmaps generated?

I had thought that -lightmapsize<N> would be what I wanted but this changes the size each lightmap texture but the actual faces in the texture are the same size in pixels. So you can fit more faces into the lightmap texture but they will still be low resolution and it would basically be the same.

does Q3MAP2 have a setting t change the resolution of each face in the lightmap? So less faces could be stored in the texture but they would be of better quality.
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Re: Changing the lightmap size

Post by Hipshot »

Use _lightmapscale on a entity, such as a group.
Try _lightmapscale .25 and see what happens...
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Changing the lightmap size

Post by lukesmith »

Oh thank you thats perfect. Man Quake3 bsp is awesome, I had been expecting to have to troll through the sourcecode to implement all of this but its just easily done changing some settings!

quick question, would you select all brushes and create func_group from them or create it for each individual brush?
or does it not matter?

Also any idea what the shadow caster level and shadow reciever level parameters do?

thanks so much!
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: Changing the lightmap size

Post by Eraser »

Select all brushes that are physically located next to each other and create func_group entities out of those.
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Changing the lightmap size

Post by lukesmith »

what do you mean located next to each other? because theres always a face next to another face so I would eventually select every face.

Or do you just mean generally select a small group of faces that are close to each other?

Is the purpose of this to pack eveything thats in a group into the same lightmap? So I should only group the amount of faces that I can fit into a lightmap?
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: Changing the lightmap size

Post by Eraser »

What I meant is brushes that are close to each other. I'm not sure if I'm correct on this, but I'm not sure what happens if you create an entity that spans across various VIS areas. I think that because you can see part of the entity (according to vis), it'll render the whole entity which means that the game spends time rendering brushes you cannot see and this is generally not preferable.

I don't think it's game-breaking wrong, but I guess it's better to keep the brushes of an entity located in the same area.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Changing the lightmap size

Post by obsidian »

Func_group's don't really do anything, they are just a collection of brushes that you can group together to make selections and transformations easier. Some entity keys on func_groups are read by Q3Map2 for compiling, but they don't affect anything in-game (like VIS) once the map is compiled.

The func_group for lightmaps is just a way of flagging those brushes to Q3Map2 as having a higher lightmap scale. You could do this with a shader or globally, but it's just another way of flagging select brushes. Q3Map2 automatically packs surfaces onto different lightmap pages. Just group whatever is convenient with the same scale value.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Changing the lightmap size

Post by lukesmith »

Ok good to know thanks. Any Idea what shadow caster level and shadow reciever level do?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Changing the lightmap size

Post by obsidian »

_castshadows : Allows per-entity control over shadow casting. Defaults to 0 on entities, 1 on world. 0 = no shadow casting. 1 = cast shadows on world. > 1 = cast shadows on entities with _rs (or _receiveshadows) with the corresponding value, AND world. Negative values imply same, but DO NOT cast shadows on world.

_receiveshadows : Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.
TL;DL: Controls whether entities casts/receives shadows from lights/other shadow casting objects.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Changing the lightmap size

Post by lukesmith »

Oh great thanks.
Post Reply