Skip to content

ColouMods/P3DOffset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P3DOffset Logo

P3DOffset

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.

Download

Compiled builds for Windows and Linux can be found on the Releases page. You will need .NET 8.0 to run them.

Usage

Screenshot showing P3DOffset in use.

P3DOffset is run from the command-line, and a number of arguments are used to configure it:

Argument Function
-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.
-ry Set Y rotation offset.
-rz Set Z rotation offset.
-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. Each Intersect 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.

About

A tool for automatically applying translations/rotations to Pure3D chunks.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages