Comments (7)
Path traced gaming is a future. There is no way around :)
Here is my attempt :
https://www.youtube.com/watch?v=oktNku6gFkM
:)
from three.js-pathtracing-renderer.
@koiava
Yes the ghosting (or motion blur) is an artifact of the dynamic demos, where the sample count does not accumulate, but rather keeps sampling a new image every frame. It is a trade-off between distracting motion-blur and distracting noise or grainy objects. You can easily switch the motion blur off on all demos by locating the main function of the shader and adjusting the ratio of the old image to the new image.
main function weights
Just make sure the ratios all add up to 1. For example, most of the demos have an even weight assigned to the old image (0.5) and the new image (0.5). I have tried a lot of different weighting, and I prefer for the dynamic demos, a higher weight given to the old image, say 0.8 and therefore the new image gets 0.2, because they have to add up to 1. The most tricky situation is the Game Engine path tracer, which has static And dynamic objects mixed together. This one I settled on slightly more motion blur or ghosting, rather than have the distracting dark noise on everything like an old TV set that's out of signal. This is a W.I.P. and if I find a better solution, these weights are subject to change in the future.
What further compounds this issue is bright lights. Whether viewing them on the first ray bounce, or in a reflection, bounce 2, these bright objects ghost the most, leaving a trail. I am experimenting with reducing this artifact, as I agree with you and find that instance more distracting than it needs to be.
If you look on YouTube at the old Brigade path tracer, version 1.0, you will see the same trade-offs being made. They also struggled with how much ghosting vs. noise to assign. By Brigade 3.0, they were using multiple (2 to 4) high-end GPUs, overclocking the frame rate with CUDA (120+ fps - something I can't do with WebGL which is capped at 60 fps on the browser) and therefore could achieve more accumulated samples per frame and navigate around this issue.
from three.js-pathtracing-renderer.
@koiava
Ah yes I had seen people playing that version of Quake 2 on YouTube but I didn't know it was open source on GitHub. Thanks for the link and info! I'll enjoy looking through that tech info on their website and the source code. That is one of my goals - to get all this into a playable game engine for simple 3D games.
from three.js-pathtracing-renderer.
Hi there. First of all I want to say that I like your demos a lot :)
Blending frames directly to old one will always have ghosting and adjusting one global weights will not help. Did you tried temporal reprojection? It should reduce ghosting introduced by camera motion.
This is very interesting:
https://cg.ivd.kit.edu/atf.php
from three.js-pathtracing-renderer.
Hi @koiava
Thank you for the link! I was not aware of that paper. I have not tried temporal reprojection yet. I believe Nvidia is addressing this noise vs. ghosting issue with deep-learning noise filters. I'm not sure how all that works either at a higher level or low-level shader code. But it looks like your link has some source code, so hopefully I will be able to get something from it.
Thanks again, I will check out the link! :)
from three.js-pathtracing-renderer.
I believe that was used for recent path traced quake 2.
http://brechpunkt.de/q2vkpt/
Problem here is that you should very probably split rendering integrals in 2 parts at least: Visibility and lighting. Recent talks from NVidia suggests to split lighting into different buffers and denoise them separately. They have optimized denoisers for different types of lights and it works better than end-to-end solution (AI denoiser).
from three.js-pathtracing-renderer.
@koiava
That's awesome! I somehow missed that one on Shadertoy - I usually check for new shaders a couple of times a week. That's impressive that you were able to get all the physics happening on a GPU shader. I also have some ideas for simple games that can use the path tracing engine. Just have to find some extra time!
;-D
from three.js-pathtracing-renderer.
Related Issues (20)
- muti material not supported
- WebGPU port HOT 3
- More abstractions HOT 9
- Using more information from earlier samples HOT 3
- More samples per frame option HOT 63
- More compatibility with three js APIs HOT 2
- Stop a caustic ray if it crosses a surface HOT 3
- Just wondering how you handled something HOT 14
- Blue noise HOT 8
- GLTF viewer textures HOT 3
- sampler2D array HOT 14
- How to use this pathtracer in Freeciv 3D version? HOT 2
- [question] how to debug glsl in chrome? HOT 2
- GLTF_Model_Viewer didn't get the right result? HOT 6
- How to incorporate it into project? HOT 9
- statistical tool: bootstrapping
- Shadow Catcher HOT 1
- Support for a THREE.ParametricGeometry HOT 1
- GLTF_Viewer is not able to load textures HOT 1
- image stretched for BHV point light source HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js-pathtracing-renderer.