Game Assets

By default, a Rayve project contains folders for assets, exports and data. The assets folder is for storing original asset sources. The exports folder is for storing exported assets. The contents of the assets and exports folders can be organized into subfolders as needed. When a game is run in debug mode, the importer will import assets from the exports folder into the deploy/data folder.

The deploy/data folder contains the internal compressed assets that are deployed with the game. If the importer is not mirroring the exports folder correctly, some or all of the deploy/data folder contents can be deleted and the importer will reimport what is missing. Do not delete the actual deploy/data folder though.

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 greatly speed up import).

Geometry must not have scaling in the transform matrix. All scaling must be baked into the mesh by the modeling tool. Collision shapes are the opposite - all scaling must be in the transform. Also, translation/rotation of the collision shape must be local to the parent mesh.

Importing

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

Files:

v = Entering a subfolder
^ = Leaving a subfolder
M = Material
I = Image
F = Font
S = Sound

[P:] = Prefab
Prefab Contents:

L = Light
C = Camera
M = Mesh
S = Collision shape
X = Null node
U = Unknown (ignored)

These letters can also be lower case, which indicate the item was deleted from the data folder to mirror the exports folder.

Images

Only .png files are supported. To import an equirectangular background image, add the dimension of the skybox side to the file name, then add '.sky'. For example, "mybgd.2048.sky.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]

All parameters besides fontsize are optional.

Prefabs

Only .fbx files are supported. Prefabs can contain one or more lights, cameras, static meshes, animated meshes, collision shapes and null nodes. Add '__' or '___' after the object name to append a type name in the modeling tool. '__' is a normal object. '___' is a collision shape.

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 subfolders in a materials folder 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:

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

For example:

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

There must always be an entry for Rayve's recognized name too.

When adding material role names to the conversion file, watch out for names that are contained in other names. In the above list, "basecolor" and "base-color" contain "color". If a name contains another name, it must come before the name it contains.

Rayve's recognized PBR role names are: albedo, normal, metalness, roughness, emissive, opacity, lucence, refraction, ambient.