webg

mmodeler User Guide

English 日本語

mmodeler

Overview

mmodeler is a Blender-inspired 3D modeling tool optimized for touch operation on smartphones and tablets. Built with WebGPU and JavaScript, it allows you to control the camera, edit meshes, add primitives, save/load files, and perform organic shaping using a dedicated Sculpt Mode—all through intuitive gesture-based controls.

How to Run

mmodeler runs with the code included in the project, and editing and saving stay in the local browser.

You can access the tool here: https://jun-mizutani.github.io/webg/samples/mmodeler.html

Mobile Control System

To address the “finger occlusion” problem (where your finger hides the area being edited), mmodeler utilizes a “Preview then Confirm” workflow.

Basic Gestures

The most important operation is the double-tap on geometry, which opens the Command Palette to execute most functions.

Special Button: Top-Left “↑” Button

The role of this button changes depending on the mode:


Command Palette

A 4x4 grid menu opened by double-tapping. In Object/Edit Mode, you can cycle through 4 pages using the Next button. In Sculpt Mode, it switches to a specialized single-page palette. The palette is automatically positioned based on the tap location to avoid hiding the target area.

Page 1: Basic Editing & Axis Constraints

Transform operations follow the flow: Select Tool $\rightarrow$ Drag to Preview $\rightarrow$ Tap to Confirm.

Page 1: Basic Editing & Axis Constraints

Button Description
G Move: Move selection. Drag to position, then tap to confirm.
E Extrude: Extrude selected faces/vertices. Drag to adjust distance, then tap to confirm.
Vert Vertex Select: Switch selection mode to vertices. Used for moving, deleting, or adding vertices.
X X-Axis: Constrain the next transform to the world X-axis. Press again to return to Free.
R Rotate: Rotate selection. Drag to set angle, then tap to confirm.
GG Edge Slide: Slide a vertex along an edge (only for midpoint vertices).
Face Face Select: Switch selection mode to faces. Used for extruding, deleting, or loop cutting.
Y Y-Axis: Constrain the next transform to the world Y-axis. Press again to return to Free.
S Scale: Scale selection. Drag to set multiplier, then tap to confirm.
Cut Loop Cut: Split quad faces. For single faces, pick direction via preview line, then tap to confirm.
Undo Undo: Revert the last operation (transform, primitive addition, etc.).
Z Z-Axis: Constrain the next transform to the world Z-axis. Press again to return to Free.
Next Switch to the next page.
Chain Chain Select: Select a sequence of vertices connected by quads based on the chosen direction.
Redo Redo: Re-apply an undone operation.
N Normal Axis: Constrain transform to the average normal of selected faces/vertices.

Page 2: Selection, View & Mode Switching

Page 2: Selection, Subdivision & View

Button Description
Catm Catmull-Clark: Smoothly subdivide the entire mesh for organic shapes.
A Select All: Select all objects (Object Mode) or all vertices/faces (Edit Mode).
Add Add Vertex/Face: Create a face (if 3-4 vertices selected), otherwise switch to Add Vertex tool.
Pr Projection: Toggle between Perspective and Orthographic views.
Subd Subdivide: Subdivide quad-only meshes to increase polygon density.
Inv Invert: Invert the current selection.
Del Delete: Delete selected objects, vertices, or faces.
Wire Wireframe: Toggle wireframe view. Allows selecting hidden vertices when ON.
M X-Mirror: Enable symmetric editing across the X=0 axis.
Half Select X<0: Select elements with a negative X coordinate.
Sclpt Sculpt Mode: Enter Sculpt Mode with the Draw brush (positive direction).
Smth Smooth Shading: Enable smooth shading (visual only; geometry is unchanged).
Lens Lens: Switch camera focal length presets.
Next Switch to the next page.
Loop Loop Select: Select a loop of vertices starting from a loop-cut midpoint.

Page 3: File & Scene Management

Page 3: File & Scene Management

Button Description
Load Load: Load a model file or saved ModelAsset JSON from local storage.
O Origin: Reset the active object’s origin to the world origin.
Cood Coordinates: Show/edit vertex coords (Edit Mode) or Brush settings (Sculpt Mode).
Info Info: Display object size (Bounding Box), vertex count, and face count.
Json Save JSON: Save the scene as a compressed .json.gz file.
Shot Screenshot: Save the current canvas as an image.
Glb Save GLB: Export the scene as a GLB file for other tools.
Join Join: Combine multiple selected objects into one.
Next Switch to the next page.
New New Scene: Clear the scene and start over.

Sculpt Mode Specialized Page

In Sculpt Mode, a specialized single-page palette replaces the standard one.

Sculpt Mode Specialized Page

Button Description
Draw Draw Brush: Move vertices along the normal. Inflates with Sclp+, deflates with Sclp-.
Brsh Brush Settings: Edit Radius, Strength, and Falloff Shape via overlay.
Pr Projection: Toggle between Perspective and Orthographic views.
Blur Blur Brush: Average vertices to smooth the surface.
M X-Mirror: Apply sculpt deformation symmetrically across the X=0 axis.
Wire Wireframe: Toggle wireframe display.
Grab Grab Brush: Pull vertices in the direction of cursor movement.
Sclp+ Positive: Set brush direction to positive (e.g., inflate).
Undo Undo: Revert the last stroke or operation.
Smth Smooth Shading: Enable smooth shading (visual only).
Pinch Pinch Brush: Squeeze vertices toward the cursor center.
Sclp- Negative: Set brush direction to negative (e.g., deflate).
Redo Redo: Re-apply an undone operation.
Edit Return to Edit Mode: Leave Sculpt Mode and go back to Edit Mode.

Page 4: Primitives

Page 4: Primitives and Segments


Detailed Feature Specifications

Transform Confirmation Flow

For G/R/S/E/GG operations:

  1. Drag: Real-time preview of the transformation. The preview is maintained even after releasing the finger.
  2. Adjust: Drag again to fine-tune the position from the previous point.
  3. Confirm: Short tap to finalize the transform and commit it to history.

Sculpt Mode Details

Box Selection

  1. Double-tap an empty area to start.
  2. Drag to define the area. Upon releasing, the box remains visible (“Awaiting Confirmation”).
  3. Adjust: Drag again to redraw the box if the area is incorrect.
  4. Confirm: Tap to select all elements within the box.

Loop Cut

Perform a Cut by selecting a quad face in Edit Mode.

Loop Selection

Select a chain of midpoint vertices created by a Loop Cut.

Chain Selection

Select a sequence of vertices connected by quad faces.

Subdivision

Selection & Display

View Dock

Quickly switch views using buttons at the edge of the screen:

Blender Integration

Exchange data via .json or .json.gz using the provided addon (blender_modelasset_io.py).