How can I use OptiX6.5 to achieve dynamic model deformation and real-time ray tracing

Hi there, the answer to both questions is yes, and Detlef shared some resources for achieving your goals with OptiX 6.5. The optixDynamicGeometry sample in the OptiX 6.5 SDK demonstrates moving instances around. Updating a mesh is the same idea, you need to first upload the new mesh to the GPU (or better yet update the verts directly in a GPU buffer using CUDA-interop), and then rebuild or refit the acceleration structure associated with that mesh as well as update the parent acceleration structure if the outer bounds of the mesh changed.

There are several other old threads here on the forum about how to achieve fast enough updates for real time using OptiX 6.5. The first link here in particular has some information about how to minimize your update times.

Please do not recommend OptiX7.0 or later, I am using OptiX6.5.

We understand that OptiX 7 is a big change for you. Please also understand that OptiX 7 is by far the best answer to your question, and we would not be doing our jobs if we didn’t recommend it. OptiX 6.5 was not designed for real-time use, and OptiX 7 is designed for real-time. OptiX 7 will give you complete control over memory transfers to the GPU and partial scene updates, which are the most important factors in a real-time design.

If you are just starting a new real-time project from scratch, it is likely to take you a long time anyway, and you are likely to have difficulty optimizing (as you can see in the threads Detlef and I have linked to). We want to give you the best advice possible, which is why we advise re-considering the use of OptiX 7. I apologize for doing exactly what you requested we don’t do, so please forgive me, and please understand the entire reason for OptiX 7’s existence and backward-incompatible design choices is to answer the very question you are asking. Many people before you have asked the same question. It is difficult in OptiX 6.5 and earlier to achieve real-time updates with scenes of medium to high complexity, and we worked hard to fix this exact problem with OptiX 7. Please consider that you may end up spending more time trying to achieve real-time updates in OptiX 6.5 and being frustrated than it would take to learn and build your project with OptiX 7.

Please don’t be mad at me. :) Think about it, and if OptiX 6.5 remains your choice we will be here and continue to do our best to help you achieve real-time updates.


David.