Is there any open source GPU ray tracer?

Started by
3 comments, last by 3Ddreamer 11 years, 2 months ago

It's my first post on GameDev. Exciting to find such a nice place!

I've started to write my ray tracer, but things are getting harder than I thought. Is there any opensource cuda ray tracer that I can take a look at? better to be with full whitted ray tracing functionality and accleration data structure. I've searched some but non of them work as I expected.

thank you very much!

Advertisement

Certainly. Have a look here: https://github.com/peterkutz/GPUPathTracer. It's a physically based path tracer, I it uses a kd-tree but I am not sure if they actually got around to implementing it. Well, actually, CUDA already has kd-tree code (cukd). There's also tokaspt, which is a CUDA port of the "smallpt" program. An OpenCL port also exists, but has less features.

As for whitted ray tracing, though, I don't know of any, but that's probably because I don't look around for that. You should be able to modify the code to a whitted model fairly easily, though, the hardest part in a ray tracer is getting the initialization logic and various subsystems (ray-scene intersection, asset loading) up, the actual rendering code is very simple.

Plus, why would you implement whitted ray tracing on a GPU when rasterization can achieve pretty much the same visual results much faster? I believe that is why people prefer to implement realistic rendering methods on the GPU, rather than basic ray tracing, but there have been whitted benchmarks published so there must be some code somewhere.

Also, welcome to GameDev! smile.png

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Yeah, ray tracing is so demanding that I never use it in my work. It simply is not needed for a game with the alternatives.

Someday, maybe within 10 to 20 years, computer power will allow significant ray tracing in any game with all the other assets, but until then it is relegated to image rendering for the most part.

Master shader technology and you will forget about ray tracing. Usually you would get more real life, realistic appearance with shaders anyhow.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

Master shader technology and you will forget about ray tracing. Usually you would get more real life, realistic appearance with shaders anyhow.

It might surprise you just how many shaders implement mini-raytracers internally, or use raytracing techniques...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

There are plenty of hybrid technologies out there, but fact is that raytracing is demanding on performance.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

This topic is closed to new replies.

Advertisement