jan-van-bergen / gpu-raytracer Goto Github PK
View Code? Open in Web Editor NEWGPU Raytracer from scratch in C++/CUDA
License: MIT License
GPU Raytracer from scratch in C++/CUDA
License: MIT License
First of all thank you Jan for this great library!
I try to build this on my old GPU (CC 3.0 and CUDA 10.2 as maximum compabilility). I solved some problem with "--std=c++17" or __ldg but I can't to solve a problem with exception:
CUDAKernel.h line 120 failed with error CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES! too many resources requested for launch
I get exception on calling the execute_material_kernel
. I checked parameters of cuLaunchKernel
and it's fine.
If I disable scene.has_diffuse, scene.has_plastica and scene.has_dielectric
I get a black scene but everything works. I am trying to decrease some value: BATCH_SIZE, PARAMETER_BUFFER_SIZE, WARP_SIZE, MAX_REGISTERS, width and height the screen, bounse/samples, scenes but nothing helps. What parameters of scene could I change for my weak configuration? :(
Thank you!
Hello!
How processed instances in CWBWH?
How this nodes is marked in cuda and c++?
Thank you
Hello again,
I know that the original developer has passed but was not sure if you had picked up any development on this, or were you just posting for Zuen to keep it online.
I really like the quality of the results that I see on the Github site for the GPU-Raytracer and would like to do some work with it towards seeing what it might take to integrated it into the 3D engine that I am working with now, as well as to see what potential and effort it might take to make it really a quality real-time ray tracing engine.
I'm sure that this will be much more work than it sounds above, but the results could be simple amazing and could lay the groundwork for a simpler 3D engine that could actually compete with Unreal Engine and CryEngine to name a few. (Maybe wishful thinking, but you never know.)
Any way I see that a dependency for Windows 10 is CUDA 11 and I was wondering if you had tried to compile it to run with CUDA 12.01 (latest) version?
Thanks again.
Hello,
I am interested in real-time raytracing for a project that I am working on now and was wondering if your code renders in realtime?
Thanks
When trying to run without modifying any code, because there is no .svbh file, SBVH will be built automatically, but an error will be reported during the build process:
Assertion failed: goes_left || goes_right, file E:\Codes\GPU-Pathtracer-master\SBVHBuilder.cpp, line 253
At this time,BVH_TYPE=BVH_CWBVH.
If you use the release mode to build, although there will be no error, it will be permanently stagnant and will not be rendered.
Your work is excellent, but I found that the program has been stuck in the global_buffer_sizes.set_value(*pinned_buffer_sizes); statement in the Pathtracer.cpp when I run it after compiling. Do you know what the problem is and how to solve it?
GPU-Raytracer/Src/BVH/Builders/SBVHBuilder.cpp
Lines 50 to 54 in 463267f
At line 53, why a dummy node is inserted?
In my opinion, only the memory of root node should be allocated before calling build_sbvh().
Thanks.
Very very impressive work, it's really nicely done, congrats.
What is the license for code ?
Hello, I wanted to build this application but there are no build instructions, no makefile and no CMake files which would have made the process obvious. This obviously looks very cool and I want to play with it.
Your project is excellent. But when I try to run it, I get stuck on line 984 in Pathtracer.cpp( global_buffer_sizes.set_value(*buffer_sizes); ). Do you know what happened and how to solve it? Thank you.
I think the assignment should go to ray_cone_width in line 233.
GPU-Raytracer/Src/CUDA/Pathtracer.cu
Lines 229 to 234 in edf3be4
According to Ylitie et al. 2017, each BVH8 node stores an 8-bit imask field to indicate which of the children are internal nodes.
So I think variable node_internal_count in line 309 and line 307 should be replaced by variable i. Figure 5 in the paper shows this pattern.
GPU-Raytracer/Src/BVH/Converters/BVH8Converter.cpp
Lines 306 to 312 in a374258
Thanks.
Is qbvh fast in traverse?
Is qbvh builder use sah and bins on building stage?
Is qbvh faster then others?
Which bvh is faster in traverse and building and quality?
After hitting a new mesh, only origin and direction are transformed.
GPU-Raytracer/Src/CUDA/Raytracing/BVH2.h
Lines 105 to 109 in 6559ae2
But transform_inv may contains scale transformation.
GPU-Raytracer/Src/Renderer/Mesh.cpp
Lines 24 to 27 in 6559ae2
If scale is not identity matrix, ray.direction will not be a normalized vector after transformation. Then we get wrong ray_hit.t in this algorithm.
GPU-Raytracer/Src/CUDA/Raytracing/Triangle.h
Lines 148 to 174 in 6559ae2
So I think we should scale tMin and tMax when transforming ray.origin and ray.direction.
Thanks for your any reply.
Dont know where else to ask this, but i wanted to ask as this project is super impressive
I was wondering where you learned about how to implement all these things in this project, as its something i am interested in myself
also for building the CWBVH, does it use SBVH or the standard binary BVH? if it uses the standard binary BVH, where did you learn how to implement that, as i am trying to myself(to work up to CWBVH), but keep having issues
Also also, while i dont see anything in the code, i was wondering if theres a way for me to visually see the BVH itself? again, trying to implement it into my own project to learn, but as I dont know what the original looks like, its hard to see where im going wrong
Thanks! and sorry for the trouble
Hey :)
I've been working on a small hobby path tracer in my spare time (https://github.com/knightcrawler25/GLSL-PathTracer) but reached a point where path tracing in a pixel shader doesn't suffice anymore when it comes to performance and large scenes lol. Came across your project some time ago but re-visiting it now, I see tons of features and its bloody fast too even on my old Maxwell card. Very impressive! The clean code in your repo looks like a really good source for me to learn. So, wanted to thank you for sharing this :) Would it also be possible for you to share sample scenes from the readme (some of the more complex ones with participating media etc which do not have a Mitsuba scene file available) to play around with as it would be easy to gauge performance that way and also since it's rather difficult to convert them from the original.
Thanks again,
Asif
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.