All currently available SSS models ignore internal boundary condition (aka TIR) .. but trapping rays past the critical angle (keeping'em bouncing) forces longer path lengths .. for richer, more saturated, physically accurate translucency. Same color and mfp. With / without TIR
Maximilian Tarpini
@maxtarpini.bsky.social
It's all about W÷m² and W÷Kg 🌈🚴♂️ www.rombo.tools
Full Order-N Similarity Theory (Zhao et al. 2014) for SSS. Single-lobe HG at high anisotropy makes light "tunnel" through the material in a tight directional beam rather than diffusing broadly. With ONST we've better looking results, smoother and way faster .. 2:54 vs 4:05 (shark).
Perceptual Russian Roulette.. around 5% faster than using classic raw max channel.
On Russian Roulette(RR) and MIS-Aware termination for SSS Random Walks. Instead of compensating a terminated estimator, let's integrate RR with our sampling strategies by computing the joint probability of scattering and survival events. github.com/RomboDev/Misce…
Ending some Pattern dev with Truchet patterns. Worth noting that while the original Truchet tiles (1704) used diagonally split squares, the curved arc-based Truchet patterns commonly used in modern graphics were popularized by Cyril Stanley Smith in 1987 !
Templated C++ hash gen splitmix64-based. For any kind of input get any kind of output : float a = rmb_hash<float > (make_float2(12.f, 7.f)); int3 b = rmb_hash<int3> (make_int2(5, 9)); int2 c = rmb_hash<int2> (float(1.5f)); github.com/RomboDev/Mis...
github.com
Never ever use hashes you find around .. and for this matter .. don't roll your own hash functions either .. refer to your quality dealer eventually :) or to SplitMix64-based hashes. Here with some commenting about.
Orbit traps are a coloring strategy for fractals: follow an orbit, watch how it moves through space and record how close it gets to some geometric “trap”. That “closeness” drives your colors. These are based on : "Procedural Generation of Artistic Patterns Using a Modified Orbit Trap Method".
Patterns from : ' Mathematical Modeling of a Class of Symmetrical Islamic Design'. Proper coloring is almost impossible because stars in a periodic tiling where cell boundaries wrap destroy the pattern topology .. ie. a ray can hit edges that are topologically behind the starting point ! 🤔
Implemented : Symmetrization of Quasi-Regular Patterns with Periodic Tilting of Regular Polygons (using UV cells). Super nice, infinite pattern variations with just few parameters. Added colorization that with threshold parameters adds other ways to create more patterns.
Working with floats in C/C++? Fncs like fmod(), fmin(), fabs() etc. actually use doubles internally (floats get promoted on call). For better performance with float data, use the 'f' suffix versions: sinf(), sqrtf() are obvious, fmodf(), fminf() less so. Easy to overlook, but matters in tight loops!
Finally had some luck implementing rt multiscale glints (zirr/kaplaian2018) offline ! Snow uses delta-Eddington phase fnc.
Solid angle sampling : uniformly perturb a base vector within its solid angle cone. github.com/RomboDev/Mis...
Defocus 2.5D blur with circle of confusion computation from Z-depth based on 'A lens and aperture camera model for synthetic image generation - ACM Siggraph 1981' is super nice and works a treat in many situations.
Btw, we locate sun in the sky by checking ray dir alignment with sun center (cosTheta>sunCosTheta) .. so we don't generally consider sun size. However, sin() of sun angular diameter is sun radius (!) and we can use that at horizon to account for sun having a real diameter ie. for twilight zone etc.
If you want to be physically correct instead to use ie. a smoothstep fnc to fade out for example stars at horizon you can use this analytical approximation to the atmospheric extinction coefficent :
Ever noticed that most phase fncs use costheta and not theta ? After all we want an angular quantity not a proj of some sort (taking the cos of the angle) while is not even a math convenience.. it is that costheta provides a more uniform sampling for calcs of ang distributions. Here the proof :
The localPoint in the previous code is also the hit normal so I had just to add bump mapping, a dot product (moonnormal,sundir) for diffuse wrapped in a ^0.75 to compress the shadow terminator and eventually a bit of ambient (+albedo*0.075).. and voilà a basic moon with tidal locking.
Simulate moon tidal locking by actually locking UVs to the view direction 🌙⛓️
I'm keeping updated this super comprehensive collection of <Light Transport> papers (by tech and by year), from the Kajiya eq to latest differential and neural approaches, passing by RRT and MC theories | As before, repost if you think it may be useful to others. drive.google.com/drive/folder...
Stochastic raymarching with enhanced sphere tracing.
Random walks mechanics : a nice improvement to sample SSS with guided (zero-variance) walks is to use Meng closest point and normal heuristics and then D'Eon forward/backward probability to stochastically account for the boundary choice.
Non-Exponential Random Walks. For SSS they are great to sim plastics and other polymers, the discoloration and drying of certain natural materials or because of their long-range correlations thin-walled mats like the Mario on the left (same MFP of the 'solid' one on the right).
Inverting IOR interfaces while random walking back toward the surface, pretending there's been a boundary between the isotropic opaque core and the transp aniso stuff. Great for some resins, crusts etc.
Random walk SSS with Dwivedi sampling and similarity theory.