4 ms·
CUDA Accelerated Raytracer
- two_handfuls 3y agoI feel like this must be pretty early on if there isn’t yet a checkmark for the feature “lights.”
- bhouston 3y agoYeah this is neat but it is 90% not done and that is being generous. For a open source path tracer with a full glTF compatible material model and lighting and runs in the browser check out: https://github.com/gkjohnson/three-gpu-pathtracer https://github.com/gkjohnson/three-gpu-pathtracer Or if you want hardcore features look at Moonray from Dreamworks: https://github.com/dreamworksanimation/openmoonray https://github.com/dreamworksanimation/openmoonray
- LiamPowell 3y agoSee also, nVidia's guide on writing a CUDA accelerated raytracer: https://developer.nvidia.com/blog/accelerated-ray-tracing-cuda/ https://developer.nvidia.com/blog/accelerated-ray-tracing-cu...
- juunpp 3y agoGood job. It's a decent undertaking for a single person. From a cursory glance, you might also be able to speed up the CPU backend by getting rid of the shared_ptrs and defining a stricter memory ownership model.
- birdyrooster 3y agoDamn this is sick! Grats on your effort so far!
- fzy95 3y ago"the project now uses CUDA, so i changed to C++11 since thats what nvcc supports." I feel like nvcc supports at least 17 maybe even 20 already.
- pjmlp 3y agoIndeed, C++20 already, although some stuff is still missing like modules.
- eurekin 3y agoWhat's the story with regards to high dynamic range and tone mapping in raytracers in general? I only know of Filmic Blender to advertise this as a feature
- bhouston 3y agoMost professional renderers operate in linear floating point space and thus handle hdr with ease.
- bufferoverflow 3y agoWhy not help Blender instead of reimplenenting it all?
- Philpax 3y agoBlender already has CUDA-accelerated raytracing; this is a hobbyist building their own raytracer for the fun of it.
- flykespice 3y agoHave you heard of the word "hobby"?
- hospitalJail 3y agoI'm kind of with you, but I suppose its a culture/mind-set thing. I hate reinventing the wheel, but who knows what kind of innovation could happen by combining unique experiences and lessons someone can learn for future use. For instance, I made a laser pointer, I could have bought one for $10-$100, but I decided to make my own, learn about Electrical Engineering and optics. I never finished it, but it taught me a ton about EE along the way. Now I am quite comfortable with EE, except the parts I'm uncomfortable about ofc :)
- dahart 3y agoTo learn! Everyone should write a ray tracer (or three) on their own before even attempting to dive into a big open source production renderer. An established high profile project isn’t a great place to learn the fundamentals, since those parts are already done, and they don’t necessarily want people contributing who aren’t ready for it or are just there for personal learning purposes. It’s not fair to call it ‘reimplementing’, this project isn’t trying to be Blender. There are loads of other reasons to write a non-Blender renderer aside from learning, including writing one for games or interactive or scientific applications, needing special features, doing research and experimenting with rendering algorithms and data representations, needing a very small/fast/light renderer codebase, etc. etc.
- _ea1k 3y agoTBH, I'm amazed at how efficient CUDA is compared to CPU on even a fairly lowly GPU. RTX 3050ti vs AMD Ryzen 5 6600H and I see close to 30x in pytorch. It makes me wonder if CPUs will start adding a lot of matrix math specific extensions in the near future.
- pjmlp 3y agoThat was Larrabee whole idea, and AVX is what is left of it.
- markisus 3y agoI thought ray tracing was very branchy type code which is not suited for GPU. If I have a bundle of rays strike an object, they could all scatter different directions and end up following very different paths in the scene. Is it hard to make all rays execute the same code at the same time?