Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is there any open source GPU ray tracer?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Tony.Wang   Members   -  Reputation: 109

Like
1Likes
Like

Posted 13 February 2013 - 12:43 AM

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!



Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 8315

Like
4Likes
Like

Posted 13 February 2013 - 01:25 AM

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


Edited by Bacterius, 13 February 2013 - 01:34 AM.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 3Ddreamer   Crossbones+   -  Reputation: 3098

Like
1Likes
Like

Posted 13 February 2013 - 07:53 AM

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


#4 swiftcoder   Senior Moderators   -  Reputation: 9761

Like
2Likes
Like

Posted 13 February 2013 - 10:27 AM

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 - Software Engineer @Amazon - [swiftcoding]


#5 3Ddreamer   Crossbones+   -  Reputation: 3098

Like
0Likes
Like

Posted 13 February 2013 - 10:39 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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS