Assets

Data Folder

A folder named 'data' must be provided to the engine.

During development, the data folder recieves files exported from asset creation tools. When a game is run, exported assets will be converted into Rayve's internal compressed format and the original exported assets will be deleted. The asset creation tool's own files should be stored separately in the game project.

The data folder will accumulate converted assets as exports are received. If exports for existing converted assets are found, the converted assets will be replaced with the newly exported versions. If no exports are found when a game is run, the game runs without performing imports.

Assets in a data folder can be organized into subfolders. A game can specify specific subfolders to load with a scene. When a game loads a subfolder, all subfolders within that subfolder are loaded as well.

Assets can be slow to import depending on how much work the importer has to do and how big the files are. Dividing scenes into small groups can speed up workflow by enabling the export of just the subsets of the scene that contain changes.

The data folder is deployed with the game. It must be in the same location as the executable. Remove any extra non-asset files before deploying.

Exporting to FBX

Exporting to .fbx in order to import into Rayve may require some experimentation. In general, scale meshes by .01 on export and leave the axis system the same as the modeling tool. Convert meshes to triangles and calculate tangents if the exporter has these options (will speed up import).

Importing

Import progress will be output while an import is running. The progress codes are:

Files:

v = Entering a subfolder
^ = Leaving a subfolder
[P:] = Prefab
M = Material
G = Geometry
M = Marker
I = Image
F = Font
S = Sound

Prefab Contents:

L = Light
C = Camera
G = Geometry
F = Field
S = Collision shape
D = Directory
U = Unhandled FBX node
X = Not Rayve type

Images

Only .png files are supported. To import an hdri environmental background image, add the target image size to the file name, then add '.hdri'. For example, "mybgd.2048.hdri.png".

Sounds

Only .ogg files are supported. If a sound file is for streaming, it requires a ".stream" qualifier in the name. For example, mysound.stream.ogg".

Fonts

Only .ttf files are supported. A font file should have a .txt file with it of the same name, that specifies the font size for the font.

The parameters are a keyword followed by one or more values:

imagesize [width] [height]
fontsize [font size in points]
firstchar [index of first character in table]
lastchar [index of last character in table]
linegap [number of pixels between lines]

Only fontsize is used typically.

Meshes

Only .fbx files are supported. Meshes must have scaling baked into the geometry. UV's must be present even if the mesh is not using textures. If a mesh file contains multiple geometry nodes, all geometries will be combined into a single mesh.

If a mesh file contains animations, the mesh will be converted to an animated mesh internally in Rayve. When converting an animated mesh, a text file will be created in the project/bin folder that contains the names of the animations.

Materials

The importer can import sets of textures with the same material name and convert them into PBR materials.

For the importer to recognize materials, they must be in a folder that ends with .fbm. For example, * 'mymats.fbm'. Any number of materials folders can supplied, but a materials folder should not contain subfolders, as they are ignored.

Important: All material names must be unique within a scene.

The texture files in the materials folder must be named so that the material name comes first followed by the PBR role name. A PBR role name is the textures's PBR function, such as albedo, normal, etc. All material texture files having the same material name are combined into one PBR material when imported.

The dimensions of textures used in materials should be powers of 2, but do not have to be square.

All textures used to build a material must have the same image dimensions. There is no consistant standard for PBR role names. The importer can use a 'cvtmat.txt' file that contains a rule on each line that tells the importer how to convert PBR role names to the names Rayve recognizes.

The format is:

"Original PBR role name" "Rayve's recognized name"

For example:

"basecolor" "albedo"
"base-color" "albedo"
"albedo" "albedo"

There must always be an entry for Rayve's recognized name as well. Rayve's recognized PBR role names are: albedo, normal, metallic, roughness, emissive, opacity, lucence, refraction, ambient.