• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
dpadam450

Best Ray Tracing algorithms

10 posts in this topic

Looking for opinions. I'm generating these structures for collision models to be used for bullet collision as well as to be used to bake global illumination light maps. Suggestions?

0

Share this post


Link to post
Share on other sites

Generic ray to triangle mesh intersection for physics as well as baking light maps. This is not for a ray tracing renderer.

 

You might have better luck googling around for "ray casting" rather than ray tracing, as ray tracing is exclusively connotated to rendering.

0

Share this post


Link to post
Share on other sites

My personal favorite algorithm:

 

1. Download embree

2. Integrate the ray-tracing kernel into your engine/tools

3. Cast lots of rays

0

Share this post


Link to post
Share on other sites
I've implemented the quad-BVH SIMD tree with pretty good success, 1.5 million rays/thread/second on a 3.4 GHz Core i7. It has a number of advantages over traditional BVHs and even KD trees, like doing 4 ray-bounding-box or 4 ray-triangle tests in parallel, plus it generates very shallow trees (no more than 6 or 7 levels). It's a little tricky to implement and you'll have to learn SSE to do it, but it's what I used in my sound propagation library to trace sound rays. It's going to be faster than ray packet tracers in most cases because you don't have to deal with incoherent rays. Edited by Aressera
0

Share this post


Link to post
Share on other sites

Generic ray to triangle mesh intersection for physics as well as baking light maps. This is not for a ray tracing renderer.

What does your triangle mesh data look like? Some scenes are highly amenable to reduction by bounding-volume hierarchy trees; others by octrees or kd-trees; and still others are chaotic enough (like most indoor 3D shooter environments) that you'd need to customize the approach based on other factors. Edited by ApochPiQ
Typo
0

Share this post


Link to post
Share on other sites
I second that the easiest solution would be to use Embree (or other ray tracing library). For high performance ray tracing you probably want either spend a LOT of time on optimizations (or use GPU and spend also a LOT of time on it). Currently state of the are are probably speculative gpu traversal kernels, SplitBVH for scene management (for high traversal speed, for fast build I'd say HLBVH build on GPU) along with Woop triangles (instead of standard). KD-trees aren't commonly used as they were (basically they're giving worse performance on GPU, and also are slower to build). Of course on CPU they're still wide-spread (they give probably best performance for random rays -> being very good for (pre)computing GI), quit fast KD tree ray tracer can be put together in like a month (for newcomer - if he wishes to learn and work hard). I can give you few numbers - SahBVH + Woop Triangles + standard while-while ray traversal kernel on Radeon HD 6a770 - approx 50 to 60 MRay/s (for primary, like 30% less for diffuse rays). Building this-like ray tracer will take you few weeks of hard work (if you know what you're doing - e.g. you wrote few raytracers & you know all languages you use as better as your native-language). You can do a lot better (even going over 100 MRay/s), but that takes quite a while of reading & understanding papers, doing experiments, etc. If you don't have time for this - just grab Embree (or other ray tracing library, there are also gpu ray tracers our there!), and you'll have it instantly.
1

Share this post


Link to post
Share on other sites

 there are also gpu ray tracers our there!

 

Indeed. Optix is actually quite good, if you can live with the Nvidia-only restriction.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0