ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
634 stars 74 forks source link

Include lightmap static prop lighting from TF2 to other Orange Box games [Request] #1909

Open MissingNoGuy55 opened 9 years ago

MissingNoGuy55 commented 9 years ago

With the introduction of static prop lighting being able to receive lightmap shadows, this feature should also be transferred to other Orange Box games, including Counter-Strike: Source. It doesn't make sense why it would be in TF2 but not other Orange Box titles.

horse-f commented 8 years ago

I agree with this, as a hobbyist mapper for css this would really help. Being able to convert some large complicated pieces of geometry into props and have actually decent lighting would allow for a major increase in the amount of detail a map can have.

horse-f commented 8 years ago

I have actually done some more research on this and have discovered that the program propper which I was using to convert the brushes into models was causing the problem. I was able to get it working by going through Blender and baking the textures. I wrote an article about it here: https://github.com/momentum-mod/level-design/wiki/Lighting-Props

MissingNoGuy55 commented 8 years ago

Glad to hear you made progress on this. Though it would be a lot simpler if Valve looked at this repo and added it to the compilers...

SirYodaJedi commented 6 months ago

TF2's lightmapped static props were backported to the core Source 2013 Multiplayer engine branch shortly after they were added to TF2 in 2014; they weren't really ever TF2-exclusive. All first-party Source 2013 MP games†, as well as mods running under Source SDK Base 2013 Multiplayer, support lightmaps on VertexLitGeneric (and GMod added support last year).

It's technically possible to backport the 2013 MP VertexLitGeneric shader to 2013 SP††, but $lightmap will need to be manually defined in the VMT (no auto-generated lightmaps). From what I've heard from people with engine access, the way the lightmaps are handled in 2013 MP wouldn't work well in the L4D2. Portal 2, and CSGO branches due to those branches doing batch rendering of some sort for props (if they were to have added it to CSGO, I'd hope they would have added the option to use the second set of UVs instead of sharing UVs with $basetexture).

It'd be nice if prop lightmaps were officially backported to the singleplayer titles, but that'd require a decent bit of work to also load the newer BSP format and PPL files and whatnot else.

† Source 2013 Multiplayer is used by the first party titles Counter-Strike Source, Day of Defeat Source, Half-Life 2 Deathmatch, Half-Life Deathmatch Source, and Team Fortress 2 †† Source 2013 Singleplayer is used by the first-party titles Half-Life 2 (as well as Lost Coast and Episodes 1+2), Half-Life Source, and Portal 1

tschumann commented 6 months ago

What are the .ppl files?

On Tue, 19 Mar 2024 at 07:37, Yui @.***> wrote:

TF2's lightmapped static props were backported to the core Source 2013 Multiplayer engine branch shortly after they were added to TF2 in 2014 https://github.com/ValveSoftware/source-sdk-2013/commit/55ed12f8d1eb6887d348be03aee5573d44177ffb; they weren't really ever TF2-exclusive. All first-party Source 2013 MP games†, as well as mods running under Source SDK Base 2013 Multiplayer, support lightmaps on VertexLitGeneric (and GMod added support last year).

It's technically possible to backport the 2013 MP VertexLitGeneric shader to 2013 SP††, but $lightmap will need to be manually defined in the VMT (no auto-generated lightmaps). From what I've heard from people with engine access, the way the lightmaps are handled in 2013 MP wouldn't work well in the L4D2. Portal 2, and CSGO branches due to those branches doing batch rendering of some sort for props (if they were to have added it to CSGO, I'd hope they would have added the option to use the second set of UVs instead of sharing UVs with $basetexture).

It'd be nice if prop lightmaps were officially backported to the singleplayer titles, but that'd require a decent bit of work to also load the newer BSP format and PPL files and whatnot else.

† Source 2013 Multiplayer is used by the first party titles Counter-Strike Source, Day of Defeat Source, Half-Life 2 Deathmatch, Half-Life Deathmatch Source, and Team Fortress 2 †† Source 2013 Singleplayer is used by the first-party titles Half-Life 2 (as well as Lost Coast and Episodes 1+2), Half-Life Source, and Portal 1

— Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/Source-1-Games/issues/1909#issuecomment-2005067930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA34IYRGISXCHSDSS42K5TTYY5NDDAVCNFSM4BM4LA32U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBQGUYDMNZZGMYA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SirYodaJedi commented 6 months ago

What are the .ppl files?

Lightmap textures automatically generated by VRAD for static props. They're kinda like VTFs, but not really (you can losslessly convert between them with the right knowhow, however). Presumably PPL stands for Per Pixel Lighting. 2013 MP has an engine-level thing to read from these files if certain flags are set in the static prop lump of the BSP (which is a newer version than 2013 SP supports).