Birdoggydog's Builds

Switching on painted walls and flattening floor 1's pieces

The painted look is now the default, and floor 1's walls, floors and ceilings were rebuilt flat so the paint draws the detail.

The painted look for dungeon walls, floors and ceilings is now on by default. Floors 2, 3 and 4 of the Breakout Site wear their painted sets in a new game, and floor 1’s wall pieces were rebuilt flat so the paint draws their panels and seams. A wall piece went from 68 triangles to 24.

53 seconds on floor 1. The first half is the old ribbed pieces under their own baked texture, the second half is the new flat pieces wearing the painted house set.

Why was the painted look switched on?

I played the game after the painted look landed switched off and said it didn’t look like the play dungeon had any of its props, walls or floors updated. I was asked whether to switch it on now, and I said yes.

How was it switched on?

PaintedSurface.enabled in painted_surface.gd is true unless the command line says --painted=off, which the films use for their “before”. The importer’s faces take the painted set of the floor’s theme: steampunk, eldritch with purple lamps and fantasy for floors 2 to 4, painted rock for caverns, and the house set for a floor with no theme. A new test, painted_on, starts a new game from the menu and checks that floors 2 to 4 are painted, then repeats it with --painted=off and checks that nothing is. The only thing the switch broke was the editor safety test, which was fixed by marking the script @tool so the editor’s statics agree with the game’s.

38 seconds from the main menu’s new game down to floors 2, 3 and 4, each in its painted set with no flag given.

Why were floor 1’s pieces rebuilt flat?

Floor 1 isn’t built from importer faces. It is laid from wall, floor and ceiling pieces that carried modeled panel seams, conduit and plates, so painting them would have drawn everything twice. The rule for the painted look is that a piece keeps only what changes the silhouette, and everything a texture can say is painted.

How is a flat piece built?

A new method in the interior kit, interior_kit.py method 9, builds the cyberpunk wall with a skirting, a cornice and one pilaster that is 0.24 meters wide and 0.15 meters proud on every square line, which is every 3 meters. The panels are flush, with no gap, chamfer, rib or conduit. Floor and ceiling plates are flush too, and the ceiling keeps its beams because they change the silhouette. A quarter-span piece has no pilaster. The far level of detail is used when the box has more triangles than the near level, which happens with flat floors. The old ribbed pieces stay in the kit as alternatives (wallrib, floorrib, ceilrib) so a “before” can still be built.

The painted seams have to fall where the pilasters stand, so the kit and the shader share one number: interior_kit.PITCH and PaintedSurface.PITCH are both 3.0, and the kit’s painted_pitch() check refuses to build if they differ. The picture is projected in world axes (triplanar) and laid from the grid’s lines, so a seam at a multiple of 3 meters lands on a pilaster.

The plan said 25 members and the count was 25. Of those, 18 changed, in a new and a worn state each, which makes 36 pieces. The other 7 (doors, frames, the lift, a light and the kerb) built to identical bytes and keep their installed files. All 36 went through every step of the model pipeline and its install gate, with the review sheets read, and I approved them. PaintedSurface.pieces is on by default and gives them the set of the floor’s theme through material_for(theme). Floor 1 has no theme, so it takes the house look. The trial flag --painted-floor is retired.

Four views of floor 1 in four rows: today’s ribbed pieces with their own texture, ribbed and painted, flat and painted, and flat and unpainted.

Four views of floor 1 in four rows: today’s ribbed pieces with their own texture, ribbed and painted, flat and painted, and flat and unpainted.

What is still wrong?

Straight on, a pilaster barely reads under the painted look. The surface is matte and one flat color, so a pilaster 0.15 meters proud shows only by its sides, and the picture’s seam is drawn down its middle. The options are to leave it, paint a pilaster a value darker by the face’s depth, or stand it further out. Nothing is changed until I decide.

A close view of a flat wall under the painted look, where a pilaster shows as a faint strip with the picture’s seam down its middle.

A close view of a flat wall under the painted look, where a pilaster shows as a faint strip with the picture’s seam down its middle.

How was the pilaster painted darker?

I picked painting it a value darker, and it landed as a shader change with no rebuild of the 36 pieces. The shader knows a pilaster’s faces by where they stand against the 3 meter grid lines: a front face is 0.15 meters out of a line and within 0.12 meters along it, and a side face is 0.12 meters to the side of the line’s center and within 0.15 meters of its plane, both with a 4 millimeter tolerance and only above the skirting.

One wall seen from across its square. On the left the pilaster is the panel’s value with the picture’s edge seam down it. On the right it is one value darker and the seam is gone from it.

One wall seen from across its square. On the left the pilaster is the panel’s value with the picture’s edge seam down it. On the right it is one value darker and the seam is gone from it.

Those faces take the painted picture 0.25 of its width across, the middle of the first panel, so the picture’s edge seam is no longer drawn on the pilaster. Their color is multiplied by 0.7, the step from the painted set’s body values (0.92 and 1.0) to its next one. The numbers mirror the Blender kit’s wall pilaster, so a change to one has to change the other. The picture’s 1 meter course joins still cross the pilaster. --pilaster=off gives the old look.

31 seconds on floor 1, walking along and across the walls with the pilasters first in the panel’s value and then painted darker.

Also done

  • 235 files changed across the two merges, almost all models, their records and textures.
  • The pilaster change: interior_lay 60 of 60, style_trial 49 of 49, and 18 suite tests with none failed.
  • interior_lay passed 56 of 56 checks and style_trial 21 of 21. The whole suite ran 209 tests and 9 failed: editor_safety was fixed, and the rest fail the same with --painted=off or for want of the painted island in the worker’s checkout, or from timing under load.