DEV Community

Choco111
Choco111

Posted on

Designing a Testable Text-to-Mesh Workflow


Teams often describe an AI 3D feature as “prompt in, model out.” That sentence hides the contracts a frontend and pipeline must actually test: input mode, fidelity state, export format, and user feedback.

Model the visible state machine

At the interface level, a request can move through idle, input-ready, generating, preview-ready, and export-ready states. Text and image tabs are alternate inputs, not simultaneous guarantees. A disabled fidelity option should be represented as unavailable, not silently accepted.

type GenerationState =
  | { kind: 'idle' }
  | { kind: 'queued'; source: 'text' | 'image'; fidelity: 'fast' | 'standard' | 'pro' | 'ultra' }
  | { kind: 'preview'; assetUrl: string; format: 'glb' }
  | { kind: 'error'; message: string };
Enter fullscreen mode Exit fullscreen mode

This is a design proposal inferred from a public interface, not a claim about private implementation. The public 3DMaker page visibly separates text and image input, offers fidelity choices, and exposes a model-generation action.

Define an input contract

For text, test empty input, whitespace, maximum-length input, and an example prompt. For images, test an unreadable file, a very wide subject, and a photo with occlusion. The UI should preserve the selected source and make a retry understandable.

Test fidelity transitions

Changing Fast to Standard should update the request summary without changing the source description. If Pro or Ultra is unavailable, the control should explain that boundary. A useful test records the selected value before generation and verifies that the preview metadata reflects it after completion.

Verify the export boundary

The page describes GLB output and lists Unity, Unreal, model-viewer, Blender, Three.js, and Babylon.js as downstream destinations. An illustrative Playwright check might assert that a completed preview exposes a download affordance and a .glb filename; selectors and counts must be discovered in the real app before production automation.

Add human review gates

Automation cannot judge whether a silhouette matches the brief, whether a texture is acceptable at the camera distance, or whether a commercial asset has the required rights. Keep a review checklist beside the generated file: scale, orientation, materials, hidden faces, poly budget, naming, and license context.

The 3DMaker is therefore best treated as a stateful workflow whose contracts can be tested, observed, and improved.

Top comments (0)