Rayve is designed around using 3D modeling software for creating scenes instead of a dedicated level editor. Prefabs are used for this purpose. A prefab contains a hierarchy of objects and their positions. It can contain parts of a scene, or an entire scene.
A prefab mesh has an .fbx extension like a normal mesh, but has .pfb before the file extension, for example "myprefab.pfb.fbx"
Meshes with the same name are instanced in the engine, even if the meshes in the prefab are not instanced.
When importing a prefab, a .txt file will be generated that outlines the prefab hierarchy.
Meshes use the modelling tool's mesh node type. Translation and rotation must be in the mesh's transform, but but scaling must be baked into the geometry. UV's must be present even if the mesh is not using textures.
Collsion shapes can be any type of mesh in the 3D modeler that helps in visualizing the collision shape. Only the scale/rotation/position of the mesh is used. Collision shapes must be a direct child of the mesh node in the hierarchy. Position must be relative to the mesh. In contrast to meshes, the size of a collision shape must specified by scale in the transform and not be baked into the mesh. Multiple collision shapes can be used per mesh.
Markers and sounds are null nodes.
Fields are null nodes used as parent nodes of one or more collision shapes. Fields are used as invisible barriers or sensor objects.
A modeling tool's built in light and camera objects are imported. They can be given a custom type, or can use a default type. These objects might need to be overriden with a custom type and transformed if they do not point in the same direction after import as the modeling tool. Light/camera settings are not imported as they are widely varied in modeling tools. Use custom object types that have specific settings and reference those in the modeling tool.
When objects are grouped in the modeling tool into folders or collections, the grouping is ignored when importing.
Prefab names consist of a name and a type, separated by double underscores. For example, "myname__mytype'. The name identifies a specific object, and the type specifies the category of object. The importer ignores objects in the prefab that don't use this naming convention.
Keep names unique so the modeling tool does not add a number after the name. A name can be kept unique by adding a number after the name part of the special prefab name: myname2__mytype. Child objects may or may not have the same type as the parent, depending on how the child object is handled in code.
Custom types are a name given by the programmer for specific types of game objects. These types are tied to a C++ class in the game. Custom types must be handled by overiding the OnLoadObject() callback in the prefab.
A prefab automatically creates scene entities for the default object types below. Any default collision shapes will also be added to the physics engine automatically .
Object Types: