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
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
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
For the love of our eyeballs, do not align your ember particles to velocity!

Don’t give them that comet texture either, ugh.

Let’s make
✨physically based flying embers✨

A Unity vfx graph implementation and explanation below. 🧵
January 27, 2025 at 12:07 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
First Time Ghost scenes released! ✨

We’ve just published two projects: showcasing the character and the grassy environment scene.

Have a look at the real-time hair simulation…
October 18, 2024 at 10:58 PM