ata4 / bspsrc

A Source engine map decompiler
Other
687 stars 87 forks source link

Problem with textures in VTMB skyboxes #52

Open DrSharky opened 6 years ago

DrSharky commented 6 years ago

I believe there's an issue with how the materials are decompiled in the skyboxes of Vampire: The Masquerade - Bloodlines maps. The textures are showing up, but some are misaligned with how they appear in game. Image of what it looks like in Hammer: https://i.imgur.com/x0LR6qZ.png Image of what it looks like in game: https://i.imgur.com/Rt2IOmo.jpg And an image of the skybox in game: https://i.imgur.com/KgJ9A6W.jpg Messing around with some of the material properties in the Face Edit Sheet sometimes fixes it, but there's no consistency with attempting that. The problem only appears to affect some skybox textures, I haven't seen it change around any other textures in the main area of the map. I've tried loading the VMF into Half-Life 2's current Hammer editor, and the Hammer editor provided with the Bloodlines SDK from the Unofficial Patch. Changing the BSP Format to VTMB and/or VMF Format to Source 2004 to 2009 doesn't seem to affect it either. Not sure what it is, but I'd be grateful for the help!

DrSharky commented 5 years ago

So the problem is that some VTMB maps have material scales with as far as 6 decimal places. The new version of BspSrc only supports up to 4 I believe.

The older version of BspSrc that allows 6 decimal places, is included in the Bloodlines SDK. If anyone else stumbles upon this problem, use the Bloodlines SDK version of the decompiler.

I don't think I'd consider this problem closed, as it still doesn't work well with VTMB, and there are classes in the program that suggest it should. I'd look into it myself, but I don't know how to build a Java project like this in order to test it.

rihi commented 1 year ago

Sorry for taking a 'little' while to answer. Your right that this has to do with how texture coordinates are currently rounded. The whole process around decompiling textures and geometry is a little messy right know, so I never really got around to working on it.

I will probably push some commit soon™ which will just bump the rounding from 4 places to 6 but I won't consider this closed as I should really put some more though in how these kind of numerical errors should be handled.