📖 Official User Manual: 3DBricks & Stickers

Welcome to the definitive technical and operational guide for 3DBricks & Stickers. This specialized 3D web suite is engineered for two core missions: the creation, physical sizing, and 3D molding of LDraw stickers (flat and curved) for LEGO and TENTE pieces, and the mathematical correction and standardization of coordinate origins for community-made parts.

🖥️ INTERFACE OVERVIEW: Top Bar & Floating Windows

The workspace is divided into an interactive 3D canvas, a Top Bar for panel management, and a Bottom Bar for viewport and camera controls.

🕹️ KEY CONCEPT: The Scene Manager & Interactive Viewer

Before you start working, it is vital to understand the Scene Manager (located inside the ⚙️ Manager / Pieces panel). It is the central brain from where you control every object in the 3D scene.

1. Loading Pieces (3 Methods)

2. Scene Management & Security Rules

🎨 SECTION 1: Creation and Application of Stickers to LDraw (Ready for Printing)

Opened via the 🏷️ Stickers button. This module converts standard images (PNG, JPG, WEBP) into pure LDraw polygons (type 3 and 4 lines with 0x2RRGGBB direct hex colors). To allow smooth bending later, the engine generates a Flexible Articulated Mesh, automatically cutting polygons every 3 pixels maximum to create micro-joints.

1.1 Generate a Flat Sticker & Physical Sizing

  1. Upload the base piece as a reference: Load the LEGO/TENTE piece where the sticker will go, check "Combine new files", and optionally lock it (🔒) so you don't move it by mistake.
  2. Configure the Target Hologram: In the left panel, open "Target Hologram". Enter the physical size of your base piece:
    • Studs X / Studs Z: 1 stud = 20 LDU (8 mm).
    • Height (Plates): 1 plate = 8 LDU (3.2 mm). Standard brick height = 3 plates (24 LDU).
    This draws a reference cage in the viewer (green in dark theme, red in light theme).
  3. Upload the Image: In the Stickers panel, select your image file. Pixels with high transparency (alpha ≤ 50) are automatically discarded, creating die-cut stickers natively.
  4. Adjust Size with the Flat Preview Shadow: Check 👁️ Show Flat Preview Shadow. A yellow wireframe box with a center crosshair (_Sombra_Plana.dat) will appear in the scene.
    • Modify Scale (LDraw Units) (e.g., 0.3) and watch the wireframe grow or shrink in real time.
    • Smart Inheritance Trick: You can move and rotate this yellow wireframe using the 3D Gizmo to place it directly on your piece's face! When you generate the sticker in Step 6, the final sticker will automatically inherit the exact position and rotation of this preview shadow, and the shadow will auto-delete.
  5. Check Real Physical Dimensions (mm): Look at the 📏 Physical Dimensions (Flat) box. The program calculates the exact real-world size in millimeters using the official LDraw standard (1 LDU = 0.4 mm). Note: If a model has 3D depth (like a brick or an already curved sticker), this box will display -- mm x -- mm.
  6. Resolution and Studio 2.0 Color Fix:
    • Max resolution (px): Controls mesh density (default 128px). Exceeding 128px triggers a heavy-mesh warning. Use 128–256px for 3D use in Studio/LDCad, or higher values if you only intend to export a 300 DPI PNG for physical printing. Note: Studio 2.0 struggles with LDU scales below 0.2.
    • 🔆 Color correction (Studio Render Only): Applies a Gamma 2.2 curve to RGB values so Studio's photorealistic render engine doesn't wash out or fade your sticker colors.
  7. Generation: Click 🎨 Generate Flat Sticker. You will be prompted to name the sticker. The program will format the header and inject the articulated 3D sticker into the scene.

1.2 Wrap Stickers on Curved Surfaces (Automatic Raycasting)

For complex organic pieces, slopes, cylinders, or domes, this tool shoots mathematical rays from every vertex of your flat sticker onto the underlying 3D piece, adapting to its exact topology.

  1. Prepare Scene: Have both your base piece and your flat sticker loaded in the scene. (Note: You can only curve flat stickers; trying to curve a 3D piece or a locked sticker will be blocked by the security scanner).
  2. Position Facing the Curve: Select the flat sticker in the Scene Manager. Activate the Gizmo (🏗️ Move / 🔄 Rotate) and place the sticker floating in front of the curved surface of the base piece, parallel to the area you want to stamp.
  3. Magic Projection: With the flat sticker selected, press 🕸️ Automatic Surface Wrap (or Wrap to Curved Surface). The engine automatically detects the shooting direction, projects every vertex onto the base mesh with a 0.2 LDU normal offset (to prevent flickering/Z-fighting), converts quads into triangles for smooth contouring, and replaces the flat sticker with a new _envuelta.dat model.

1.3 Manual Curved Wrap (Precision Geometric Molding)

When you want a mathematically perfect curve without relying on a base piece's polygon topology (or when curving around empty air), use the Manual Molding engine.

  1. Choose Base Shape & Parameters: Open "Manual Curved Wrap" and select one of the 4 parametric molds (each shape remembers its own independent settings):
    • Half Cylinder: Adjust Radius, cylinder Width, and Arc in degrees (e.g., 90° = quarter cylinder, 180° = half cylinder).
    • Hemisphere / Quarter Sphere: Adjust Radius, Oval Shape (100 = perfectly round, other values stretch the Z-axis), and Vertical Cut angle.
    • 'U' Shape: Creates a curved front with two straight parallel side wings. Adjust Curve Radius, Width, and Straight Length.
  2. Generate & Place the Mold: Click 🧲 Create/Adjust Shadow. A semi-transparent orange 3D mold (_Sombra_Manual) appears at the origin. Move this orange shadow to the exact position where your curve should sit.
  3. Orient Your Flat Sticker: Select your flat sticker in the Scene Manager list. If you want the sticker to be tilted or rotated on the curve, rotate the flat sticker now using the Gizmo.
  4. Curve Sticker: With the flat sticker selected, click 🕸️ Curve a sticker. The program wraps the sticker's vertices around the mathematical formula of the mold, places it at the exact position of the orange shadow, inherits the exact rotation angles you gave to your flat sticker, and automatically deletes the orange mold and the old flat version, creating a new _curva.dat file.

📐 SECTION 2: Piece Origin Correction & Dictionary Generator (TENTE Ecosystem)

Why is it vital to correct the origin?

Community-designed TENTE and custom LDraw pieces often lack a unified coordinate origin (0,0,0). Some authors model from the geometric center, others from a bottom corner or the top stud. When importing these pieces into external 3D web builders or video games, rotations cause the pieces to orbit wildly out of place. This module aligns the piece to a standard bounding box and calculates a JSON compensation dictionary for all 64 standard 90-degree Euler combinations (covering the 24 real 3D orientations).

Workflow for Standardization and Dictionary Extraction

  1. Load Piece & Set Reference Cage: Load the .dat piece. In "Target Hologram", set the studs (X, Z) and height (Plates) that match the real piece. The cage sits from Y = 0 downwards (in LDraw, negative Y is up, positive Y is down; the viewer flips Y and Z visually so you work comfortably right-side up).
  2. Automatic or Fine Alignment: Open the 📐 Origin Correction panel.
    • Click 🎯 Auto Center: The engine resets any Gizmo edits, calculates the 3D bounding box of the mesh, snaps X and Z to the nearest 10 LDU stud grid, and aligns the bottom of the piece with the bottom of your Target Hologram.
    • Fine Offset Sliders (X, Y, Z): Use the sliders or number boxes (in 0.5 LDU steps) to manually tweak the position until the piece fits inside the hologram cage like a glove.
  3. Calculate All Rotations: Once aligned in the base position (0_0_0), click ✨ Auto-fill Rotations. The mathematical engine takes your base offset vector and applies Euler transformations across all 90° steps (0°, 90°, 180°, 270° on X, Y, and Z), populating the entire offset map in memory.
  4. Extract Dictionary Code: Copy the generated JSON snippet from the Generated Dictionary Code box at the bottom of the panel (e.g., "piece.dat": { "0_0_0": { ox: 0, oy: -24, oz: 0 }, ... }) and paste it directly into your external game or web builder's database.

💾 SECTION 3: Viewport Controls, Gizmo & Export Options

Bottom Toolbar & Advanced 3D Gizmo

Download & Export Panel (💾 Download)