News for hackers. Stuff that matters.
Re:CUDA Accelerated Raytracer by two_handfuls on Thursday June 15, 2023 @10:53PM (#36350490)
I feel like this must be pretty early on if there isn’t yet a checkmark for the feature “lights.”
Re:CUDA Accelerated Raytracer by bhouston on Thursday June 15, 2023 @11:55PM (#36351006)
Yeah 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

Or if you want hardcore features look at Moonray from Dreamworks:

https://github.com/dreamworksanimation/openmoonray

Re:CUDA Accelerated Raytracer by maxilevi on Friday June 16, 2023 @01:02AM (#36351545)
Yes, there are definitely better resources out there. This is just a WIP I had that I thought I’d share.
Re:CUDA Accelerated Raytracer by tuyiown on Friday June 16, 2023 @06:04AM (#36354074)
People might feel misguided with the submission title not mentioning that. I liked the pictures though !
Re:CUDA Accelerated Raytracer by LiamPowell on Friday June 16, 2023 @12:01AM (#36351048)
See also, nVidia's guide on writing a CUDA accelerated raytracer: https://developer.nvidia.com/blog/accelerated-ray-tracing-cu...
Re:CUDA Accelerated Raytracer by juunpp on Friday June 16, 2023 @12:42AM (#36351375)
Good 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.

Re:CUDA Accelerated Raytracer by birdyrooster on Friday June 16, 2023 @12:59AM (#36351519)
Damn this is sick! Grats on your effort so far!
Re:CUDA Accelerated Raytracer by fzy95 on Friday June 16, 2023 @03:50AM (#36352965)
"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.

Re:CUDA Accelerated Raytracer by pjmlp on Friday June 16, 2023 @04:53AM (#36353494)
Indeed, C++20 already, although some stuff is still missing like modules.
Re:CUDA Accelerated Raytracer by eurekin on Friday June 16, 2023 @04:21AM (#36353209)
What'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
Re:CUDA Accelerated Raytracer by bhouston on Monday June 19, 2023 @07:54AM (#36389984)
Most professional renderers operate in linear floating point space and thus handle hdr with ease.
Re:CUDA Accelerated Raytracer by bufferoverflow on Friday June 16, 2023 @07:01AM (#36354545)
Why not help Blender instead of reimplenenting it all?
Re:CUDA Accelerated Raytracer by Philpax on Friday June 16, 2023 @08:01AM (#36355114)
Blender already has CUDA-accelerated raytracing; this is a hobbyist building their own raytracer for the fun of it.
Re:CUDA Accelerated Raytracer by flykespice on Friday June 16, 2023 @09:09AM (#36355949)
Have you heard of the word "hobby"?
Re:CUDA Accelerated Raytracer by hospitalJail on Friday June 16, 2023 @09:26AM (#36356226)
I'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 :)

Re:CUDA Accelerated Raytracer by dahart on Friday June 16, 2023 @09:55AM (#36356620)
To 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.
Re:CUDA Accelerated Raytracer by jsight on Friday June 16, 2023 @09:40AM (#36356427)
TBH, 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.

Re:CUDA Accelerated Raytracer by pjmlp on Friday June 16, 2023 @05:27PM (#36364146)
That was Larrabee whole idea, and AVX is what is left of it.
Re:CUDA Accelerated Raytracer by markisus on Saturday June 17, 2023 @12:20PM (#36371598)
I 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?