xash3d-fwgs
xash3d-fwgs copied to clipboard
Adding CSM model format support
It's a new file format for static meshes by Uncle Mike.
Specification: https://hlfx.ru/forum/showthread.php?s=&threadid=6083 csm_format_spec_v.0.1.zip
There isn't so much info about this yet. Unlike static props compiled as HLMDL, this supports proper lighting.
@SNMetamorph do you have any ideas about it?
So, I'm really unsure about this one. The only thing that prevents us from using lightmapping on studiomodels is that we don't have standard mechanism to store UV for lightmap. But, this can be added to SMD and MDL in backward compatible way. Even, it already exists in SMD specification (SMD supports several UVs per vertex):
Reference from https://developer.valvesoftware.com/wiki/SMD#Syntax_3:
Note:
SMD version 3 supports up to 8 additional UV layers after additional links. Format <int|extra uvs> U1 V1 U2 V2 [...].
Nonetheless, the MDL formats used by both GoldSrc and Source only support a single set of UVs, except for CSGO, which uses a second set for $decaltexture.
Main problem with CSM is that's "thing-in-itself". 3D modeling software, level editors (like J.A.C.K and VHE), and other utilities is unaware about this format (even when we have plugin for Blender, we don't have such things for other software, and in some cases it's impossible to add new formats support). Also, a lot of existing content already exists in SMD/MDL formats - even if it's possible to fast and reliable convert all things to .csm, this anyway a lot of tremendous work.