Skip to content

MeshWarp

Reads and draws 2D model Wavefront OBJ

It is used for mesh warping and can be directly rendered into a ViewPort

MeshWarp Node

Complex Surface Warping

MeshWarp provides advanced geometric correction for projection mapping onto curved or irregular surfaces. Unlike simple CornerPin adjustments, MeshWarp uses a lattice deformation system that allows fine-grained control over mesh vertices, enabling smooth warping across complex geometries.

Reference

The following properties can be configured for this node:

Property Type Description
mesh drag n' drop select the 3d model file to draw. the file needs to be located inside the ~/_assets/_models/_warps folder. you can also drag'n drop files, which will be copied into the _warps folder and autmatically selected. It needs to be of type Wavefront OBJ.
lattice - SPARCKs own MeshWarp file format. It contains the mesh data plus the lattice data. You need to save this file if you want to keep your modifications.
new lattice - creates a new lattice that is applied on the loaded mesh.
edit - focuses the editor on this node
subdivision - subdivides the mesh for nicer warpings. Works only on quad faces
export - exports the final mesh (Wavefront OBJ) to the ~/_export folder. The file will be named after the node.
RenderGroup - set the render group. Capture/Beamer/3DViewer have an equivalent in which you can choose which group to render.
transform - Modelview and projection transform reset flag (default = 0) When the flag is set, the modelview and projection transforms are set to the identity transform before rendering the object. This is useful for sprite or billboard overlays, or automatic scaling to window size. The transform_reset flag modes are:
  • 0 = do nothing (default)
  • 1 = proportional orthographic glOrtho(-aspect, aspect, -1.0, 1.0, near_clip, far_clip)
  • 2 = orthographic normalized glOrtho(-1.0, 1.0, -1.0, 1.0, near_clip, far_clip)
  • 3 = proportional perspective with near clip = 0.001 gluPerspective(lens_angle, aspect, 0.001/near_clip/, far_clip)
  • 4 = normalized perspective with near clip = 0.001 gluPerspective(lens_angle, 1.0, 0.001/near_clip/, far_clip);
  • parent - parent transformation node
    position (local transformation) position x y z
    rotation (local transformation) rotation x y z
    scale (local transformation) scale x y z
    shader - link to Shader Node
    color - object color
    depth - depth buffering
    blend - enables blendmode
    blendmode - choose blendmode:
  • alphablend
  • add
  • multiply
  • screen
  • exclusion
  • colorblend
  • coloradd
  • alphaadd
  • displaylist - enables displaylist - can speed up drawing
    cachemode - choose cachemode:
  • vertexarray
  • displaylist
  • vertexbuffer
  • immediate
  • polymode draw..
  • polygons - only faces
  • lines - only lines
  • points - only vertices
  • axes - show axes of the models origin
    fileWatch - watches the model file. when it changes, it will be autmatically reloaded
    Inlet Type Description
    properties properties properties | use message [set <propertyPath> <value(s)>] (without node/<nodeName> at the beginning) to set internal properties
    main texture main texture

    Lattice Workflow

    Creating and Editing a Warp

    The lattice system allows interactive mesh deformation:

    1. Load a base mesh (OBJ file) via the mesh property or drag-and-drop
    2. The base mesh should be a 2d mesh on the XY plane, origin at (0,0,0) and the individual vertices located within a unit square (-1 to 1 in X and Y)
    3. Click new lattice to create a deformable lattice grid over the mesh
    4. Click edit to open the lattice editor
    5. Drag lattice control points to warp the mesh
    6. Save the lattice file to preserve your modifications

    The lattice file stores both the original mesh data and your deformations, so you can reload and continue editing later.

    MeshWarp Node

    MeshWarp Node

    MeshWarp Node

    MeshWarp Node

    Editor Keyboard Shortcuts

    The MeshWarp editor has four editors:

    • Two editors for modifiying the mesh:
      • Lattice Select (for lattice control points) and
      • Mesh Select (for direct manipulation of mesh vertices).
      • Press Tab to switch between these two editors.
    • Two UV editors:
      • Lattice UV Edit and
      • UV Edit.
      • Press Tab to switch between these two editors.
    • press Shift + Tab to switch between the mesh editors and the UV editors.

    General Controls:

    Key Action
    Tab Switch between Lattice and Mesh edit modes
    Shift+Tab Switch between UV and Mesh edit modes
    H Toggle help overlay
    Shift+H Change help overlay color
    F Save current warp

    Lattice Select Mode:

    Key Action
    Select lattice point
    Shift + Add to selection
    A Select all lattice points
    G Grab/move selected points (click to confirm)
    Up Down Left Right Nudge selected points
    I Reset selected vertices to original position
    Z Undo
    Shift+Z Redo

    Mesh Select Mode:

    Key Action
    Select mesh vertex
    Shift + Add to selection
    A Select all vertices
    X Delete selected vertices (can be undone)
    G Grab/move selected vertices (click to confirm)
    S Scale selected vertices (click to confirm)
    R Rotate selected vertices (click to confirm)
    Up Down Left Right Nudge selected vertices
    I Reset selected vertices to original position
    Q Set cursor position
    P Store current selection (then press 0-9)
    0 - 9 Recall stored selection
    Z Undo
    Shift+Z Redo

    Save Your Work

    Lattice modifications are not automatically saved with the patch. Save the lattice file regularly by pressing F while editing.

    Connecting to ViewPort

    Rendering MeshWarp Output

    MeshWarp can be directly rendered into a ViewPort:

    1. Create a MeshWarp node and configure your warp
    2. In ViewPort, set mesh to warp
    3. Link the ViewPort's warp reference to this MeshWarp node
    4. The warped mesh will be rendered in the ViewPort's designated Window slice

    This is ideal for curved projection screens, domes, or irregular architectural surfaces.

    Export and Reuse

    Exporting Final Meshes

    After editing, you can export the warped mesh:

    • Click export to save the final deformed mesh as a Wavefront OBJ file
    • The file is saved to ~/_export/ with the node's name
    • Exported meshes can be used in other applications or reimported as base meshes

    MeshWarp vs CornerPin

    Choosing the Right Tool

    Feature MeshWarp CornerPin
    Control points Full lattice grid 4 corners only
    Surface types Curved, irregular Flat, rectangular
    Complexity Higher Lower
    Setup time More involved Quick
    File format SPARCK lattice + OBJ Internal

    Use CornerPin for simple rectangular surfaces. Use MeshWarp for curved screens, domes, or surfaces requiring smooth geometric correction.


    Important Notes

    Supported File Format

    • Wavefront OBJ (.obj) is the only supported mesh format
    • The mesh should have all its vertices on the XY plane.
    • The origin should be at (0,0,0)
    • The individual vertices should be located within a unit square (-1 to 1 in X and Y)
    • Place mesh files in ~/_assets/_models/_warps/ or drag-and-drop to auto-copy
    • Enable fileWatch to automatically reload when the source file changes

    File Locations

    ~/_assets/_models/_warps/     # Source warp meshes (.obj)
    ~/_assets/_warps/             # location for warp meshes enhanced with lattice data
    ~/_export/                    # Exported warped meshes
    


    Need help or want to suggest improvements?

    Report an issue Improve the Docs

    Last updated: 2025-12-01 | Edit this page on GitHub