6 min read

Storyboards and Spawnable Splines

Bringing Procedurally Generated Assets into Sequencer
Storyboards and Spawnable Splines

My current project is to create a sequence for each of the roughly 150 shots in the movie. I am doing a quick pass: placeholder MetaHumans with no animation, just static poses, flat lighting, and an almost empty environment. The main goal is to place the camera for each shot in order to get a sense of what areas in the apartment are visible, so I can then focus my attention on detailing those areas.

Of course, choosing the camera placement isn't trivial! When I decide where to place the camera, I am deciding what to show the audience. I am deciding what the movie will be. Normally, I wouldn't do a "quick pass" on this. I would spend a lot of time with my eyes closed, trying to imagine the movie playing in front of me.

Fortunately, I did this work before. Back when I planned on shooting this movie live action, I used Unreal Engine to plan where I would place the camera in my real-life apartment. After moving the entire production into UE, I tweaked the apartment layout, but most of the original camera setups still work. I am simply recreating them in UE5.

I did the originals in UE4, at a time when I was even less experienced with UE than I am now (and had a weaker GPU), so I thought they could use a visual update:

I haven't decided exactly how I want the characters to look. I still need to figure out if I can customize them myself, or if I will need to pay a professional character modeler.

But, first, I will need to design the apartment environment and decide what assets to fill it with, as well as how to source them. I'll try to model and texture whatever I can on my own, and buy premade assets when necessary.

PCG Components and Sequencer

In many scenes, the characters connect their brains to the cluster computer by sticking a cable into a port behind their right ear. I wanted to include a simple version of those cables in these storyboards, so I used a basic Blueprint with a spline and a PCG Component:

The problem is that the cable's position needs to change based on the shot. When the characters aren't connected to the computer, the cables wait on the floor:

Then, for any shot when the characters attach the cables to their heads, these cables on the floor need to disappear and be replaced with cables that extend to wherever the characters are positioned.

Hiding the floor-cables for a particular sequence is simple. Add the asset to Sequencer, use an "Actor Hidden in Game" attribute, and the asset will turn invisible whenever the sequence is opened. Close the sequence, and it will reappear. So far, I haven't had any issues referencing PCG assets in Sequencer this way.

I need the longer cables to do the opposite. When I open the sequence, they need to spawn, and they need to vanish when the sequence is closed. This can be done by converting a Sequence Actor to Spawnable.

This is where I had issues. When I converted the spline Blueprints to Spawnable, a few things happened: the spline mesh generated by the PCG Component remained, but the spline itself lost all its points and reverted to the default two-point spline. Also, the PCG Component was stripped of the PCG Graph. Converting the Actor back to Possessable did not return the spline points or the PCG Graph.

However, the main problem was that when I tried rendering the sequence with Movie Render Queue, UE would crash. I found that a Spawnable Blueprint with a PCG Component would cause a crash during render, even if the PCG Component had no PCG Graph attached to it.

I decided, why not bake the PCG asset down to a Static Mesh, and make that the Spawnable Actor? For this, I followed the same guide I linked in my last article:

The steps for baking a PCG asset to a Static Mesh are easy (it's the Merge Actors tool), and there are no problems with using Spawnable Static Meshes in Sequencer.

I had one other problem, though. When I saved my PCG cable as a Static Mesh, it changed from black to red:

I borrowed this cable mesh from the Cassini Sample Project. Its original color was red, and I had changed it to black. Why was it reverting to its original color?

The Talisman Template and Vertex Color Data

The first time I used this cable, for the PCG cluster computer, I expected the cable's Material to be like most Materials I had encountered, and include some kind of albedo tint parameter that I could use to easily adjust the color. But, I found something else entirely.

The Cassini project, it appears, borrowed from the Talisman Environment Template, and the Materials used in the Talisman project are... special:

Designing Materials Using Dynamic Material Control

Textures and materials are often the largest part of any UEFN project. To further reduce the project size, the template uses a dynamic approach to textures and materials that avoids the use of unique texture maps. For this final result, a procedural workflow that stores ambient occlusion, curvature, and mask data on the mesh using Vertex Colors was used. The stored data was then used to apply and blend the materials.

The MI_Rubber_Presets Material Instance didn't have a typical albedo tint parameter. In fact, nothing about it was familiar to me:

MI_Rubber_Presets

"Hm, this is strange, let's look at the parent Material..."

M_Gen_Env

"Oh. Hm. Let's double click one of these Material Functions..."

MF_Amber_Preset_GenSurfacePresets

"Oh..."

After puzzling over these node graphs, I decided that since they are doing something involving vertex colors, I could try using the Modeling Tools to paint the vertex colors black. It worked. I still don't understand these Materials, but I got the black cable I wanted.

A dramatic recreation of the day I painted the cable's vertex colors black.

Honestly, I would enjoy digging into the Talisman project and learning how it was created, but I need to focus on my movie. If you're interested, the rabbit hole is this way:

Back to the Problem at Hand

So, I had my red-but-painted-black cables, and as long as they stayed in Blueprint form, the black paint stuck. But, when I saved them as a Static Mesh with Merge Actors, it fell off. Luckily, in the Merge Actors Settings, there is a checkbox:

With this, I had everything I needed. For a particular shot, I can create a new cable that snakes around to connect behind a character's ear, save it as a Static Mesh that will live in the sequence as a Spawnable Actor, and tell the original cables to hide whenever that sequence is opened.

This works, for now, while my sequences are basically functioning as 3D storyboards. The characters don't move, so the cables can be static. When I start animating, I will need another solution. Depending on the shot, I will need to swap static cables for physics-enabled assets that can interact with the characters. How will I do that? No idea. There is a mountain of other work to do before I reach that step.