Birdoggydog's Builds

Rebuilding the surgery props with a hull block and paint

The character-creation room was still in the old look. How 54 models became smooth cyberpunk hulls with a matte four-value paint, and why the glass got taller.

The surgery, where you pick a body at the start of a new game, was still built in the old look while everything else had moved to the new style. I rebuilt all 18 of its pieces in three states each, so 54 models, as smooth cyberpunk hulls with a flat, matte, painted finish. All 54 passed the pipeline’s gate, and I approved them.

30 seconds from a new game: the four lens-shaped tables with their yellow feed tubes and shredders, then the camera in on table 2 and an elf sliding out of the tube.

Why was the surgery still in the old style?

I’d looked at the surgery in the game and it wasn’t swapped at all, so I asked for the full process for its pieces in the new style, still cyberpunk. Those pieces are the tables, the shredders, the tubes and pipes that feed them, the lamp and the console. The room joins them by named sockets, so the new ones had to join the same way: tables to tops, pipes and tubes in runs.

A grid of nine pieces in five rows. The old tables are black boxes on a pedestal with a yellow stripe, the new ones are rounded lens shapes. The old console is a white block, the new one is a rounded pale shell. The yellow shredder pit has softened corners in the new row.

The table, shredder, console, camera and tray. The top two rows are the old models, the bottom three the new ones at peak, declining and decayed.

How does the hull block work?

The kit’s cyberpunk form says a prop is one smooth body, with blades and fins for edges and nothing boxed on. The kit had no block that makes a lens-shaped plan, so I added hull. It builds a list of rings from the bottom up, each one a superellipse in plan. A few numbers decide the shape:

  • pinch from 0 to 1 narrows the plan to its two ends. At 0 it’s a rounded slab and at 1 it’s a lens to points.
  • round is the superellipse exponent for the corner. 2 is an ellipse and 4 and up is nearly a rounded box.
  • keel is the share of the height that sweeps in from waist, the scale at the floor, up to the full plan.
  • dome is the share of the height at the top that rounds in to crown.

Each ring’s scale is waist + (1 - waist) * sin(pi/2 * t/keel) up the keel and crown + (1 - crown) * cos(pi/2 * (t - 1 + dome)/dome) over the dome. The defaults are pinch 0.5, round 2.6, keel 0.25, dome 0.3, waist 0.72, crown 0.55 and 16 points around.

I only modeled what changes the silhouette: a strap, a lug, a collar where two pieces join. A plate, a gutter or a sign is painted on instead. The body tube’s glass is 2.0 m tall now, so the Alien, at 1.89 m, fits.

What is the painted finish?

I wrote lib/prop_paint.py and a new spec key, painted, that is off by default. When a prop has it on, the texture bake calls the painter instead of its soft finish. The painter has four rules.

  1. Each material gets four values of its one hue, as shares of that material’s color: 0.58, 0.84, 1.0 and 1.2, for shadow, dark body, body and lit edge. Grime, dust and decay are hard-edged patches.
  2. Joins are painted. Where parts meet or in a crease, ambient occlusion under 0.62 takes the shadow value, and a face looking up (normal z over 0.55) takes the lit one. I bake the occlusion with 96 samples, because it gets thresholded and the 24 the soft finish uses speckle at the threshold.
  3. The two body tones come from which way a side faces. A side turned toward a key light from the front left is the body and the side turned away is the darker body, as flat planes with no noise.
  4. It’s matte: roughness 0.9 and no metal.
A grid of nine pieces in five rows. The old tube pieces are speckled yellow with glossy black elbows. The new ones are flat yellow cylinders with a thin dark line at each join. The pipes are plain dark cylinders and the body tube is a clear cylinder on a dark base with a glowing floor.

The lamp, tube pieces, pipes and body tube, old above and new below.

The light is only where the player uses it: the lamp’s disc, the shredder’s pit, the button and the floor of the body tube. I turned the painted finish on only for these 18. The other 1,262 themed props still have the soft bake, and moving them is a batch of about a day, so I made it a separate question. I said yes to every prop, and I haven’t built it yet.

Also done

  • tests/surgery_props passes with 349 checks. The table base is 0.885 m tall and the drip stand 0.487 m deep now, and the test says so.
  • The gate’s 18 steps ran for all 54 models, 0 refused, 38 files changed their .glb bytes.