netradiant-custom icon indicating copy to clipboard operation
netradiant-custom copied to clipboard

Lightmap UV coords missing when baking external lightmaps with -styles and switchable or styled lights in RSBP (RavenBSP: EF1, SOF2, JK2, JKA)

Open MoritzJT opened this issue 3 years ago • 2 comments

When packing external lightmaps, q3map2 creates the lightmap UVs and surface lightstyles properly but does not save the created lightmap UV coordinates into the BSP. q3map_lightmapsize 1024 is used to force external lightmaps.

Is -extlmhacksize needed on top of -styles / -style or is there anything else missing to get this feature to work?

Writing hacky shader lightstyles as q3map2 would do seems broken too.

When writing a shader with q3map_stylemarker the autogenerated mapshader does not include any of the styled lightmap stages with the appropriate alphaGen and rgbGen waveforms from _styleNrgbGen and _styleNAlphaGen in the worldspawn or any other entity.

Maybe there is just a little bug in how the UVs are stored and they are discarded by accident. However the resulting bsp cannot use tcGen lightmap as the coordinatesystem for them has not been exported along creating artifacts and bugs with the renderer in Raven Games.

MoritzJT avatar Aug 22 '20 23:08 MoritzJT

Lightstyles hack in conjunction with external lightmaps is mentioned, as non functioning here: https://github.com/Garux/netradiant-custom/blob/ebf88b0842953104f497b850793431b3d281d6f5/tools/quake3/q3map2/lightmaps_ydnar.c#L3378

Garux avatar Aug 23 '20 03:08 Garux

I am well aware of where it says so ;-) I was just hinting at what might need to be fixed, as I've analyzed the behaviour a bit and was hoping that someday it might be easier to fix... I'm trying to learn how it's done.

MoritzJT avatar Aug 30 '20 19:08 MoritzJT