Pixel Image
Creates a tiled surface that pixelates an image with a posterized color palette.
Overview
Creates a tiled surface that pixelates an image with a posterized color palette.
Inputs (11)
- Image Path (Text): Absolute path to the image file
- Grid Cells (Curve): Pre-generated grid cells
- Mapping Plane (Plane): Optional plane for UV mapping. Auto-detected if empty.
- Colors (Colour): List of colors mapped to brightness (dark to light)
- Accent Color (Colour): Accent color
- Jitter Pct (Number): Jitter percentage (0-100)
- Accent Pct (Number): Accent percentage (0-100)
- Inset Factor (Number): Inset factor (0.0-1.0)
- Bake (Boolean): Bake trigger
- Bake Name (Text): Bake group/layer name
- Rotation (Number): Rotate image map in degrees
Outputs (5)
- panel_mesh (Mesh): Meshes colored by palette
- panel_colors (Colour): Colors of panels
- panel_tags (Text): Panel tags
- panel_geometry (Curve): Panel boundary curves
- Info (Text): Method, assumptions, simplifications and references.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Loads the image from Image Path (cached until the path changes). Only cells that are polylines are used.
- Mapping plane: Mapping Plane if given, else the plane of the first planar cell. The image is stretched over the bounding rectangle of all cell vertices in that plane.
- Each cell is sampled at one pixel under the average of its vertices (nearest pixel); Rotation turns the sample position about the image centre in normalised image coordinates.
- Brightness is the HSL lightness of that pixel (0 to 1); Jitter Pct adds uniform noise of ± Jitter Pct / 100; the colour index is round(brightness × (number of Colors - 1)), from dark to light.
- With an Accent Color, each cell is replaced by the accent with probability Accent Pct / 100. The random generator uses a fixed seed (42), so results repeat.
- Inset Factor (0.01 to 1) scales each cell about its vertex average; cells are triangulated as a fan from that point and joined into one mesh per colour.
- Tile counts in panel_tags and the status count cells per colour.
- Bake writes the meshes to sublayers of Tiles named HexFacade_tag_colour hex, one per palette colour, with one material per colour. Without a Bake Name, baking happens once each time Bake turns True; with a Bake Name, earlier objects with that name are replaced on every solve while Bake is True.
Assumptions
- Cells are planar, convex polylines lying roughly in one plane (a flat or gently curved facade).
Simplifications and limits
- One pixel per cell, no averaging over the cell area; aspect ratio of the image is not kept.
- Brightness is HSL lightness, not perceived luminance.
- End colours of the palette get half-width brightness bands because of rounding.
Workflow
- Grid cells (for example from a hexagon or square grid on a facade) -> Grid Cells.