
P3DOffset
Posted in The Simpsons: Hit & Run
Please sign in to reply to this topic.
Colou
https://colou.ams3.cdn.digitaloceanspaces.com/p3doffset/images/logo.png
P3DOffset
P3DOffset is a command-line tool for applying translations and rotations to Pure3D chunks used in The Simpso

P3DOffset is a command-line tool for applying translations and rotations to Pure3D chunks used in The Simpsons: Hit & Run. It is primarily intended for offsetting world objects and their respective chunks, such as static meshes (e.g.
Static Entity
chunks), collision (e.g. Static Phys
and Fence
chunks) animated meshes (e.g. Anim
and Anim Coll
chunks), physics objects (e.g. Dyna Phys
chunks), and other miscellaneous things (Locator
chunks, Road
chunks, etc.).In addition, it also supports offsetting drawables (e.g.
Composite Drawable
and Scenegraph
chunks) that are used by things such as vehicles, gags, and frontend models.Usage

P3DOffset is run from the command-line, and a number of arguments are used to configure it:
-h, --help Display help message.
-i, --input Set path to the input file. Required.
-o, --output Set path to the output file. Required.
-f, --force Force overwrite the output file.
-x Set X position offset.
-y Set Y position offset.
-z Set Z position offset.
-rx Set X rotation offset in degrees.
-ry Set Y rotation offset in degrees.
-rz Set Z rotation offset in degrees.
-ro, --order Set order of rotations. Defaults to 'ZYX'
Important notes
- Currently, this tool does not support offsetting
Intersect
collision chunks due to their relative complexity compared to other chunk types. EachIntersect
chunk need to be aligned with the bounds of the game's k-d Tree and so they cannot be simply offset - every chunk needs to be re-generated from scratch. This may be supported in future, but for the moment I recommend using the Pure3D editor's 'Export All Intersect' and 'Import All Intersect' functions to offset the collision manually.
- This tool, like the game, uses a left-handed coordinate system with Y as the up axis. This is different from many 3D modelling programs (such as Blender) which use a right-handed coordinate system with Z as the up axis. As such, you may need to swap around translation or rotation values if you are taking them from these programs.
Download
You will need .NET 8.0 to run this program.