rob cupisz
banner
robcupisz.bsky.social
rob cupisz
@robcupisz.bsky.social
Tech Lead at Unity Demo Team. Rendering, tech art. Lighting, VFX. Time Ghost, Enemies, The Heretic, Adam

https://twitter.com/robcupisz
Performance: some more alu in per particle output compute, and more alu per pixel, but no texture read. No extra attributes needed.

You’d struggle to measure any perf delta, even with tons of embers covering the screen, as other costs dominate (particle compute, vertex, blend).
January 27, 2025 at 7:07 PM
There is also some control over variable circle of confusion size, making it dependent on camera focus distance and aperture.

An exaggerated shallow depth of field:
January 27, 2025 at 12:22 PM
This bit of the vfx graph deals with output. Projects the particle velocity, then aligns and scales the quad accordingly.

Also some black body radiation. If a particle speeds up, I’m assuming it got hit by a micro gust -> more oxygen -> brighter for a moment.
January 27, 2025 at 12:19 PM
The shader calculates the swept disc shape, plus some soft edges, as the circle of confusion from a real lens would not have sharp edges.

It fills the entire quad not to waste fill, assuming the quad will be stretched to target proportions.
January 27, 2025 at 12:18 PM
Now we implement that swept disc shape in a shader, and put it on a quad.

The quad needs to be parallel to the camera plane, and aligned with the velocity projected onto that plane.

An ember flying towards/away from the camera degrades to a circle of confusion on a square quad.
January 27, 2025 at 12:17 PM
Note how it matches the shapes we’ve seen in the ref - at least for most embers, which are small enough glowing points to form a regular circle of confusion.

The order of operations is important here: circle of confusion “happens” first, then moves across the sensor.
January 27, 2025 at 12:15 PM
Both of these things mean that they’ll typically be quite a bit out of focus, and travel far while the frame is being exposed.

Here’s a photo of a charger light I took with my 200/f4 lens. In focus, out of focus, then with progressively longer motion.

Also merry xmas, or smth.
January 27, 2025 at 12:14 PM
So how do real embers look like when recorded by a camera?

They’re flakes and small bits of burning material.

Since they’re not that bright, they’re usually shot in darker scenes, with wide aperture lenses and longer exposure times.

Ref from ActionVFX
www.actionvfx.com/collections/...
January 27, 2025 at 12:12 PM
Needed to hold up close to the camera as well
January 27, 2025 at 12:11 PM
This is my vfx test scene for Time Ghost, the Unity demo we’ve shown recently.

The escape sequence needed tons of flying embers. Usually out of focus to some degree, and motion blurred, as that’s how we’re used to seeing them on screen.

repo: github.com/robcupisz/fl...
January 27, 2025 at 12:09 PM
October 18, 2024 at 11:43 PM
And here’s the environment scene with tons of interactive ECS grass you can run through. There’s also a time of day anim using scenario blending.

Download: assetstore.unity.com/packages/slu...
October 18, 2024 at 11:33 PM
…also featuring ML-based cloth deformation, running in Unity Sentis.

Download: assetstore.unity.com/packages/slu...
Some tech details: discussions.unity.com/t/making-of-...
October 18, 2024 at 11:32 PM
…from our latest, equally real-time, Unity demo:

youtu.be/o1JIK5W3DRU
Time Ghost | Unity 6
YouTube video by Unity
youtu.be
October 18, 2024 at 11:01 PM