Sign in

Max Liani

@maxliani.bsky.social
1.2K followers 51 following 604 posts

Tracing rays at NVIDIA. Former lighting artist, working on computer graphics rendering tech for all humans and robots alike. I mostly post stuff about light transport simulation, and my hobby project Workbench.

PostsRepliesMedia
Max Liani @maxliani.bsky.social · 05/10/2026
Weekend project. Now I can enjoy a good tv show while working out.
030
Max Liani @maxliani.bsky.social · 27/09/2026
It's a rainy day, and I haven't done anything in a while. So, I coded some tiny transition animations on the Workbench manipulators. Low effort, kind of fun.
1201
Max Liani @maxliani.bsky.social · 13/09/2026
So apparently ChatGPT invites people to generate 80s pictures. I wasn’t one of the cool kids, so I thought this generated alternate take was fun enough to post.
231
Max Liani @maxliani.bsky.social · 24/07/2026
Today is a good day!
Screenshot of a Merge Request with 73 files affected, 9 lines added, 34299 lines removed.
1200
Max Liani @maxliani.bsky.social · 07/07/2026
Out of context
060
Max Liani @maxliani.bsky.social · 08/06/2026
On the other website:
050
Max Liani @maxliani.bsky.social · 10/05/2026
This one. That’s not the book I’d recommend to start with today though. Today I’d say “Raytracing in One Weekend” by Peter Shirley. raytracing.github.io
130
Max Liani @maxliani.bsky.social · 10/05/2026
sketch from my notes to give an intuition about the why:
0130
Max Liani @maxliani.bsky.social · 10/05/2026
About 3.5 years ago I did some experiment to improve the behavior of microfacet normals at glancing angles. Many surfaces become highly reflective even though having high roughness. Check the discussion in the thread. Here is my implementation reusing equations you already have:
1014718
Max Liani @maxliani.bsky.social · 10/05/2026
I started from the observation that the G term masks the grove valleys, which are more likely to contribute to the scattering, leaving the peaks visible, which if polished they may have a smoother micro geometry. I dag out a sketch from my notes.
040
Max Liani @maxliani.bsky.social · 10/05/2026
This one? It's 3.5 years ago, you have good memory :) I use the G term to modulate roughness.
260
Max Liani @maxliani.bsky.social · 02/05/2026
Cut tool. It does more or less what you'd expect from a cut tool. Snap to points and edges, fractional placement, cut across faces, slice. No support for edge loops yet.
0130
Max Liani @maxliani.bsky.social · 27/04/2026
Add Polygon second pass: "predictive snap points" and numerical input to finetune distance and direction of the current point position in respect to previous.
1262
Max Liani @maxliani.bsky.social · 25/04/2026
I need to revamp my modeling operators, especially those that require user interaction. Here is first attempt at the Add Polygon operator. It's a first pass; it needs some work, but I feel it's not a bad start.
3202
Max Liani @maxliani.bsky.social · 05/04/2026
Alright, I made some further improvements to the tree view, which now draws in constant time (in respect to the scene complexity). Here is a test with 16 million transform nodes viewable in the scroll area. Without screen recording, the whole app renders at 8kHz.
2141
Max Liani @maxliani.bsky.social · 03/04/2026
I played a bit with the UX of interacting with the tree view. The common operations are selection and re-parent. I want to control both with the same gesture. So, if the drag&drop is mostly vertical -> reparent. If it widens to the side, it becomes marquee selection. Yes, no?
281
Max Liani @maxliani.bsky.social · 03/04/2026
I am not sure why I am doing this, but I optimized further the scene tree view as it was getting a bit slow and clunky to operate when I had many nodes expanded. It's not cheap, it's still the most expensive part of the program to draw.
190
Max Liani @maxliani.bsky.social · 28/03/2026
Here is how I sample this light:
0120
Max Liani @maxliani.bsky.social · 27/03/2026
It's not a uniform distribution. Well, it is relatively uniform if at least one of the angles is small. It creates 4 singularities when both angles approach π. But that is outside the intended use because there are easier ways to cover the entire hemisphere :D Here is the result in render.
1120
Max Liani @maxliani.bsky.social · 27/03/2026
A long time ago in a galaxy far away (circa 2011) I came up with a distant rect light for my lighting crew. I can't remember how I did it, but I am trying to recreate it. Here is a test for the light sample distribution in the hemispherical domain.
3331
Max Liani @maxliani.bsky.social · 26/03/2026
After how many years? I added code for distant area lights. Some call it "directional". The control "scale compensation" is meant to preserve the light power (radiant flux), so as the emissive area increases, the intensity decreases.
1270
Max Liani @maxliani.bsky.social · 23/03/2026
I cut down startup time by deferring DLSS initialization. The first second of images rendered are noisy, until DLSS init is complete, at which point I accept a one off 40ms hiccup to allocate buffer resources and begin denoising. I'd say it's decent enough!
2240
Max Liani @maxliani.bsky.social · 23/03/2026
DLSS in workbench. The quality of 1spp rendering is way higher compared to the other built-in denoisers, and for half the cost. The comparison changes at higher spps.
2353
Max Liani @maxliani.bsky.social · 25/02/2026
Also, because the scene graph is a DAG, not a tree, one can add parents by holding Ctrl during drag & drop and create instances that way.
150
Max Liani @maxliani.bsky.social · 25/02/2026
Last weekend I refined the scene tree view in Workbench. I used the drag & drop support in dear imgui to implement DAG reordering and reparenting, plus renaming. Custom behavior and drop region draw to show where the node would be inserted, and display where and why it cannot.
1252
Max Liani @maxliani.bsky.social · 21/02/2026
100,000 fuzz iterations. I'd say this part of the system works :)
2292
Max Liani @maxliani.bsky.social · 14/02/2026
Estimation of focus distance works through reflections also, as far as they are sharp enough. I use some path solid angle heuristic to determine if the "sight" stopped at the surface or peered through the scattered path.
1130
Max Liani @maxliani.bsky.social · 14/02/2026
Finally, I came around at implementing DOF and wiring it to the camera manipulator system. Click and drag to samples the scene to estimate the focus distance, while scroll to modulate the aperture.
1351
Max Liani @maxliani.bsky.social · 11/02/2026
As we speak about unit testing, this is an example of what my unit tests look like. In particular the assertion messages are AI autocompletions. So, I didn't have to type much. Personally, I find this much more appealing than what I get with macro-based systems.
150
Max Liani @maxliani.bsky.social · 08/02/2026
Eventually I did a good cleanup on my unit testing framework. I added support for JUnit xml export (in case I ever want to setup a CI process, even though it would be nonsense for a personal project 😅). But the cool thing is that it produces a complete log and xml export even in case of crash.
061
Max Liani @maxliani.bsky.social · 01/02/2026
Crossed off the procrastination list: added support for multiple cameras in the scene. Up to now, I couldn't create cameras from the GUI, couldn't select them for rendering either. It's funny how something like this takes 20 minutes to do but can stay on the list for years.
0370
Max Liani @maxliani.bsky.social · 01/02/2026
Chamfer of disjoined edges work, at least for simple cases... lots more cases still to handle.
080
Max Liani @maxliani.bsky.social · 31/01/2026
Some progress, but still rather broken...
130
Max Liani @maxliani.bsky.social · 25/01/2026
I am back to it. I decided to revamp my modeling operators to carve out a half a decent modeler. There is a lot of cool manipulators options to be explored there. I started on chamfer... clearly, it's going to take a while to get it right.
3312
Max Liani @maxliani.bsky.social · 09/12/2025
Earlier this year I spent a few weekends toying around the math of simulating finance and investments. The only way for me to understand was to write a program that would put the concept into practice. So, I have implemented a Montecarlo simulator that projects family finances.
Screenshot of a financial simulation of an imaginary couple earning above average salaries, investing the stock market and paying down a home loan.
2220
Max Liani @maxliani.bsky.social · 30/11/2025
I reopened my project for the first time in 6 months... I barely remember which side is up. I told myself, "Do the first thing that cross your mind": If there is geometry under a light, and its cameraGain is set to zero, the light and the geometry become invisible to camera rays.
3351
Max Liani @maxliani.bsky.social · 26/07/2025
First rather naive implementation of Stochastic Light Cuts. Here comparing uniform sampling vs SLC with 1spp over 16,000 lights.
1320
Max Liani @maxliani.bsky.social · 25/05/2025
The Vulkan porting is complete 🎉 The last missing piece was the primordial raster renderer, which I am not sure why I keep around :) All in all, it wasn't nearly as hard as I thought it would be.
4641
Max Liani @maxliani.bsky.social · 23/05/2025
The amount how pieces to track to share a texture between Vulkan and CUDA feels a bit over the top. Each of these need to be constructed and destroyed, otherwise GPU memory leaks... I wish we just had pointers and that's it.
3190
Max Liani @maxliani.bsky.social · 18/05/2025
Components selection and editing work again.
0200
Max Liani @maxliani.bsky.social · 18/05/2025
And boooom....
2230
Max Liani @maxliani.bsky.social · 17/05/2025
Some progress: the grid, selection, wireframe, light gizmos, reverse Z-buffer, path-tracer/raster compositing and a few more bits. It's all coming back together.
1420
Max Liani @maxliani.bsky.social · 14/05/2025
I appreciate. Your scribbles seems more orderly than mine. I tend to write on whatever piece of paper I find.
120
Max Liani @maxliani.bsky.social · 11/05/2025
And... it's upside down 🤣
2180
Max Liani @maxliani.bsky.social · 10/05/2025
The frame for a populated UI (i.e. something is selected) takes longer... rendering at 7.5kHz. Whereas when the CUDA renderer is updating, the context transition (between graphics and compute) takes its toll, dropping to 3.5kHz (something that will take me time to figure out)
140
Max Liani @maxliani.bsky.social · 10/05/2025
It's still a mess, but bit progress today, UI fully working. With an empty scene the program renders at 12kHz, which is ridiculous! This compared to 4kHz of the OpenGL implementation. To get there I had to hack through GLFW and dear imgui docking where some "expensive" windows system calls were made
2200
Max Liani @maxliani.bsky.social · 03/05/2025
Small progress today: my GUI library system is partially working. Textures and picking are still missing though.
3132
Max Liani @maxliani.bsky.social · 26/04/2025
And most of my time today went into figuring out how to load the texture that shows here... This is going to take a while!
190
Max Liani @maxliani.bsky.social · 26/04/2025
The easy part of porting to VK the imgui-based portion of Workbench UI is done. Now to the hard part...
1220
Max Liani @maxliani.bsky.social · 21/04/2025
Rainbow cubes are back! It's likely most of you didn't know me when all my posts were rainbow cubes... As I am preparing to port Workbench to VK, I am back to basics.
4220