Editing User:Caio/GSoC2023/FinalReport
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<h1>Final Report</h1> | <h1>Final Report</h1> | ||
− | 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 | + | 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 | + | 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 | Branch: https://github.com/cjsb/brlcad/tree/vdb | ||
Line 9: | Line 9: | ||
<h2>Usage</h2> | <h2>Usage</h2> | ||
− | To load a VDB object, the user must use the ''in'' command. After that, the user interface will ask for 3 | + | 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. | The application ''mged'' was used to load and visualize a VDB object, as can be seen in the image below. | ||
− | [[File: | + | [[File:MgedVDB.PNG]] |
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. | 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. | ||
Line 19: | Line 19: | ||
[[File:SphereVDB.png|300px]] | [[File:SphereVDB.png|300px]] | ||
− | Note that the user must change the ''# of Processors'' to 1 in ''Advanced Settings'' since the parallel | + | 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 [https://www.openvdb.org/download/ OpenVDB website]. |
<h2>Implemented functions and structures</h2> | <h2>Implemented functions and structures</h2> | ||
Line 25: | Line 25: | ||
* rt_vdb_internal: structure that stores the name of the VDB file and a pointer to the grid handle of the VDB object. | * 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 | + | * vdb_specific: structure that is prepared before the ray tracing and stores a pointer to the VDB grid. |
<h3>Functions</h3> | <h3>Functions</h3> | ||
− | * | + | *A |
− | * | + | *B |
− | |||
− | |||
− | |||
− | |||
− | |||
<h2>Results</h2> | <h2>Results</h2> | ||
− | Several | + | Several rendering of VDB objects can be found below. |
[[File:TorusVDB.png|450px]] [[File:DragonVDB.png|450px]] | [[File:TorusVDB.png|450px]] [[File:DragonVDB.png|450px]] | ||
Line 44: | Line 39: | ||
[[File:BuddhaVDB.png|450px]] [[File:BunnyVDB.png|450px]] | [[File:BuddhaVDB.png|450px]] [[File:BunnyVDB.png|450px]] | ||
− | Note that the red square is due | + | Note that the red square is due the bounding box visualization. |
<h2>Future Work</h2> | <h2>Future Work</h2> | ||
− | + | * Add support to different VDB scenes, being able to support VDB files with fully volumetric scenes and point cloud. | |
− | * Add support to different VDB scenes, being able to | ||
* Add support to multithreading in the ray tracing which would allow faster image generation. | * Add support to multithreading in the ray tracing which would allow faster image generation. | ||
* Add support to load nanovdb file. | * Add support to load nanovdb file. | ||
− | |||
− | |||
− |