Coder Social home page Coder Social logo

Comments (7)

koiava avatar koiava commented on July 30, 2024 2

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.

erichlof avatar erichlof commented on July 30, 2024 1

@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.

erichlof avatar erichlof commented on July 30, 2024 1

@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.

koiava avatar koiava commented on July 30, 2024

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.

erichlof avatar erichlof commented on July 30, 2024

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.

koiava avatar koiava commented on July 30, 2024

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.

erichlof avatar erichlof commented on July 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.