Comments (1)
Hi @NicolasRannou
Thank you for the compliment and the question! Actually path tracers, including mine, all rely on Monte Carlo estimation. I don't know how much you already know about rendering so forgive me if I mention things you are already aware of. Path tracing is an evolution of Ray tracing in that we start with each pixel on the screen and follow the light ray that illuminates that pixel all the way backwards into the scene until we find a light source that it may have originated from. Ray tracing typically only deals with perfectly specular surfaces, either reflective (mirrors, etc.), or refractive (glass, etc.). Therefore ray tracing usually doesn't involve any estimation as the ray directions and their contributions are mathematically predictable and follow the laws of optics.
The key difference is when trying to calculate color for diffuse surfaces (painted walls of a room, bones, etc.). The traditional ray tracer fails in this regard because it only calculates one bounce direction for diffuse surfaces - it does not take into account other rays' contributions that went into that spot as well, that give us the nice warm blended color associated with matte/diffuse surfaces. In order to correctly render a small point on that type of surface, we need to integrate all possible ray contributions coming into its hemisphere (oriented along the normal pointing outward from the surface). This is computationally impossible because there are an infinite number of rays we can choose from, and each surface where those rays come from in turn presents the same problem again and again, making it hopelessly multidimensional.
So path tracers employ Monte Carlo integration to try and estimate the summed infinite rays' contributions to the diffuse surface spot in question. When the tracer hits a diffuse surface, it randomly chooses a path to follow through the rest of the scene. The first estimate (as in other Monte Carlo examples of estimating PI by throwing darts at a circular target inside a square border and getting the ratio of hit inside the circle vs. miss outside the circle), may be wildly inaccurate. But the power of Monte Carlo method is in the repetition of the random sampling and averaging the results by the number of tries. Each random sample gets you closer to the real answer - towards PI, or towards a photographic and physically correct rendering in the case of path tracing. This is why all path tracers initially display noise on diffuse surfaces - not enough samples have been taken yet to give a close estimate of the true color of the surface in question. De-noising is an active area of research by universities, NVidia, OTOY, etc.
The other active area of research is in speeding up the tracing process which, by itself, is super slow. Which brings me to my answer regarding your project of rendering medical data. My path tracer is good at small sets of data, say up to 10 objects. I have not yet completed a working BVH acceleration structure to handle large sets of data (triangles of a model, or point clouds, etc.). The aim of my project is to have real time path tracing (although noisy) for interactive web applications. I haven't really developed it with ground truth quality rendering (while you wait) in mind. I'm assuming the medical data sets that you'd be working with have many more than 10 or so elements (triangles, points) to display. Although I really enjoyed reading through the paper you linked to (those path traced renderings of the skeletal and muscular system are awesome! - what a great idea), I doubt my little tracer could even load a data set of that magnitude without crashing the browser at this juncture.
If real-time performance is not a concern, you might enjoy rendering the data with traditional renderers like Cycles inside of Blender, or Octane inside Cinema4D. These path tracers can usually handle any size data you throw at them, assuming your medical data is triangle-models (like an .obj file), or a point set, or volume set. Those renderers also use ray marching so you can render volumes like artificially-lit blood in the human system, brain tissue, etc.
I hope I have clarified some of the goals of my project and what you could possibly look into for your medical rendering project. If anything is still unclear, please let me know.
Thanks and good luck with your project!
-Erich
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.