-
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 use cases.
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 high and low versions of the model as the camera moves closer/further away.
tfrag-lod.mp4
Demonstrating the transition between LODs. The curved edge gains and loses vertices as the camera moves closer/further.
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 simply move or delete the building, since some of the terrain would be moved with it.
Forge supports repacking tfrag
textures. Refer to the Texture Editing guide for more information on texture editing.
Tfrags
use occlusion to skip the rendering of occluded objects. You may view which octants will render a given tfrag
by checking the Render Octants
toggle in the TfragChunk
component. Octants will appear as blue squares.
Remember that each octant encloses a 4x4x4 cube. The blue cubes used for visualization are 1x1x1.
TIEs (Tfrag Instance Engine) are Tfrags
that can be drawn multiple times with different transformation matrices and vertex colors. This makes them particularly 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 reset the Reflection
matrix.
Forge supports generating 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 skip the rendering of occluded objects. You may view which octants consider a tie
visible by checking the Render Octants
toggle in the Tie
component. Octants will appear as blue squares.
Remember that each octant encloses a 4x4x4 cube. The blue cubes used for visualization are 1x1x1.
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 also instanced geometry but they do not tessellate like Tfrags
and Ties
. Shrubs
either have a single LOD, or they have a single LOD with a billboard texture. 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 Shrubs
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 reset the Reflection
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 custom code, per instance at runtime. 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. We recommend that you rebuild and test your map after adding and removing mobys
.
PVars
are a block of data that is associated with a Moby
instance. This data is different for each Moby
class. For example, a puma will share the same data structure as other pumas, but have a different data structure than a hoverbike. Each puma instance, however, will have its own data. The data itself between instances may or may not be the same.
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.
-
Healthbox Moby (6898) has a field that indicates how long before it will respawn after being consumed. This field is stored in the
PVars
for each healthboxmoby
. -
Conquest Node Moby (8309) has multiple fields that are references to other
mobys
. These relationships are visualized in the editor with a line connecting them.
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 an object usually consisting of layers. Each layer is a mesh, with zero or more textures, and angular velocity. Each mesh uses the alpha channel in vertex colors to blend together.
The Sky
is currently not editable in Forge. You may import an existing Sky
from another map using the Level Importer.
Cuboids are a pair of matrices used for Multiplayer spawn points, trigger volumes, and King of the Hill (DL) volumes.
In Forge, they are an object with a Cuboid
component. The component exposes the Type
and Subtype
fields. These can be used to configure player, hills, and CTF flag spawns.
Type | Subtype | Description |
---|---|---|
Player | Default | Regular player spawn. Used for Deathmatch, KOTH, and Juggernaut. |
Player | Blue Flag Spawn | Spawn point for Blue Team in CTF (Deadlocked Only). |
Player | Red Flag Spawn | Spawn point for Red Team in CTF (Deadlocked Only). |
Player | Green Flag Spawn | Spawn point for Green Team in CTF (Deadlocked Only). |
Player | Orange Flag Spawn | Spawn point for Orange Team in CTF (Deadlocked Only). |
Hill Square | N/A | KOTH square hill volume (Deadlocked Only). |
Hill Circle | N/A | KOTH circle hill volume (Deadlocked Only). |
Splines are an ordered collection of points in space. Splines are typically used for mob/moby pathing in Singleplayer and in some cases in Multiplayer (UYA rangers). Splines are also used in Deadlocked to dynamically construct a mesh for water puddles and acid pools.
Water Tristrip moby. References a spline to construct a mesh from its vertices. Rendered with a special shader. Used for water/acid.
Areas are groups of splines and/or cuboids.
In Deadlocked Multiplayer, an Area
is used to group all the hill cuboids together. When adding and deleting hill cuboids, make sure that the hill area is updated with the correct cuboids.
The Hill moby references an area that groups each of the hill cuboids together. A blue line is used to show the relationship between the hill moby and the referenced area/cuboids.
In Deadlocked, there is a moby
that will render groups of splines with a water shader. The only place this is used in Multiplayer is for Battledome's lava.