RTX Kit loading objects other than in gltf format

Greetings.

I had recently purchased an RTX Gforce graphics card with the intention of using it for real time ray tracing of generated 3D geometry.

I have downloaded and installed the RTX kit from Nvidia with the intention of using it to help me understand and use this kit to display 3D objects ray traced in real time. It was after all recommended as starting point in the Nvidia developer web page.

After playing with the different scenes and changing parameters I dived into the code to find out how the scenes and objects were loaded so I could start using it in my own applications and load other 3D objects.

What I found was that it seems the code was set up to only import json text files that specified only one kind of object file. That being of 3D objects in an unfamiliar gltf format that seems to then reference some accompanying binary file. This was all done within a NVidia donut framework.

A framework that can only load one kind of 3D file format seems rather odd. Am I missing something here. Can this stater Kit load other 3D file formats like obj, ply or stl. If so it, would be greatly appreciated is someone can direct me to where or how this is achieved using this starter kit.

Otherwise it looks like this so RTX starter kit is more of a demo than anything else to show off the RTX capabilities than as a source material to be used to incorporate or develop into applications. And It looks like I will then have to go into other unfamiliar territory of Optix and Cuda to build up what it seems this donut framework of this “starter kit” is missing. To load and display 3D objects other than in a gltf format, and to display proceduraly generating 3D geometry ray traced in real time.

Thanks in advance for any help.

HI @ddomino, welcome!

If you’re just beginning your journey with RTX and/or 3D ray tracing in general, I might recommend starting with a tutorial in your platform of choice, perhaps DirectX (DX12 Raytracing tutorial - Part 1 | NVIDIA Developer) or Vulkan (NVIDIA Vulkan Ray Tracing Tutorial | NVIDIA Developer) or OptiX (How to Get Started with OptiX 7 | NVIDIA Technical Blog).

RTX Kit represents an open source collection of frameworks and samples that support advanced Neural Rendering technologies like Neural Shaders, Neural Texture Compression, and Mega Geometry. RTX Kit has some focus on real-time applications, and games & game developers specifically. While there is a blog post about getting started with RTX Kit, it is not really the best place to start for introducing people to ray tracing 3D geometry, nor is it meant to be a framework for 3D file formats or geometry interchange. All of the sample code in RTX Kit is focused on showing users how to use new APIs like Cooperative Vectors, DLSS, Clusters, and Shader Execution Reordering, things that are orthogonal to the file formats.

For what it’s worth, GLTF is an industry standard and modern file format that may be worth familiarizing yourself with. It is specifically designed for portability and for fast loading:

While OBJ, STL, and PLY are tried and true formats that are very easy to use for small projects, people tend to use them in non-optimal ways that don’t scale well to large projects and large file sizes, for example by implementing only the ASCII data paths which are really slow to read and write. This is one reason game engines tend not to use these formats. There are also some relatively standard and easy to use tools to, for example, convert OBJ to GLTF and vice-versa. If OBJ (for example) is your preferred format for authoring models for ray tracing while taking advantage of sample code that uses GLTF or some other format, it may be worth investigating a workflow where you can use both.

–
David.

Thank you for this information.
Well then, it seems I will need to be delving into Optix and Cuda or Vulcan then, or continuing using OpenGL and raster graphics to display 3D Graphics in real time. I had already reviewed the Optix and Vulcan alternatives and am leaning more towards the Optix option

I was expecting the RTX Kit to be similar to using OpenGL where I only needed to supply the geometry and some material parameters to an equivalent of a vertex buffer that is passed and used by some equivalent of OpenGL shaders to render that geometry in 3D, only that all of the code to draw in ray traced 3D was not needed to be supplied as the RTX side of things would handle this.

Looking at the code, I thought I found something resembling that, but that I could not clearly figure out how the scene data was being dissected and loaded into memory to be passed on. It all looked different to what I am used to. I needed documentation or a simple example of how things are done, which I could not find.

I was hoping to find a shortcut to displaying and merging real time 3D graphics into an application I have developed using OpenGL. I thought this RTX toolkit might do it.

But it may be better anyway using Optix and Cuda anyway. I have already downloaded these and am ready to dive into as some of the RTX features seems be available to be accessed in optix. From what was said above, this RTX toolkit may be beyond what I needs , if not my programming skills.

Much appreciated and thank you.

When using OptiX, there exist examples which show how to load GLTF and other file formats inside the OptiX advanced samples on github.

There is a dedicated example just for GLTF, and other examples using the ASSIMP library to load other formats like OBJ, STL, PLY etc. though only the geometry is imported and materials are assigned differently, via some scene description text file.

These examples aren’t “real-time” rendering per se, but implement progressive full global illumination renderers with different features in increasing complexity.

You’ll find the links in the sticky posts on the OptiX sub-forum here, as well when reading the list of related threads directly below this very thread.

https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/4

1 Like

Greetings.

Again, thank you for this information. It will help as I use the ASSIMP library in my own projects.

I Think I have found what I am looking for in one of the sample projects of the Optix installation called optixPathTracer. On a brief look, It looks familiar and similar in structure to code I have written in my own application, so I suspect once I have gone through a few tutorials and documentation to understand Optix ans cuda better, all should be fine. I now have something I can use as a guide to incorporate into my existing code outside of using OpenGL.

Regards

Greg Searle

If you’re familiar with path tracing, you’ll find that the OptiX advanced examples are also implementing uni-directional path tracers, and with importance sampling of BSDFs and lights.

The optixPathTracer SDK example is very hardcoded in its scene setup and using a single geometry acceleration structure which is actually not the fastest method on RTX boards, and is limiting the flexibility you would get with instance acceleration structures on top.
(Read through the OptiX developer forum threads about performance which explain this.)

When looking at the advanced examples, the fastest renderer in there is the rtigo12 (see the root README.md there).

If you’re familiar with OpenGL, the most complete CUDA-OpenGL interoperability implementation for the output image display can be found inside the GLTF_renderer. (See its own README.md inside the doc folder for explanations.)

It’s also the only example which shows how to use CMake native features to setup a standalone solution which handles both native CUDA kernels and OptiX device code translation.
I would highly recommend to use this build setup for own application frameworks.

The GLTF_renderer is using native CUDA kernels for the expensive morphing and skinning animations supported by glTF.
That also means it’s showing fast acceleration structure rebuild and update mechanism you might need for your real-time rendering developments.

Again, thank you for this information, but it looks like I will probably not be using Optix.

I just cannot set up a Visual Studio 2022 project from scratch which will compile the simple HelloOptix example. My skills and knowledge are intermediate and non professional, so are not highly advanced. Especially with CMake. Never the less, the whole setup of Optix seems to be so sensitive to the use of .lib and .dll files as used by the samples that any deviation away from them creates linking and other errors.
There also seems to be a dependence upon an older version of ImGui that cannot be changed, and some existing code in the Optix SDK that is using depreciated code which requires specific error messages to be disabled as is given by all of the sample projects.
Replicating all the relevant visual studio settings of the original sample for optixHello does not help as a large number of warning C4273 inconsistent dll linkage messages appear. In particular for the imgui version I am trying to use.

And it also seems that going a bit deeper, the Optix SDK seems not to be set up to handle displaying vertices as points, which I need as my application primarily displays vertices as a point cloud. These can be displayed as voxels upon request as a 3D primitive shape.

I have downloaded the Optix_Apps and began to follow the build instructions in which the above mentioned GLTF_renderer exists within, but have come across the usual problems that I have in almost every installation using CMake with errors stating it could not find this and that, or some other error.

The primary reason I want to try and use RTX and Optix is that I thought it would be no more difficult to use to render in 3D than OpenGL. But mostly because I wanted to see if the debugging of any shader like code would be easier than OpenGL shader code if one could step through the code and inspect the state and values of the variables that cannot be done in a GLSL file.

What I think is really needed is just one simple starter, stand alone template project for users to build upon. That is what I tried to do and failed. Visual Studio has a Cuda template for a starter cuda project. Optix, in my opinion, needs a similar template in visual studio, or a single starter visual studio project that can be downloaded.

Until such an Optix starter project becomes available, for me at least, I can’t at this stage see myself using it. I may keep trying though, until I am completely exhausted at doing so.

Again, Thank you and much appreciated for the help provided.
Regards
Greg Searle.

Hi @ddomino, can you share a point cloud data set? I might have time to work on it.
Best,
Leonardo