Closed pvp-by closed 3 days ago
Is Source 2 not using the 1 unit = 0.0254 meter conversion? I thought we tested this before.
Is Source 2 not using the 1 unit = 0.0254 meter conversion? I thought we tested this before.
I do not really know how to check how and in what counts as a source 2 I only in practice convinced of the incorrectness of the current behavior
@Perryvw looked at this, and it would appear that the scaling is not consistent depending on what/how you import.
- create a model in dota2 from fbx mesh - compile as vmdl_c
You need to fix the scale in model editor. The cube will be larger than blender cube in game as well.
Describe the bug
big size after export
What Valve game does this happen in
Dota 2
Reference file in a Valve game
*.vmdl_c
Expected behavior
export model original size
What version of VRF are you using? On what platform?
win 0.1.7.1501
i test export and decompile vmdl_c file
step by step:
fix in https://github.com/SteamDatabase/ValveResourceFormat/blob/master/ValveResourceFormat/IO/GltfModelExporter.cs#L28
private readonly Matrix4x4 TRANSFORMSOURCETOGLTF = Matrix4x4.CreateScale(0.0254f) * Matrix4x4.CreateFromYawPitchRoll(0, (float)Math.PI / -2f, 0);
change :private readonly Matrix4x4 TRANSFORMSOURCETOGLTF = Matrix4x4.CreateScale(0.01f) * Matrix4x4.CreateFromYawPitchRoll(0, (float)Math.PI / -2f, 0);