Acceleration structure

I want to create an acceleration structure (such as KD-Tree) for an obj file(with VS 2010, OPTIX 3.0.1, CUDA 5.5).
How should i do ? I need a case to help me out!

First off, you can’t do it with the setup you describe. You need to register for and download OptiX 3.5.1 with CUDA 5.5.

Then, take a look at the examples in the SDK. The one called “sample2” is a good place to start. It includes the lines:

RT_CHECK_ERROR( rtAccelerationCreate( context, &top_level_acceleration ) );
RT_CHECK_ERROR( rtAccelerationSetBuilder(top_level_acceleration,"NoAccel") );
RT_CHECK_ERROR( rtAccelerationSetTraverser(top_level_acceleration,"NoAccel") );
RT_CHECK_ERROR( rtGroupSetAcceleration( top_level_group, top_level_acceleration) );

Replace “NoAccel” with the type of acceleration structure you want, and you’re on your way.

Skip ahead to “sample6” to see it done for an obj file.

Hi~ I’m working on the same thing lately, I found a project hosted on google code [url]https://code.google.com/p/slash-sandbox/wiki/NIH[/url], which contains a gpu kd-tree and bvh construction code on cuda4.1. I hope this link will be useful for you.

Where can i download the optix 3.5? I cannot find the download link

Where can i download the optix 3.5? I cannot find the download link

You need to register:
https://developer.nvidia.com/optix

Note that OptiX provides different acceleration structure builders internally, but it does not support inserting your own or using the built structure outside of OptiX.