Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Is there any open source GPU ray tracer?

4: Adsense

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   

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!



#2 Bacterius   Members   

13164
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.

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


#3 3Ddreamer   Members   

3826
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   

18210
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] [GitHub]


#5 3Ddreamer   Members   

3826
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.