You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been using LuisaRender for scene rendering and I’m really impressed with its efficiency and performance. However, I’ve noticed that particles (represented as sphere primitives) are created as meshes in the scene. This can be memory-intensive, especially when rendering a large number of spheres or particles, even when the subdivision is set to 0.
I understand that OptiX, which is used in LuisaCompute for ray tracing, supports sphere primitives. This feature could potentially reduce the memory footprint and improve the efficiency of rendering scenes with a large number of spheres or particles.
In the LuisaCompute code, specifically in the file [src/backends/cuda/optix_api.h], I noticed that sphereArray is defined in BuildInput but it doesn’t seem to be used anywhere. I’m wondering if it would be possible to add support for sphere primitives in the ray tracing process using this or a similar approach.
It would also be helpful if you could provide some guidance on how to modify the LuisaCompute and LuisaRender code to support this functionality. For example, how to add spheres in CUDA in LuisaCompute and how to modify the accel_option in LuisaRender.
The text was updated successfully, but these errors were encountered:
We're very encouraged to hear that you're using Luisa in your work and thanks for the valuable feedback!
The optix_api.h file is generated from the official OptiX headers so the original sphere interfaces are included but we haven't made wrapper interfaces for it as a LuisaCompute feature.
As an alternative, in LuisaCompute (but not LuisaRender), we currently support procedural primitives, which are generic AABBs with user-defined intersection/any-hit functions. Examples can be found in test_procedural (featuring custom sphere primitives) and test_path_tracing_cutout (featuring user-controlled intersection behavior). I guess this feature should be sufficient for implementing an efficient particle system.
The current LuisaRender design is somewhat coupled with triangle meshes and hasn't incorporated other primitives into its scene geometry representation. To extend the geometry, the main files to change include
LuisaRender/src/base/shape.[h|cpp]: the base class for all primitive/instanced shapes;
LuisaRender/src/base/geometry.[h|cpp]: controlling the scene geometry representation and ray intersection; and
LuisaRender/src/lights/diffuse.cpp: the area light plug-in that samples the surfaces of primitives.
This would be a very meaningful extension for the renderer and I'm willing to implement it soon. I might do the refactoring in the following week.
Hello,
I’ve been using LuisaRender for scene rendering and I’m really impressed with its efficiency and performance. However, I’ve noticed that particles (represented as sphere primitives) are created as meshes in the scene. This can be memory-intensive, especially when rendering a large number of spheres or particles, even when the
subdivision
is set to 0.I understand that OptiX, which is used in LuisaCompute for ray tracing, supports sphere primitives. This feature could potentially reduce the memory footprint and improve the efficiency of rendering scenes with a large number of spheres or particles.
In the LuisaCompute code, specifically in the file [src/backends/cuda/optix_api.h], I noticed that
sphereArray
is defined inBuildInput
but it doesn’t seem to be used anywhere. I’m wondering if it would be possible to add support for sphere primitives in the ray tracing process using this or a similar approach.It would also be helpful if you could provide some guidance on how to modify the LuisaCompute and LuisaRender code to support this functionality. For example, how to add spheres in CUDA in LuisaCompute and how to modify the
accel_option
in LuisaRender.The text was updated successfully, but these errors were encountered: