User:Caio/GSoC2023/FinalReport
Contents
Final Report
The main goal of this project is to add support for VDB in BRL-CAD. To achieve this goal, the open source C++ library called OpenVDB library was used and a VDB object is stored into a new primitive called vdb. In order to visualize the object, the necessary functions to ray trace a VDB object was added.
The final report presents how to load and render a VDB object, lists the functions and structures that were implemented and features that could be implemented in the future.
Branch: https://github.com/cjsb/brlcad/tree/vdb
Usage
To load a VDB object, the user must use the in command. After that, the user interface will ask for 3 information: 1) The name of the object; 2) The type of the object (The user must type vdb); 3) The path for the VDB file.
The application mged was used to load and visualize a VDB object, as can be seen in the image below.
Once the object is loaded, the bounding box of the object will appear in the preview interface. After that, the user can perform a ray tracing of the scene and the object will be renderer, as can be seen below.
Note that the user must change the # of Processors to 1 in Advanced Settings since the parallel operations for VDB ray intersector is not implemented. Also, the vdb primitive support only ray tracing of level set VDB objects. Several samples can downloaded in the OpenVDB website.
Implemented functions and structures
Structures
- rt_vdb_internal: structure that stores the name of the VDB file and a pointer to the grid handle of the VDB object.
- vdb_specific: structure that is prepared before the ray tracing and stores a pointer to the VDB grid.
Functions
- A
- B
Results
Several rendering of VDB objects can be found below.
Note that the red square is due the bounding box visualization.
Future Work
- Add support to different VDB scenes, being able to support VDB files with fully volumetric scenes and point cloud.
- Add support to multithreading in the ray tracing which would allow faster image generation.
- Add support to load nanovdb file.