CG Shortcuts
Cinema 4D Toolkit
by cgshortcuts.com
cgshortcuts.com
BrickGen

BrickGen Settings Guide

Fill the volume of an object with real-size Lego-style bricks, with color, logo UVs and a keyframable build animation.

How it works

  1. Add BrickGen to the scene and drop a mesh in as its child, or make BrickGen a child of the mesh.
  2. The source volume is voxelised on the Lego grid, filled with bricks and packed with the allowed sizes.
  3. Use Scale Multiplier to keep real Lego proportions, or raise it for large scenes.
  4. Press Create / Refresh Material for a Redshift material, then key Build Progress to animate the build.
Source object. BrickGen looks for a mesh as a direct child, or for its own parent. The source is hidden automatically; do not delete it.

Mode & Size

Mode

ModeFill turns a source object's volume into bricks (everything below). Plane builds a flat Lego surface, such as a baseplate or a mosaic, with no source needed.

Plane

Plane Mode. The plane sits on the generator's origin, centred in X and Z. A child object is optional: with Color Mode set to Source Material or Texture, the plates take their colors from it, so a textured Plane under BrickGen turns an image into a mosaic. With no child, those two modes use the Lego palette.
Width (studs)Plane size along X, in studs.
Depth (studs)Plane size along Z, in studs.
Layers1 or 2. The second layer uses its own layout, so its seams cross the layer below.
Top Layer Coverage (%)With 2 layers: how much of the second layer is kept. Lower it to scatter loose pieces over the base layer. Pieces are removed at random (Seed), and raising it only adds pieces back without reshuffling the rest.
Piece HeightPlate (3.2 mm, a third of a brick) for a thin surface, or Brick (9.6 mm).
LayoutSingle Piece: one plate the size of the whole plane, like a baseplate. Uniform Size: one piece size, with cut-down pieces at the edges. Random Sizes: every piece gets a random size between Min and Max. Every layout fills the plane with no gaps. Seed changes the layout; Stagger Seams (Bricks tab) offsets alternate rows of Uniform pieces.
Start FromUniform and Random layouts. Center lays the pattern out around the middle of the plane: full pieces fill the centre and the cut-down pieces fall evenly on all four edges (with Uniform Size a seam runs along each centre line). Corner starts at the -X/-Z corner, so the cut pieces collect along the +X and +Z edges.
Min Size (studs)Random Sizes: the smallest side a piece aims for. Edge pieces can still be smaller so the plane has no gaps.
Max Size (studs)Random Sizes: the largest side a piece can have.
Real Lego Sizes OnlyRandom Sizes: only use side lengths real plates come in (1, 2, 3, 4, 6, 8, 10, 12, 16), so there are no 5x7 pieces.
Piece Length (studs)Uniform Size: piece length along X.
Piece Width (studs)Uniform Size: piece width along Z.

Size

Scale MultiplierBrick size in millimetres multiplied by this value. 1 is real Lego scale; raise it when the source is huge.
Brick Gap (mm)Space between neighbouring bricks, in Lego millimetres (scaled with the brick size). Real Lego is 0.2. Set 0 for bricks that touch with no visible seam.
Auto Fit Brick SizeShrink the brick size so a very large source still builds with a readable number of bricks.

Fill

Fill ModeSolid fills the volume; Hollow leaves an open shell; Surface Only builds a skin of bricks.
Wall Thickness (bricks)Shell thickness in bricks for Hollow mode.
Cap TopClose the top shell row.
Cap BottomClose the bottom shell row.
Surface FitHow boundary cells are accepted. Loose uses a centre test, Balanced is the default, Tight keeps every brick inside the source.
Fill Offset (studs)Contracts or expands the fill. Negative values contract: a brick cell is kept only when its centre is at least that far inside the source, so thin parts (letters, limbs) get slimmer and gaps between them open up. Positive values expand: empty cells within that distance of the source are filled. The distance is the same in every direction, and Surface Fit still trims the edges. Changing it re-runs the voxel fill.
Hollow Underside (real Lego)Leave the underside open like a real Lego brick, with tubes instead of a bottom skin.

Surface Variation

Remove Surface Bricks (%)Fill Mode. Randomly takes away this share of the bricks on the outside of the model (any brick with an exposed face). Interior bricks always stay, so the model gets missing pieces rather than holes through it.
Add Loose Bricks (%)Fill Mode. Adds extra bricks on the model's top surfaces until this share of the free spots on top is covered. Each added brick rests fully on bricks below it, like a real Lego brick on studs, and uses the brick sizes allowed in the Bricks tab.
Surface SeedChanges which bricks are removed and where the loose ones go. Changing one amount never reshuffles the other.

Layout

Explode AmountMove bricks away from the fill.
Explode RadiallyExplode outward from the centre instead of along the axes.
Scale Each BrickScale each brick around its own centre.
Hand-built Jitter (mm)Small random offsets that make the model look hand-built.

Bricks

Brick Types

Allow 1x1Allow 1x1 bricks.
Allow 1x2Allow 1x2 bricks.
Allow 2x2Allow 2x2 bricks.
Allow 2x4Allow 2x4 bricks.

Packing

DistributionRandom, Sorted largest first, or Mostly Large. Fewer sizes and Sorted give a more uniform wall.
SeedChange the layout without changing the shape.
Stagger Seams (Bond)Offset alternating layers so vertical seams do not line up.
Brick LimitMaximum number of bricks. Lower it for a faster preview on dense sources.

Studs & Tubes

Studs On TopAdd the studs that make the bricks read as Lego.
Underside TubesAdd the underside tubes of a real brick. Slower, but visible from below.
Stud Segments (viewport)Radial smoothness of the studs in the editor viewport. Keep it low for speed.
Stud Segments (render)Smoother studs for renders. When higher than the viewport value, BrickGen outputs a second, smoother mesh that is hidden in the editor and shown to renderers (Picture Viewer and Redshift IPR). It costs extra build time, so leave it equal to the viewport value to switch it off.

Edges & Shading

Edge BevelShader (fast) adds a Redshift Round Corners shader to the material: soft edges everywhere with no extra geometry, best for far and mid shots. Geometry builds real chamfers on every body edge, the bottom rim, the stud top edge and the stud base, which holds up in close-ups but adds polygons. Press Create / Refresh Material after changing it.
Edge Radius (mm)Bevel size (both modes) in real Lego millimetres (scaled with the brick size). Around 0.2 - 0.4 looks like moulded plastic. Press Create / Refresh Material after changing it.
Bevel Amount (mm)Edge bevel in millimetres.
Bevel SegmentsSmoothness of the bevel.
Phong AnglePhong angle of the generated mesh.

Material Color

Color

Color ModeSource Object Color uses one flat color from the source object. Source Material samples the source's material texture (its flat color if it has no texture). Also Random, Gradient, Custom and the Lego Palette. The Material Color tab only shows the settings that apply to the chosen mode.
Texture SamplingUsed by Source Material. Surface Point reads the texture at the closest point on the source surface to the brick centre. Brick Average averages several surface points across the brick, which is smoother on noisy photo textures.
Average SamplesBrick Average only. Sample points per side across the brick top (3 = 9 points). Higher is smoother but slower.
Color CountCustom mode: how many colors to use, 1 to 5. With 1, every brick gets Color 1. With more, each brick picks one of them at random (Color Seed).
Color 1 to 5The Custom mode colors. Only the first Color Count of them are shown and used.
GradientGradient mode: a full color ramp. Add as many knots as you like; each brick takes the ramp color at its position.
Gradient DirectionWhich way the ramp runs across the bricks: Bottom to Top, Left to Right, Back to Front, Diagonal, or Radial (center outwards). The ramp is stretched to fit the bricks exactly. Random gives each brick a random color from the ramp, so the ramp works as a palette. In Plane Mode with one layer, use Left to Right, Back to Front, Diagonal or Radial (the plane has no height to run along).
Color SeedChanges the random assignment in Random, Lego Palette, multi-color Custom and Random-direction Gradient.
Remap to RampRandom mode: instead of a random hue, each brick takes a random color from the Random Ramp below, so the random look stays within your own palette. Each brick keeps its random value, so turning this on or off (or editing the ramp) recolors the same bricks consistently. Off by default.
Random RampThe ramp the random colors are picked from when Remap to Ramp is on. Wider sections of one color appear more often; Color Seed reshuffles which brick gets which color.

Variation

Color Variation (%)Works in every color mode. Shifts each brick's hue and saturation a little at random so identical bricks don't look perfectly flat. At 100 % the hue moves up to about 30 degrees either way.
Lighter Variation (%)Works in every color mode. About half the bricks are made a little lighter, each by its own random amount. At 100 % the lightest are half way to white. It also lightens white and light grey bricks.
Darker Variation (%)Works in every color mode. The other half of the bricks are made a little darker, each by a random amount, up to half way to black at 100 %. Use both together for some lighter and some darker bricks.
Variation SeedChanges which bricks get which shift. Changing one variation amount never reshuffles the others.

Surface

Brick RoughnessRoughness of the generated Redshift material.
Dirt LayerBuilds the bundled dirt map into the BrickGen material using the Random UV set: it drives a Ramp that feeds roughness and a Color Layer over the brick color, which also feeds subsurface. Press Create / Refresh Material after changing it.

Material

Create / Refresh MaterialCreate or update the Redshift material and assign it. It sits at the bottom of the Material Color tab.

Logo & UVs

Logo

Logo On StudsEmbosses a logo on the stud tops as a bump map. The bundled logo is used unless you set your own Logo Image. Click Create / Refresh Material on the Material Color tab.
Logo Image (B/W bump map)Optional. Leave empty for the bundled logo. A black and white image where white is raised; blur the edges slightly so the bump isn't harsh. It is mapped once across each stud top, so keep the logo centred on a square image. Use your own artwork or logo file.
Logo ScaleSize of the logo on the stud. 1 is the default size, higher is bigger, lower is smaller.
Logo RotationRotate the logo around each stud.
Logo Bump StrengthStrength of the logo bump in the material.
Random Per-Stud RotationGive every stud a random logo rotation.
Logo SeedVariation seed for the random logo rotation.

UV Sets

Triplanar Material MappingUse triplanar mapping instead of the generated UVs.
Random UV SetAdds a second UV set named Random for surface detail such as dirt, fingerprints and scratches. Every face is projected at a fixed real-world scale, then each brick gets its own random rotation and offset, so a tiling texture never lines up the same way on two bricks. In a Redshift Texture node set the UV channel to Random. The main UV set (colors and logo) is untouched.
Random Tile Size (mm)How big one repeat of the texture is, in Lego millimetres (scales with brick size). Bigger values make the dirt detail larger.
Random SeedChanges which random rotation and offset each brick gets.

Animation

Build

Build Progress (%)Keyframe this from 0 to 100 to build the model. Bricks start one after another at an even rate and each takes the same time to arrive, so a straight 0 to 100 key builds at a steady speed and about half the bricks are in place at 50 %. With Drop In + Avoid Overlap a brick waits for the bricks under it, which can delay a few of them slightly.
Build OrderLayer First builds from the bottom; Radial from Centre builds outward.

Pop-in

Pop-in StyleScale From Zero grows each brick, Drop In falls from Drop Height bricks up, and Appear pops each brick into place with no movement.
Drop DirectionDrop In only. Which way the bricks come from: above, below, left or right (-X / +X), or front or back (-Z / +Z). Directions are BrickGen's own axes, so they rotate with the object.
Avoid OverlapsDrop In only. A brick only appears once every brick in its path has landed, so falling bricks never pass through bricks that are already in place. Because bricks then have to land in order, a tall model shortens each brick's fall time so the build still finishes at 100%; Softness / Falloff is the longest a fall can take. Turn it off for the free, overlapping look.
Drop Distance (bricks)Drop In only. How many brick heights away each brick starts before it moves into place, accelerating like gravity. Each brick is visible from that height as soon as it starts, so a bigger value reads as a longer fall.
Fall CurveHow each brick moves during its own fall (Drop In) or growth (Scale From Zero): left to right is the start to the end of its move, bottom to top is how far along it is. The default straight line is a steady speed. Bend it to add easing, e.g. a curve that flattens at the top right slows each brick as it lands. Appear has no movement, so it is hidden there.
Bounce / OvershootA subtle settle at the end of each brick's move. Drop In: the brick lands, makes a small hop back up the way it came and a smaller second one, then rests. At 1.0 the hop is half a brick plus 5 % of the Drop Distance, so longer drops bounce higher. Scale From Zero: the brick grows slightly past full size, then settles back (1.0 = 20 % larger). 0 turns it off. The bounce runs after the fall, for half the Duration per Brick (never less than 2.5 % of the build), so it stays visible even with very short falls. With Avoid Overlap, bricks above wait for the bounce to finish, so nothing intersects. Hidden for Appear.
SpreadA random sideways wobble while each brick moves in, fading as it settles. Needs Random above 0; off with Drop In + Avoid Overlap, where a wobble could knock neighbours.
Duration per BrickHow long each brick takes to drop in or grow, as a share of the whole build (0.05 = a twentieth of it). Every brick takes the same time. Small values build one brick after another; large values make many bricks move or grow at once. Hidden for Appear, which pops each brick in instantly. With Drop In + Avoid Overlap it may be shortened so that bricks waiting for the ones below them still land by 100 %.
Random OffsetAdd random timing so bricks do not arrive in a perfect wave.
Animation SeedVariation seed for the random timing.

Output

Output

Output ModeMerged Mesh: one mesh for every brick, with exact per-brick color. The slowest to build, but one object is the lightest for the viewport and renderer to handle. Individual Bricks: one mesh per brick (up to 2000), for when you need to pick or animate bricks yourself. Instances: one mesh per brick shape and color, plus an instance per brick. The fastest to build; above 48 colors close shades are merged.
Preview (no studs)Fast preview without studs. Turn it off before rendering.
Viewport Brick Cap (0 = all)Shows at most this many bricks in the viewport, to keep big builds responsive. The bricks kept are spread evenly over the whole build, so you still see its full shape, just sparser. Picture Viewer renders, the Sim rig and the Parts List always use every brick. The Redshift IPR renders the viewport build, so it follows the cap too. 0 shows every brick.

Export & Help

Export Parts List (CSV)Write a parts list next to the document.
CG Shortcuts | cgshortcuts.comOpen cgshortcuts.com.
Help: Settings GuideOpen this guide. Cinema 4D's own Show Help also lands on the setting you are on.

Simulation

Rigid-body collapse with Cinema 4D's Simulation system. BrickGen builds a light proxy rig: one plain box per brick (no studs, slightly smaller than the brick so neighbours never start overlapping, which is what causes explosions). The proxies simulate; the full-detail bricks ride on them. Bricks are held in place until their release frame, so you choose the order they come down.

  1. Link your ground in Floor (it gets a Collider tag if it has none). Bricks must not start below the floor.
  2. Set the Release options and press Create / Rebuild Sim Rig.
  3. Play from the start of the timeline, or press Cache Simulation to bake it so you can scrub and render without re-simulating.

Proxy Rig

Floor (Collider)The ground the bricks land on. A Collider tag is added to it (with the bricks' friction and bounce) if it has none.
Create / Rebuild Sim RigBuilds the proxy rig next to BrickGen, replacing the old one. It also sets the Simulation Scene to Simulate Before Generators, so the full bricks do not trail a frame behind, and raises Substeps to at least 80 so small bricks do not sink into the floor. It sets the Simulation Scene's Time Scale to Sim Speed, and keys each proxy's Sleep timer so a brick goes to sleep about a second (simulated time) after its release, once it has stopped. Without that, a settled pile keeps jittering for the rest of the shot. Rebuild after changing the bricks themselves (size, fill, seed); the cache is lost.
Sim RigThe rig BrickGen follows. Set by the button.

Release

Release DirectionThe order bricks are let go, as a sweep across the model (Right to Left releases the +X side first), Random, or All at Once. Each proxy's Rigid Body Trigger is keyed from On Collision (held) to Immediately (falls). Held bricks hit by falling ones also come loose.
Release Start (frame)Frame the first brick is released.
Release Duration (frames)Frames from the first release to the last.
Release RandomnessShuffles release times along the sweep so it is not a perfectly straight front.
Release SeedSeed for the randomness (and for Random order).

Contact

FrictionProxy friction. High values stop bricks skating away across the floor.
BouncinessHow much bricks bounce on impact.
Damping (less scatter)Linear and angular damping on the proxies. Higher keeps the pile tighter.
Sim Speed (slow motion)Sets the Simulation Scene's Time Scale. Real-size bricks fall their own length in a frame or two at full speed, which looks like stop motion; 0.3–0.5 reads like a filmed miniature. Lower values need a longer scene to finish settling. Time Scale applies to every simulation in the scene.
Update Release TimingRewrites the release keys, contact settings and Sim Speed on the existing rig without rebuilding it. It clears the simulation cache, which still holds the old timing; cache again afterwards.

Cache

Cache SimulationSimulates and stores the whole Simulation Scene (the same as Cache Scene on a Rigid Body tag's Cache tab), so playback and scrubbing read the stored motion instead of re-simulating. Follow Sim keeps the full bricks on the cached proxies. Other simulated objects in the scene are cached too. Cinema 4D records nothing while Simulate Before Generators is on, so BrickGen turns it off for the caching run and back on afterwards; a Cache Scene pressed by hand on a proxy tag needs the same.
Clear Simulation CacheThrows the cache away so the scene simulates live again. Clear and re-cache after changing the floor, friction or anything else the sim depends on.

Display

Follow SimPlaces every full brick on its proxy each frame. Off shows the bricks at rest.
Show Proxies in ViewportShows the proxy boxes in the editor. They never render.
Remove Sim RigDeletes the rig (undoable).

Good to know