Boe6's vehicles: Interaction collider .phys files
Interaction collider .phys files control the physics size for the vehicle. This controls how it hits/collides with walls, players, etc.
Add the .phys
file to your project, rename, and move the file as appropriate. It is linked through the .ent
file.
Path:
.ent file > RDTDataViewModel > components > chassis > collisionResource
Convert the .phys
to a JSON
file:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FBZz3OIEGUqX1LRt2W3yy%252Fimage142.png%3Falt%3Dmedia%26token%3D75c1a726-39c1-494d-aab9-979ce9341168&width=768&dpr=4&quality=100&sign=2df4757c&sv=1)
Now you’ll need 2 python scripts created by “The Magnificent Doctor Presto!”. They can be downloaded on github here:
https://github.com/DoctorPresto/Cyberpunk-Helper-Scripts
Download both export_phys.py and import_.phys.py
In Blender, open the “Scripting” workspace:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FJ0NtWStAHGsCwR8P1niZ%252Fimage143.png%3Falt%3Dmedia%26token%3D7a3f83f5-f53f-4506-8fd3-028b796b42da&width=768&dpr=4&quality=100&sign=3ac1ef49&sv=1)
At the top of the text editor that just openned, use the folder icon to find the importing .py
file we just downloaded.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FbXsFauySEsDdRbQoKWOm%252Fimage8.png%3Falt%3Dmedia%26token%3D7e0cc990-210d-40db-b9df-3ad6ad555ff7&width=768&dpr=4&quality=100&sign=98b752b0&sv=1)
This should open the .py
file into the text editor. It should look like this:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FNlHqdisEaAfXQQVmajaI%252Fimage203.png%3Falt%3Dmedia%26token%3D5069d1a3-ceba-4b66-a563-3eb1c024e898&width=768&dpr=4&quality=100&sign=d0b7a85e&sv=1)
Edit the “physJsonPath
” value to the converted phys.json
file.
Example:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FIZO7RTDJ9iszyiT36dQ4%252Fimage206.png%3Falt%3Dmedia%26token%3De3aaa6db-c8cd-4ca8-afe7-e2bca3b25857&width=768&dpr=4&quality=100&sign=c26e9785&sv=1)
Once you’ve run the script, you should have vertices that look close to the outline of the original car model. Notice the outline similar to the porsche:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FlQnEtc4n0ZGZHcuAPStw%252Fimage192.png%3Falt%3Dmedia%26token%3D0df278df-e9b0-4abb-8251-25d2dc4bad6c&width=768&dpr=4&quality=100&sign=83890dbd&sv=1)
.phys
files don’t like complex meshes, so they use only vertices without faces or edges. Each “submesh” is a small object shape, with no concave angles. Each submesh is then joined to create the overall collision mesh.
Switch back to the Layout workspace.
The easiest way to edit these in blender is to enable your vehicle’s body mesh, is to switch to Wireframe shading, by holding Z, and moving your mouse to “Wireframe”. Example:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FE8vQol8j062vsTDLy9Hj%252Fimage109.png%3Falt%3Dmedia%26token%3Da8d25c33-36a5-4ccb-9a93-506c5933e4f4&width=768&dpr=4&quality=100&sign=62c6c06b&sv=1)
This will allow you to see your body mesh, but also see vertices behind and around it. Example:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FC7DXkkJxlFEyujPKh04u%252Fimage66.png%3Falt%3Dmedia%26token%3Decbd16fc-17cf-4f5a-b180-e95305540fdf&width=768&dpr=4&quality=100&sign=c1be9b5f&sv=1)
Once done editing, select all the vertices objects and run the export_phys.py, similar to the import script.
The .phys
file should now be finished. Import from json
, update path references, and test in-game. Make sure to update the physJsonPath
again, as this is the path it will save the new .json
to.
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FAtWcVhqbZD40shxaNAVL%252Fimage155.png%3Falt%3Dmedia%26token%3D0066ecb7-0675-4a71-b000-8d8fd00ce5d9&width=768&dpr=4&quality=100&sign=c9d21e00&sv=1)
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FxXevCGwBi7G8RLj3rtPY%252Fimage91.png%3Falt%3Dmedia%26token%3D52ed1042-84cc-499b-a67e-4f0a3678eca0&width=768&dpr=4&quality=100&sign=f689877&sv=1)
Once the script has been run, you should have a new file with the “new_
” prefix added in the same folder as the phys.json
.
Example:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fg81cqoWKH1ruQhFvy6HC%252Fimage111.png%3Falt%3Dmedia%26token%3D79887a60-bb00-4ad4-807c-65f2c551ba66&width=768&dpr=4&quality=100&sign=a9a217d4&sv=1)
This file can now be converted back from json and used in game. Example:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FwuNkTiWAbJ8fK39fQYaN%252Fimage177.png%3Falt%3Dmedia%26token%3Db862f9cf-739a-4212-9cab-86d79187e91e&width=768&dpr=4&quality=100&sign=78a76dab&sv=1)
Last updated