-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the Asuna wiki! Asuna is a renderer based on vulkan ray tracing pipeline.
This wiki documents the usage, file format, and internal design of the Asuna renderer. It is currently a work in progress, hence some parts may still be incomplete or missing.
Scene is described by a json file in Asuna. A typical scene description json is shown as below:
{
"state": { ... },
"camera": { ... },
"lights": [ ... ],
"textures": [ ... ],
"materials": [ ... ],
"meshes": [ ... ],
"instances": [ ... ],
"shots": [ ... ]
}Scene description file is typically composed of 7 parts:
-
state: settings for path integrator and post processor. This part is required for the scene file. -
camera: settings for camera used in the scene. Up to now, Asuna supports only one camera per scene. This part is required for the scene file. - ➕
lights: all the lights in the scene. This part is optional. - ➕
materials: all the materials in the scene. This part is optional. - ➕
textures: all the textures in the scene. This part is optional. -
meshes: all the meshes in the scene. This part is required for the scene file. -
instances: all the instances in the scene. A instance is composed of amesh, amaterialand a transformation used for that mesh. This part is required for the scene file. - ➕
shots: shot is used to describe the pose or extrinsic parameter of the camera and thestateused for that pose. A scene can have multiple shots, so you can render multi view images. This part is optional.
Example scene file can be found in Cornell Box and Asuna-Scenes.
For more details of forementioned 8 parts, please refer to their corresponding pages.
The use of textures, materials and meshes is in declaration-reference manner. For example, if you want to create a material which uses texture A as normal map, you should first do declaration: put A in textures part of scene description file; In addition, if you want to create an instance that uses mesh B and material C, you should put B in meshes part and C in materials part. A example declaration-reference procedure is shown below:
"textures": [
{
"name": "cloth",
"path": "textures/Clothes_emissive.png"
}
],
"materials": [
{
"name": "cloth",
"type": "brdf_emissive",
"radiance_texture": "cloth"
}
],
"meshes": [
{
"name": "cloth3",
"path": "Cloth3.obj"
}
],
"instances": [
{
"mesh": "cloth3",
"material": "cloth"
}
]where texture "cloth" is referenced by material "cloth", mesh "cloth3" and material "cloth" are referenced by instances[0].