PrismaticFlower / shaderpatch

Improved shaders (and fun stuff for modders) for Star Wars Battlefront II (2005) - Incompatible with Classic Collection
MIT License
39 stars 2 forks source link

Soft skins crash material_munge #64

Closed DoctorAnsem closed 5 years ago

DoctorAnsem commented 5 years ago

Self-explanatory. Anything with the -softskin tag will cause material_munge to crash.

PrismaticFlower commented 5 years ago

Oops this is meant to produce an error but not a crash. (Nothing was catching the exception though, which results in a crash.)

Anyhow this is the error that was meant to be printed to you.

VBUF has softskin weights! SWBFII does not have support for hardware accelerated mesh soft skining, look for \"-softskin\" in any relevent .option files and remove it.

Despite what the docs say SWBFII doesn't support soft skinning in it's vertex shaders. I'm not 100% sure on how it does handle them but I think it just transforms the vertices on the CPU first. Which for complex meshes is far from ideal and not (I suspect) what people expect after reading the docs. So I didn't bother to support them in material_munge (although the crashing is a bug).

Although I will be honest adding support for them would not be that hard. My question would just be; given the drawbacks, are you sure you want it?

DoctorAnsem commented 5 years ago

Technically, no, I don't need it at all, it's just that some stock assets use it so I figured why change what works. But I guess soft skins really don't look much better, on PC at least - due to some specific assets I've come across, I get the feeling soft skins really only ever looked good in the Xbox versions to begin with. For some reason the Xbox version seems to consistently handle everything better, animation memory and tentacle limits being prime examples.

PrismaticFlower commented 5 years ago

Forgotten which version it was but this has been fixed. Soft skinned models still aren't supported but material_munge shouldn't crash and an error message informing the modder of this should be printed out.