Skip to main content

Face Hexagons Grid

OCCT category icon with a stylized logo representation

Learn how to create hexagonal face patterns that respond to a control point. Hexagons closer to the control point become larger, while distant ones become smaller, creating organic wave-like effects.

Key Concepts​

  • Control Point: A point that influences the hexagon sizes based on distance
  • Distance Scaling: Hexagons scale up/down based on how far they are from the control point
  • UV Coordinates: Position the control point using 0-1 values instead of exact coordinates
  • Pattern Filtering: Selectively remove some hexagons to create openings
Hexagons scaled by distance on a face
Bitbybit Platform

Hexagons scaled by distance on a face in Rete

Rete

How It Works​

This example creates hexagonal faces that vary in size based on their distance from a control point, creating natural-looking patterns.

Step-by-Step Process​

  1. Set up the grid parameters - Define width, height, and number of hexagons
  2. Create a control point - Use UV coordinates (0 to 1) to position it on the grid
  3. Calculate distances - Measure how far each hexagon center is from the control point
  4. Scale the hexagons - Closer hexagons become larger, distant ones become smaller
  5. Apply patterns - Optionally remove some hexagons to create openings

The Math Behind It​

The key is remapping distances to scale values:

  • Find the shortest and longest distances
  • Convert these to scale factors between 0.211 and 0.9
  • Apply these scales to make hexagons bigger or smaller

Why Use UV Coordinates?​

UV coordinates (from 0 to 1) are better than exact positions because:

  • U=0 means left edge, U=1 means right edge
  • V=0 means bottom edge, V=1 means top edge
  • Works the same regardless of grid size
  • Easy to understand and adjust

Pattern Control​

The inclusionPattern lets you remove hexagons in a repeating pattern:

  • [true, true, false] = show 2, skip 1, repeat
  • [true, true, true, true, false] = show 4, skip 1, repeat

Real-World Uses​

  • Architecture: Building facades that respond to sunlight or wind
  • Product Design: Grip patterns, ventilation holes, decorative surfaces
  • Interior Design: Ceiling panels, wall textures, lighting patterns

The beauty of this approach is that simple distance calculations create complex, organic-looking patterns that feel natural rather than mechanical.