Comments (4)
Hello, thank you for your interesting question!
CamSim contains a reimplementation of the RSM idea and does not implement the paper 1:1. It uses a different derivation of the light transport approximation, described in doc/illumination.tex
(see illumination.pdf). This version intentionally avoids area estimations. Furthermore, it also avoids the problematic one-over-distance-squared term from Equation (10) because that breaks down for very small distances, e.g. in corners. See also src/simulation-everything-fs.glsl
line 469ff.
There are more ways in which CamSim differs from the paper. For example, in CamSim the RSM is a cube map so that it can capture the entire environment.
I am not sure how the VPL area was estimated in the original implementation for the paper, and I don't have access to the original source code; if you need that, please contact A. Kolb.
As a side node, nowadays I would suggest using path tracing to simulate multipath effects (and all other relevant effects), even if your goal is speed, since GPUs can now accelerate path tracing too (even though rasterization will still be faster). See for example WurblPT for a CPU-based path tracer that implements ToF simulation.
from camsim.
Dear @marlam,
thank you for this reply and your support! I have a few questions to clear out the differences between the paper and your implementation, if you don't mind.
I fully agree that it could be possible to switch to path tracing but I'd still like to have at least the original option for comparison up and running.
Related to that:
- You mention that you are able to work around the
$1/r^2$ term (which is known to be an issue in VPL approaches and I've found a few papers tackling it directly). What is the gist? I would expect that this squared distance decay is required to model the bounce between$Q$ and$P$ (in the notation of the paper and your notes). Where is it "hidden" in your formulation? - You mention no area is required in your computation: what's the reasoning behind your approach vs. that in the paper? I was indeed able to implement most of the paper except for the undefined area computations, but I believe the incorrect areas I used are creating the scale issues I observed (global orders of magnitude stronger than direct when observing a wedge). So how does one get around that?
- Note: in my case I cannot assume point light source, but I believe this shouldn't be a problem as long as I have the (direct, light source to point) radiance
$L_{S \rightarrow x}, \forall x$ in the scene. - In your notes I see an
$|\text{RSM}|$ , I assume it denotes cardinality so you're taking a mean over all Q in the RSM? - If one is to replace
$\forall x, f_x = \rho/\pi$ (Lambertian BRDF) then in your writeup (assuming$S$ is the source location) one would have$$L_{\rm scene} = L_{\rm direct} + L_{\rm global}$$ where$$L_{\rm global} = \frac{1}{|\text{RSM}|} \sum_{Q \in \text{RSM}} \frac{\rho_P}{\pi} \left({L_{S \rightarrow Q} \frac{\rho_Q}{\pi} \cos \vartheta_{Q \rightarrow S} }\right) \cos \vartheta_{P \rightarrow Q} $$ where I have put in parentheses the radiance$L_{Q \rightarrow P}$ . Is this expansion correct?
Thanks again for your attention!
from camsim.
Hmm, it seems I did not remember the details correctly. There is indeed still a attenuation_factor
which models the OpenGL attenuation term. With the defaults attenuationConstant=1
, attenuationLinear=0
, attenuationQuadratic=1
, it is basically attenuationConstant=0
to get the original
Regarding VPL areas and scaling problems: unfortunately I cannot remember the details anymore. The changes in the CamSim model were made to use radiance and avoid area estimations where possible. For details regarding the original paper implementation, please contact A. Kolb.
Yes,
Yes, I think your formulation for Lambertian BRDFs is correct.
from camsim.
Many thanks for these details @marlam , I asked directly Prof. Kolb for details on the area computation.
I also see in some papers there is such a thing as clipping the geometry term (in your case, the weight factor) to avoid overshoots that cause known artifacts for
from camsim.
Related Issues (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 camsim.