C
creation.devRoblox Hub

How Do You Use Solid Modeling on MeshParts in Roblox?

Roblox's GeometryService now supports Union, Intersect, and Subtract operations on MeshParts, plus new Fragment and Sweep APIs for advanced 3D modeling directly in Studio.

Based on Roblox DevForum

[Studio Beta] Solid Modeling on Meshes & new Fragment and Sweep APIs

announcements

View the original post →
By creation.dev

Roblox Studio's GeometryService has received a major upgrade that fundamentally changes how developers create complex 3D geometry. According to a recent announcement on the Roblox Developer Forum, solid modeling operations (Union, Intersect, Subtract) now work with MeshParts, not just basic parts. This update includes two completely new APIs—Fragment and Sweep—that enable advanced modeling techniques previously impossible without external 3D software.

This matters because MeshParts are the foundation of detailed Roblox environments, from realistic terrain features to custom weapons and architectural elements. Before this update, combining or modifying MeshParts required exporting to Blender, performing operations, and re-importing—a workflow that broke iteration speed. Now you can perform these operations directly in Studio, dramatically accelerating the creation of complex games.

What Are the New Solid Modeling Capabilities for MeshParts?

GeometryService can now perform Union, Intersect, and Subtract operations on MeshPart objects, treating them the same way it handles basic parts like wedges or spheres.

Previously, if you wanted to create a rock formation with carved-out caves or a weapon with intricate cutouts, you'd need to model it entirely in external 3D software. The Studio-based solid modeling tools only worked with Roblox's primitive parts. The new update removes this limitation completely.

You can now take imported MeshParts—say, a tree trunk and a spherical boulder—and use UnionAsync to merge them into a single object with optimized collision geometry. The Subtract operation lets you carve doorways into building meshes or create damage holes in destructible objects. Intersect operations enable you to extract the overlapping volume between two complex shapes, useful for procedural generation systems.

The operations preserve UV mapping and vertex colors where possible, though complex unions may require UV adjustment. This is a massive workflow improvement for developers building detailed environments without leaving Studio.

What Is the Fragment API and How Does It Work?

The Fragment API splits a MeshPart or UnionOperation into multiple pieces based on a cutting plane, enabling realistic destruction effects and procedural slicing mechanics.

As discussed in the DevForum community, developers have long wanted true mesh fragmentation for destruction systems—think buildings that realistically collapse into pieces or fruit that slices apart. The new FragmentAsync method solves this by taking a part and a plane definition, then returning an array of new MeshPart pieces.

The API accepts a CFrame parameter that defines the cutting plane's position and orientation. When you call FragmentAsync on a barrel mesh with a horizontal plane through its middle, you get two separate barrel halves as distinct MeshParts. Each fragment maintains proper collision geometry and can be further manipulated—anchored, welded, or destroyed.

This unlocks gameplay mechanics previously requiring complex particle effects or pre-modeled destruction states. A sword-slicing game can now actually cut objects in real-time based on blade position. Destruction-based physics games can fragment buildings on impact rather than swapping to pre-broken models.

How Does the Sweep API Enable Advanced Shape Generation?

The Sweep API extrudes a 2D profile along a 3D path to create complex curved geometry like pipes, railings, and organic shapes—all procedurally generated in Luau.

Recent reports indicate that SweepAsync is one of the most technically advanced additions to GeometryService. It takes a profile shape (defined as a 2D array of points) and a path (a 3D curve defined by control points), then generates a MeshPart by extruding the profile along the path.

This is transformative for procedural generation systems. Want to create curved pipes that follow terrain contours? Define a path with Vector3 waypoints and a circular profile—SweepAsync generates the pipe mesh. Need organic tentacles or twisted vines? Create a spline path and irregular profile shape, and the API handles the complex geometry calculation.

Practical applications include:

  • Procedural road generation that follows terrain height maps
  • Custom railing systems that adapt to staircase angles
  • Organic creature appendages that animate along bone paths
  • Cable and rope systems with realistic physics-driven curves
  • Architectural moldings and trim that conform to building shapes

The API supports twist parameters, scale variation along the path, and cap options for open vs. closed shapes. This eliminates the need for dozens of pre-modeled variations of curved objects.

What Are the Performance Implications of These New APIs?

All three new operations (solid modeling on meshes, Fragment, Sweep) are asynchronous and computationally expensive—use them during game initialization or infrequent events, not in high-frequency loops.

The DevForum discussion emphasizes that these are Studio-focused tools primarily intended for pre-processing geometry. While you can call them during runtime, operations like UnionAsync on complex meshes may take hundreds of milliseconds. This makes them unsuitable for frame-by-frame operations or high-frequency player interactions.

Best practice is to use these APIs for level generation at map load time or during loading screens. For destruction systems, pre-fragment critical objects during game initialization and store the pieces in ReplicatedStorage, then clone and activate them on demand. For procedural generation, compute geometry during server startup rather than spawning.

The operations yield the current thread while computing, preventing server freeze but potentially causing race conditions if not managed properly. Wrap calls in pcall() to handle edge cases where geometry operations fail due to invalid inputs.

How Do These Updates Compare to External 3D Modeling Workflows?

Studio-based solid modeling now handles 70-80% of operations that previously required Blender or Maya, but complex UV-dependent models and high-poly sculpting still benefit from external tools.

The updated GeometryService dramatically reduces the need to round-trip between Studio and external 3D applications for iterative modeling. You can now prototype complex environments, test destruction systems, and generate procedural content entirely in Luau without export/import cycles.

However, external tools still excel at organic modeling with subdivision surfaces, precise UV unwrapping for complex textures, and high-polygon sculpting. If you're creating hero assets like detailed character models or cinematic set pieces, Blender remains the better choice. The Studio APIs shine for gameplay-driven geometry, procedural systems, and rapid iteration.

This shift mirrors the broader industry trend toward node-based procedural workflows. Tools like Houdini have long offered similar capabilities—Roblox is bringing that power to its Luau scripting environment, making advanced geometry accessible to developers without specialized 3D modeling expertise.

What Limitations Should You Be Aware Of?

The Beta status means bugs exist, particularly with UV preservation on complex unions, collision geometry on intricate fragments, and edge cases with self-intersecting sweep paths.

A recent discussion on the Roblox Developer Forum highlighted several known issues developers have encountered. Union operations sometimes produce inverted normals on curved surfaces, requiring manual correction. Fragment operations can create slivers (tiny mesh pieces) when cutting near vertices, which may cause physics instability.

The Sweep API struggles with sharply curved paths that cause the profile to self-intersect. Twist parameters exceeding 360 degrees can produce unexpected geometry. The collision mesh generated for swept objects sometimes oversimplifies curves, affecting gameplay precision.

Current limitations include:

  • UV coordinates may stretch or distort on complex unions
  • Collision geometry is auto-generated and cannot be manually refined
  • Operations fail silently on degenerate geometry (zero-area faces)
  • Fragment count is capped at 50 pieces per operation
  • Sweep paths must be continuous curves (no disconnected segments)

Roblox is actively gathering feedback through the Beta program, so report issues you encounter. Many limitations will likely be addressed before the full release.

How Can AI Game Development Tools Leverage These APIs?

AI-powered game builders can now generate complex 3D environments through natural language prompts by combining these geometry APIs with LLM-driven code generation.

Platforms like creation.dev can integrate these new GeometryService features into their AI workflows. When a creator requests "a medieval castle with realistic stone archways," the AI can generate Luau code that uses Sweep to create curved arches, Union to combine wall segments, and Fragment to add realistic damage to battlement edges.

The combination of these APIs with AI code generation makes sophisticated geometry accessible to non-programmers. Instead of manually scripting complex union operations or calculating sweep paths, creators describe what they want, and the AI translates that into proper GeometryService calls with appropriate parameters.

This is particularly powerful for procedural content. An AI system could analyze a terrain heightmap and automatically generate road networks using Sweep, place destructible buildings with pre-fragmented sections, and create organic environmental details—all through API calls rather than manual asset creation. This is the future of rapid game prototyping.

What's the Best Way to Get Started with These New Features?

Enable the Beta in File > Beta Features > Solid Modeling on Meshes, then start with simple Union experiments on low-poly MeshParts before attempting complex Fragment or Sweep operations.

Begin by importing a simple MeshPart (like a cube or cylinder) and using UnionAsync to combine it with a basic part. Observe how collision geometry updates and UV coordinates behave. Once comfortable, experiment with SubtractAsync to carve shapes—this is less error-prone than complex unions.

For Fragment testing, start with a single plane cut through symmetrical objects like spheres or boxes. This helps you understand how the cutting plane orientation affects results before attempting irregular shapes. The DevForum thread includes code samples showing proper CFrame setup for cutting planes.

Sweep requires more geometric intuition—begin with straight extrusion paths (essentially 2D to 3D extrusion) before attempting curves. Define your profile as a table of Vector2 points moving counter-clockwise, then use a simple linear path defined by two Vector3 points. Gradually increase path complexity as you understand how profile orientation works.

Frequently Asked Questions

Can I use solid modeling on MeshParts in published games right now?

Yes, but it's currently in Beta, meaning bugs may exist and API behavior could change. Enable the Beta feature in Studio's settings to access the functionality. For production games, thoroughly test operations and include error handling for edge cases.

Will these operations work on the client side or server only?

The GeometryService APIs work on both client and server, but server-side usage is recommended for persistent geometry changes. Client-side operations are best for visual-only effects that don't need replication, as the geometry generation is computationally expensive and may cause stuttering on lower-end devices.

How many fragments can I create from a single MeshPart?

The current Beta caps fragment count at 50 pieces per FragmentAsync call. If your destruction system requires more pieces, perform multiple fragment operations on the resulting pieces. Keep in mind that each fragment is a separate part with collision geometry, so excessive fragmentation impacts physics performance.

Do these APIs replace the need for external 3D modeling software?

They reduce but don't eliminate the need for external tools. Studio-based solid modeling excels at gameplay-driven geometry, procedural content, and rapid iteration, but Blender or Maya remain superior for high-poly sculpting, complex UV unwrapping, and hero asset creation. Use the right tool for each task.

Can I use the Sweep API to create animated moving geometry?

No, Sweep generates static MeshParts based on a defined path at the time of the API call. For animated geometry like flowing tentacles or moving cables, generate the base shape with Sweep, then animate the resulting MeshPart using bones, attachments, or CFrame manipulation. The API itself doesn't support real-time path animation.

Explore More