-
Notifications
You must be signed in to change notification settings - Fork 3
Assets
Ratchet and Clank maps are composed of a variety of different assets. Assets can be sounds, textures, models, code, or any form of data.
NOTE: For a more complete guide on the underlying data please refer to the wrench docs.
There exist 5 types of models. Each type renders geometry but has additional features and/or limitations that make it useful for specific usecases.
NOTE: For more information on Tfrags, Ties, and Shrubs please refer to this presentation: https://www.slideserve.com/dcallaway/the-technology-of-jak-amp-daxter-powerpoint-ppt-presentation
Developed by Naughty Dog for the Jak and Daxter series, Tfrags
are essentially groups of faces that transition between of high and low geometries as the camera moves closer/further away.
tfrag-lod.mp4
Demonstrating the transition between LODs. The curved edge gains and loses an extra vertex per edge.
Tfrags
are not instanced and as such tend to be used for unique geometry like terrain and some buildings. For an instanced version of Tfrags
refer to Ties.
Tfrags
are difficult to edit because the original geometry has been grouped into arbitrary fragments to optimize rendering. The door to a building, for example, may partly share a tfrag with some faces from floor of the building, and some faces from the outside ground. Making it difficult to simple move or delete the building, since some of the terrain would be moved with it.
Editing tfrag
textures will be converted and packed when the map is built. Refer to the Texture Editing guide for more information on texture editing.
Tfrags
use occlusion to minimize overdraw. You may view which octants will render a given tfrag
by checking the Render Octants
toggle in the TfragChunk
component.
TIEs (Tfrag Instance Engine) are Tfrags
that can be drawn multiple times with different transformation matrices and vertex colors. This makes them particular useful for custom maps as we can simply create a new instance of an existing Tie
and place it where we like.
Insomniac levels often contain Ties
whose transformation matrices cannot be decomposed into a Position
, Rotation
, and Scale
without losing information. The Reflection
matrix contains the extra information about how the instance is placed so that the Tie
will render correctly in Forge and in game. However the matrix introduces some challenges/limitations.
Generally, the Reflection
matrix is only useful for imported instances. For custom placed instances, it is recommended to clear the matrix.
Forge supports generated uniform vertex colors for any Tie
instance. Instances that were imported from a level may contain non-uniform vertex colors. If left unchanged, Forge will export the instance with the non-uniform vertex colors. Forge will not properly render these colors in the editor, however. Always test your map on PS2/PCSX2 before finalizing any changes.
Ties
use occlusion to minimize overdraw. You may view which octants will render a given Tie
by checking the Render Octants
toggle in the Tie
component.
Ties
may optionally have instanced collision. By default, when a level is imported, all collision is imported as a single static object. Instances such as Ties
do not have any collision. You may enable an instanced collider, which will be generated from the rendered geometry with a default collision ID.
You may also override the default collider with a custom one using the
Instanced Collider Override
field in the inspector.
Shrubs
are more simple, instanced geometry. They do not tessellate like Tfrags
and Ties
. Most don't have any additional LODs while some do in the form of billboards. Despite the name, Shrubs
can be used for a variety of organic and inorganic objects. They tend to be small and numerous, though there are exceptions.
Insomniac levels often contain Shrubs
whose transformation matrices cannot be decomposed into a Position
, Rotation
, and Scale
without losing information. The Reflection
matrix contains the extra information about how the instance is placed so that the Shrub
will render correctly in Forge and in game. However the matrix introduces some challenges/limitations.
Generally, the Reflection
matrix is only useful for imported instances. For custom placed instances, it is recommended to clear the matrix.
Shrubs
may optionally have instanced collision. By default, when a level is imported, all collision is imported as a single static object. Instances such as Shrubs
do not have any collision. You may enable an instanced collider, which will be generated from the rendered geometry with a default collision ID.
You may also override the default collider with a custom one using the
Instanced Collider Override
field in the inspector.
Property | Description |
---|---|
Render Distance | How far the camera must be for the Shrub to not be rendered. |
Tint | The color of the instance. |
Mobys
are non-static objects that can move, rotate, scale, spawn, despawn, and execute their own code, per instance. Examples are Ratchet, every gadget, every projectile, every mob, every vehicle, bolts, etc.
Because a Moby
has its own code and its own properties (PVars
), it is very easy to crash the game when editing/importing them.
PVars
are a block of data that is associated with a Moby
instance. This data is different for each Moby
class. Meaning a puma will share the same data structure as other pumas, but a different data structure than a hoverbike, for example.
Well that depends. Much of it could be unused. Much of it could be used as a working buffer during runtime. But much of it is often used for configuration.
You can edit a Moby
's PVars
in the Inspector. These are populated from a json file in Forge. These are incomplete, meaning that there will by Mobys
that do not have PVars
in the Inspector, but they do in game. There will also be Mobys
that have PVars
in the Inspector, but some fields that are used in game are missing.
You are welcome to open an issue asking for missing PVars
to be added for a Moby
. We also accept PRs :).
Property | Description |
---|---|
Draw Distance | How far away the camera must be for the Moby to not be rendered.255 is always rendered. |
Update Distance | How far away the camera must be for the Moby update function to stop executing.255 is always update. |
Occlusion | Occlusion ID of the Moby . Often shared with other Mobys . |
Light 1 | Which World Light (index) to use. |
Color | The color of the instance. |
The Sky
is a special object that is rendered in the background. It is a mesh usually consisting of layers with different angular velocity. It uses vertex colors to blend the different layers together.
The Sky
is currently not editable in Forge. To use another Sky
, you must import from another level.