1

I'm trying to implement a simple raytracing code using CUDA.

I'm stuck at the modeling part. im trying to figure out how to model a 3d space with objects (start with a simple 3d space containing a 3d cube in the middle).

i've read about hybrid projects with openGL and CUDA but those articles were too general - and as i said i am new at this.

are there any libraries/code for implementing such a 3d model?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Wops
  • 983
  • 9
  • 23
  • I would work on that accept rage. Just sayin' – datenwolf Dec 11 '11 at 13:36
  • got it datenwolf, thx. im new too stackof too :) – Wops Dec 11 '11 at 14:28
  • Do you need to use CUDA at this stage? I would recommend that you write a ray tracer in the programming language you're most proficient in. After you have a working ray tracer, then create a CUDA version. – Heatsink Dec 11 '11 at 20:35
  • actually no, i dont have to do the 3d model in CUDA, but i do need the threads running in CUDA later (for the raytracing) to use the objects created in the model – Wops Dec 11 '11 at 21:29

1 Answers1

1

If you want to do ray tracing in CUDA, take a look at NVIDIA's OptiX, which is an API for GPU-accelerated ray tracing. There are several example codes in the SDK ranging from simple to sophisticated. They will demonstrate how to model 3D objects in your renderer.

On the other hand, if you're new to both CUDA and ray tracing, you probably don't want to tackle both at once :)

Jared Hoberock
  • 11,118
  • 3
  • 40
  • 76
  • Thanks for the reply. I downloaded OptiX, installed and ran the samples. I am having trouble understanding where is the work environment, how to compile the code, or even which kind of files are there? I read the tutorial and programming guide. Do you have any examples or tutorials? – Wops Dec 13 '11 at 10:40
  • well, eventually i used **Blender** to model the room to *.obj files and then i used __trier's raytracing tutorial__ (search google) information to read the *.obj files into openGL code – Wops Jan 06 '12 at 15:42