Blog

Frame 52 of the final Karma render over the plate, with fireballs blowing out of the tower and the asteroid trails crossing the sky

Light My Fire!

Last time, in Burning Down the House!, I got my very first frame back out of Karma, and it came with a list. The smoke was too light and too smooth, the fire was too hot, and with Karma spending about 4½ minutes a frame just getting the scene ready, the whole shot would have taken about 22 hours to render. So day 7 (which, to be fair, ran over three days) was all about rendering. Everything got judged on real Karma frames, in motion and comped over the plate, right up to the final render, which went through overnight: all 240 frames as multipart EXRs, ready for Nuke. Here’s one of them:

Frame 52 of the final Karma render over the plate, with fireballs blowing out of the tower and the asteroid trails crossing the sky
Fire in the hole! Frame 52 of the final render, comped over the plate

And here’s the video. It’s the final render over the plate at full speed, then half speed, then a close up of the impacts at quarter speed, and then a quick run through how it got there over the last two days. It’s straight out of Karma with a quick comp over the plate, so the camera move isn’t back in yet and there’s no grade or grain. That’s all for the comp.

Rendering isn’t my strong point, so I said last time I’d be leaning on Claude the most here, and I did. There was one rule for the whole stretch: test on a handful of Karma frames before committing to a long run, give every round its own hip version, and move the last round’s test images out of the way so I’m never looking at stale frames. That last one bit me early on, when I spent a while picking apart the v052 images thinking they were the latest (they weren’t).

No more cotton wool

Lit by a proper sun, the explosion clouds looked like soft cotton wool, so the first three rounds went on breaking them up. The fresh fireball smoke now carries a marker that drives extra shredding and disturbance while it’s young, so the clouds come out lumpy and torn, then calm down as they rise. The smoke went finer too, from 0.3 m voxels to 0.15 m, with smaller swirls so the detail is at the right scale for a 160 m tower. And the fireball smoke now leaves with a sideways shear (35 m/s) and a slower rise (12 m/s), so it rolls off the hole instead of punching straight up.

The first renders also turned up two things that just looked wrong. At frame 52 the smoke seemed to come from above the impact, with a mushroom stem and head, which turned out to be a lift on the smoke sources (gone now). And the fire looked like the trail itself was burning. The fireball was being pushed along the rock’s path, so it shot back up the trail as a slug. Now it balloons out of the hole with only a small push, and the trail’s flame switches off once the rock is parked inside the building.

The same overnight run (v052) ticked two more things off last time’s list. The falling debris and the dust now collide with blocks standing in for the neighbouring buildings, and the embers went in. They’re worked out fresh every frame with no sim at all: each one has a birth frame, a start point and a start velocity, and where it is now is the exact answer for gravity plus air drag. There are three kinds, a burst from each fireball, sparks trickling up off the burning floors, and fragments shedding off each rock’s head in the second before it hits.

Making Karma faster

Most of each frame’s time was Karma converting the scene, not rendering it, and the biggest cost was the tower: tens of thousands of pieces, nearly all of which never move. So the tower got split in two. Every piece that never moves is written out once as a single file that goes into every render, and only the moving pieces come from the sim each frame, with every attribute the renderer doesn’t need stripped off. Prep went from about 4½ minutes a frame to about 45 seconds. Last time I was hoping for seconds, and 45 isn’t quite that, but it’s six times faster and I’ll take it! Karma also renders in its own process once Houdini hands the scene over, so two frames can render while the next one is being prepped.

With that sorted, v054 was the first full run with everything at final resolution: the fire and smoke at 0.15 m from frame 30 to 240, then ten Karma frames across the shot.

Ten Karma frames from the first full run, from the first impacts at frame 40 to the tower burning at frame 240
The first full run through Karma, ten frames from 40 to 240

Just the remnants

After the burst at each hole, dust should pour down the face of the tower. The first go came from particles, and in Karma it looked like what it was, more like falling sand than dust. A pyro sim fed from those particles made it billow and spread as it fell, but then it came down as a solid wall. What I was really after was the remnants of the dust falling, so the sim is now fed from just 5% of the particles as big soft puffs, and it fades away faster.

The dust falling down the tower's face at frames 130 and 200, as grainy particles, as a solid wall from the sim, and as soft puffs
Falling sand, a wall, then dust. The curtain as particles (v054), a sim (v056) and soft puffs (v057)

Then I picked the density by eye, with even densities and noisy patches rendered side by side at a few strengths. Patches at 8% looked best, so naturally I asked for thinner still, and 2% is what’s in the shot.

The falling dust in patches at 8% and 2% density, at frames 130 and 200
Patches at 8% and 2%, at frames 130 and 200. Less is more!

Rock A’s trail after it leaves the building had also picked up a row of puffs along its top, evenly spaced like a string of beads. The source that keeps the trail going was swelling in a regular rhythm, so now it swells with an irregular noise, and the trail sim has bigger, more varied swirls, so it breaks up instead of repeating.

Rock A's exit trail at frames 130 and 200, with a regular row of puffs along its top in v054 and a more broken up trail in v056
Spot the beads! The exit trail in v054 and v056, at frames 130 and 200

Filling up the Deathstar

Once the ten frames looked right, v058 rendered all 240 at what we called middle quality: 12 samples per pixel (adaptive up to 12 more where it’s noisy), a volume step rate of 0.35, one volume bounce and two diffuse bounces, the OIDN denoiser and real motion blur. Then came the switch to multipart EXRs for Nuke, with the beauty and alpha, the fire’s light on its own, depth, normals, motion vectors and Cryptomattes by object and by material.

Halfway through the first EXR run the Deathstar’s disk was down to about 20 GB free. The culprit was Houdini’s temp folder. Every frame writes about 3.4 GB of scene and volume copies for Karma, and Houdini only clears them out when the whole render call ends, so rendering frame by frame from a script they’d piled up to 156 GB! The render script now deletes each frame’s temp folder as it goes, waits if the disk gets low, runs at most two Karma processes at once and skips any frames that already exist, so it can just be restarted. While I was at it I moved everything old off to an external drive (SimStore), so only the active sims stay on the Deathstar.

Layers, pops and dust balls

Watching the full EXRs in motion turned up four things.

  • Layered, not blended. Around the 2 second mark everything looked stacked on top of each other rather than mixed together. Darker dust, the trails and smoke a touch less black where they’re first born, and the smoke coloured by its temperature (a little lighter where it’s hot) pulled it all together.
  • Rock A’s fireball popped off in a couple of frames. Fire was being switched off wherever its flame ran out, which also cut the heat that drives the glow. Now it only switches off where the flame and the heat have both gone.
  • The dust burst came out as little balls, and once that was fixed it was far too smooth. It now starts from bigger, varied puffs, the sim has turbulence at five scales from 2.5 m down, and the first push is gentler so the detail has time to develop.
  • The embers turned into noisy lines at the explosions. They’re worked out fresh each frame, and the number of embers changed between the two motion blur samples, so Karma was joining up the wrong ones. They’re built from whole frames now, with their streaks drawn as short lines along their velocity.
Frame 54 before and after the tone pass, with darker dust and smoke that sits together with the fire
Layered to blended. Frame 54 before (left) and after the tone pass
The dust burst at frames 44, 48 and 56, smoother on the top row and more broken up on the bottom row
Dust balls to billows. The burst at frames 44, 48 and 56, before (top) and with turbulence at several scales (bottom)
Three frames of the asteroids coming in, with orange embers trailing behind them on the bottom row
The embers before (top) and after the fix (bottom), at frames 38, 45 and 50

Licking, not a campfire

The fire out of the exit looked like a campfire, all tall, even columns. Fire inside a building licks out of the openings, and there’s huge variety from flame to flame. So the flames got shorter overall, with patches of strong and weak fire that shift over time and each flame its own height, pushed out of the opening first and then up, at 0.1 m voxels for ragged edges. Spreading the sources up each storey also got rid of some horizontal stripes, where the fire had only been sitting on the floor slabs.

The exit fire at frames 80 and 125, as tall even columns on the left and lower, more varied flames on the right
Campfire (left) to licking flames (right), at frames 80 and 125

The other problem was timing. Rock B’s fire died off abruptly at about 2 seconds and Rock A’s popped off, so each hit now gets a flare up that eases off over 3 seconds, and the fireball hands over to the burning fire instead of leaving a gap.

Five frames from 56 to 78, with the fire dying back on the top row and carrying on from the fireball on the bottom row
The fireball handing over to the burning fire, before (top) and after (bottom), frames 56 to 78

Where did it go?

I wanted the fireballs to hang around for at least another six frames, the one out of the exit especially, which showed from frame 58 to 64 and then just popped out. Making the flames live longer in the sim was easy, and the exit fireball now keeps strong flame for about eight frames longer. It made no visible difference whatsoever! Measured in the renders, the fire was within 1 to 3% of before.

So, a few experiments. Hiding the smoke at frame 64 showed 70 to 130% more fire, while taking out the fire’s own soot only added 5 to 9%. But the real culprit was the fire’s colour. It’s driven by temperature, which cools off in well under a second, so the longer lived flame was there all along, just as a dull dark red sitting inside black smoke.

Frame 64 three times: as rendered, with the smoke hidden showing much more fire, and with the fire's soot hidden
Where did it go? Frame 64 as rendered, with the smoke hidden, and with the fire’s soot hidden

The fix is at render time, with no new sim. Where strong fireball flame is still burning, its colour holds at orange and cools to red as the flame dies, and the smoke right around it gets thinned. It only kicks in about nine frames after each hit, so the young fireballs look exactly as they did. The visible fire at the exit went up about 190% at frame 58, and Rock B’s fireball is still big and bright at frame 64.

Four frames of the fireballs on two rows, with bigger, brighter orange fire on the bottom row
Holding the colour, before (top) and after (bottom)

The exit was still buried though, this time by the dust burst, which along the camera’s view was far too dense to see any fire through. My first idea, making the dust glow from inside, doubled the dust by accident and hid even more of the fire (oops). The fix that worked thins only the dust in and in front of the burning exit fireball, as seen from the camera, from about frame 48 to 85. It comes back as the fire dies, and the falling dust isn’t touched.

Frames 64 and 70 three ways, with more of the exit fire showing through the dust in the right hand column
Frames 64 (top) and 70. Before, with the colour hold, and with the dust in front of the exit thinned as well

Quick tests and a flicker

Every test frame at full quality was taking a few minutes, so tests now run at 720p and half quality (6 samples and half the volume step rate), about 45 seconds a frame, with the full settings going back automatically afterwards. I asked for the whole shot at those settings to see everything moving, and that was 240 frames in 3½ hours.

That review turned up a flicker on the building. Measured on a patch of the tower where nothing should move, it changed by about 17% from frame to frame at half quality, and about 5% at full quality. Karma’s docs had the answer. By default its random seed is the frame number, so the noise pattern is different on every frame, and on a building that doesn’t move that shimmers. Locking the seed (husk –lock-random) made the still surfaces identical from frame to frame (0.02%), at no cost in render time.

Out of the box

The exit fire still burned in a square patch, a block of fire with a dead straight bottom and side. Hiding the building proved it wasn’t the facade covering it up, as the fire itself was that shape. The burning sources around the exit form a compact block about 16 by 21 m, and after the campfire fix the flames only rose a few metres above it, so the fire just filled the block.

Frame 220 as rendered and with the building hidden, with the exit fire the same square shape in both
It’s the fire that’s square, not the facade. Frame 220 as rendered and with the building hidden

It took two rounds. In v063 the edge of the burning area wanders with a slow noise, drifting patches burn much stronger to give the odd tall tongue, and the sources sit just in front of the facade with an outward kick so the flames curl out of the opening. It still read as a patch, so in v064 tall tongues come off the top of each opening and climb the facade, the bottom edge breaks up with gaps and the sides are raggeder. Most of the fire stays inside, as it would in a real building, and only the top reaches out.

The exit fire at five frames from 130 to 240 over three versions, going from a square block on the top row to ragged flames on the bottom row
Three rounds on the exit fire, v062 (top), v063 and v064 (bottom), frames 130 to 240

The final render

With the fire re-simmed one last time, v064 went through overnight at full quality on the Deathstar: all 240 frames at 1920 by 1080 (which is also as big as Nuke Non-Commercial goes), as multipart EXRs with the beauty, the fire’s light on its own, depth, normals, motion vectors and ID mattes for every element. The first frame landed at about quarter past ten at night and the last at twenty past eight the next morning, so just over 10 hours and 5.3 GB of EXRs.

Eight frames of the final render over the plate, from an asteroid coming in over the city to two columns of black smoke rising from the burning tower
Eight frames from the final render, from the first rock coming in to the tower burning

Claude also wrote me a guide to the comp, covering reading the multipart EXRs, the base comp over the plate, the Cryptomatte names for every element and some ideas for making it more cinematic. Along with that there’s a script that builds the base comp in Nuke, plus title cards and lower thirds for a layer by layer breakdown.

Notes to self

  • Rendering frame by frame from a script fills the disk with Houdini’s render temp files, so clear each finished frame’s folder as you go.
  • If the fire is coloured by its temperature, a longer lived flame is invisible unless it stays hot too.
  • Measure before guessing. Rendering with one element hidden, and adding up the fire’s light in a patch of the screen, settled every “why can’t I see it” question in a few minutes.
  • Embers made fresh each frame need the same count on both motion blur samples, or Karma joins up the wrong ones.
  • Karma’s default seed changes every frame, so lock it for a locked off camera.
  • Copying a material node that reads another node’s value can carry a link back to the original and change the wrong material, so make reader nodes fresh.
  • Check the version on the image before giving notes on it!

How long it all takes

On the Deathstar, Karma’s scene prep is down from about 4½ minutes a frame to about 45 seconds. The fire takes 65 to 70 minutes for frames 30 to 240 at 0.1 m voxels (28 to 30 GB of cache), and the smoke at 0.15 m comes to 164 GB. A full quality frame at 1920 by 1080 takes about 2.2 to 2.8 minutes to render, and the whole shot just over 10 hours. A 720p half quality test frame is 45 to 80 seconds, the whole shot at those settings 3½ hours, and comping an EXR over the plate is about 2 seconds a frame.

How it’s built

Same as the last few days, Claude did the hands-on work through the Houdini MCP bridge, in Houdini 22 Apprentice on the Deathstar, with me directing and reviewing the renders. Every round gets its own hip file and caches, the sim, render and comp steps are all scripts so any of them can be run again, and Claude kept a log of the whole thing.

What’s next

Next up is the comp in Nuke: putting the camera move back in, getting the plate to react to the fire, then grain and the grade. After that comes a breakdown of how it all stacks up, built from the Cryptomattes and those title cards. The tower’s materials (white metal fins, black louvres and glass that reflects the sky) didn’t make it into this round, so the tower still renders darker than it should, and that’s on the list too, along with the background asteroids if there’s time. Stay tuned!

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Burning Down the House!Frame 60 of the shot rendered in Karma and comped over the plate, with fireballs and smoke coming out of the tower