4 ms·
Self-Plug: If you're interested in a Jupyter notebook tutorial on implementing a basic differentiable path tracer (a physically based rendering algorithm), I wr
by ericjang 7y ago
Self-Plug: If you're interested in a Jupyter notebook tutorial on implementing a basic differentiable path tracer (a physically based rendering algorithm), I wrote up a tutorial here: https://blog.evjang.com/2019/11/jaxpt.html https://blog.evjang.com/2019/11/jaxpt.html
- orange3xchicken 7y agoAlways appreciate your posts. A couple projects in my lab are in Jax because of your MAML post.
- ericjang 7y agoThanks, your comment made my day :)
- kelsolaar 7y agoGreat notebooks! While looking at the "cornell_box_pt_numpy.ipynb" one I noticed a few things odd: - The input colours to the walls are scaled by somehow arbitrary values and they don't seem to match the spectral reflectance distributions converted to, for example, sRGB: White ----- Jupyter Notebook : [255, 239, 196] / 255 sRGB (Scene-Referred Linear) : [ 0.73825082 0.73601591 0.73883266] sRGB (Output-Referred) : [ 0.87468844 0.87351472 0.87499367] Green ----- Jupyter Notebook : [.117, .4125, .115] * 1.5 sRGB (Scene-Referred Linear) : [ 0.06816358 0.39867395 0.08645648] sRGB (Output-Referred) : [ 0.28953442 0.66418933 0.32540958] Red --- Jupyter Notebook : [.611, .0555, .062] * 1.5 sRGB (Scene-Referred Linear) : [ 0.49389675 0.04880702 0.05120209] sRGB (Output-Referred) : [ 0.73132279 0.24476901 0.2508128 ] The correct values, assuming a sRGB working space, would be the middle rows, i.e. sRGB (Scene-Referred Linear). - The final image does not seem to be encoded for Output/Display, i.e. there is no gamma correction thus it is not displayed correctly.
- ericjang 7y agoThanks, you are correct :) I chose the spectral reflectance distributions by tuning the values manually until it looked correct. And yes, I didn't do gamma correction (I deliberately ignored photometry related conversions) so that could explain why my tuning resulted in odd values.
- kelsolaar 7y agoWould be very easy to fix using the above numbers and adding proper encoding, even a naive gamma 2.2 would help :) Here is a Gist for the spectral computations: https://gist.github.com/KelSolaar/fb1e09b56b54d37d90e1886aef5ea4d4 https://gist.github.com/KelSolaar/fb1e09b56b54d37d90e1886aef... (It uses Colour: https://github.com/colour-science/colour https://github.com/colour-science/colour)
- Iv 7y agoAt one point I was considering trying to write a differentiable renderer for 2d (cartoons) look. It was a bit too much work for my skill level, but I wonder if it got done already? I mean something that would be able to output a vector representation of something.