Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompiled and exported physics/collision have incorrect Collision Property. #675

Open
RiotNOR opened this issue Dec 8, 2023 · 1 comment

Comments

@RiotNOR
Copy link

RiotNOR commented Dec 8, 2023

Describe the bug

Kind of a two-parter:

Firstly, if one wants to export one of Valve's own maps, you cannot just export the maps folder as the map won't load up after compiling in Hammer. You'll have to export multiple pieces one-by-one. The physics file is one of these (along with entities folder).

Upon loading up Mirage with the physics file corrected, there will be multiple collision boxes that will block everything due to their collision properties are all set to "Default" after export. If you try to smoke off CT from outside T ramp it will be blocked.

Export "world_physics.vmdl_c" over S2V's exported world_physics_edit.vmdl, and then load it up in ModelDoc. Scroll to the bottom in the Source Outliner. Find "world_physics_phys1983.dmx". This is the offending mesh for my particular issue. If you set the Collision Property to "player_clip" (unknown if this is correct, but it works for now) and build the map you'll now be able to properly shoot and do line-ups.

Unless I am fixing this in the wrong way, I believe all meshes in the exported physics file to all just be set to "Default" collision property.

Relevant log output or exception with stacktrace

No response

What game does this happen in

Counter-Strike 2

Reference file in a Source 2 game

world_physics.vmdl

Expected behavior

Proper Collision Properties on meshes.

What version of VRF are you using? On what platform?

v7.0.2509

@RiotNOR RiotNOR added the bug label Dec 8, 2023
@xPaw xPaw added the exporting label Dec 8, 2023
@kristiker
Copy link
Member

kristiker commented Dec 8, 2023

This is why I set the editable world physics approach as default. It will remap triangles with sky property to toolsskybox.vmat and so on. Code for that is in MapExtract.cs:

public static string GetToolTextureNameForCollisionTags(ModelExtract.SurfaceTagCombo combo)

For raw physics mesh extract, the dmx file needs to be split up based on collision tags. Similar to the map mesh tinting issue tracked at #643.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants