Display the imported gltf model and the created floor in the same scene

Hello Everyone,I created a program based on the optixMeshViewer case. After the creation was completed, I imported a model of a water bottle. This program can run normally.

After that, I want to create a floor in this program so that both the water bottle and the floor are displayed in the scene.

However, when the program is running, the scene only displays the water bottle, and does not display the created floor.

How should I change my program.

I get the address of my model in main.cpp, then create the floor and load my model in scene.cpp

The creation of the floor and the loading of the gltf model are in scene.cpp, and the file has been uploaded

The file to get the model is in the huizong function of main.cpp。

other:win10,vs2019,Optix7.2

main.cpp (30.3 KB)

Scene.cpp (67.9 KB)

Hi there,

I’m not sure what’s going wrong, can you narrow down your question to something more specific? Can you describe the conceptual changes you’ve made to add another object? Have you stepped through in a debugger and observed where things go wrong? For example, have you checked that you’ve actually built 2 GAS structures, and that you insert both of them into your IAS? Have you verified you added the floor’s SBT entries into your SBT? Have you checked whether the intersection function is being called?

It’s probably a very simple missing link somewhere, like the new model not being added to the IAS or SBT like you think, or a module or pipeline setting somewhere. But given the large number of changes in your code compared to optixMeshViewer, some of which are not used, and also that fact that it’s incomplete (we can’t build or run your code), it would take a long time to understand what you did and find what went wrong. Could you re-try adding only a floor object into a fresh version of optixMeshViewer with absolutely minimal changes (without the multi-gpu code, without any unused changes, without the temporary 2nd SBT, without any other models, etc.), and then send the minimal complete reproducer that we can run, if you still can’t get it to work?


David.