Skip to content

Improved clipping retry - #41

Merged
LengthenedGradient merged 6 commits into
mainfrom
improved-clipping-retry
Aug 16, 2026
Merged

Improved clipping retry#41
LengthenedGradient merged 6 commits into
mainfrom
improved-clipping-retry

Conversation

@LengthenedGradient

@LengthenedGradient LengthenedGradient commented Aug 16, 2026

Copy link
Copy Markdown
Member

Adds support for ImprovedClipping by cutting the physics meshes of primitives via the existing bisect function.

This was done by adding additional face data on the server, to create a triangle physics mesh.

Sealed clips are only supported for the single convex shapes (e.g. cube) and are not supported for multi convex shapes (e.g. tubes). You can still clip them and the physics will be clipped, but the cut will not be visually sealed.

More explicitly:

  • construct.get/generate accept an optional clips list, threaded down to getResult, which bisects the built mesh against them and rebuilds convexes for physics.
  • Added simpleton:ApplyClips, which cuts a simpleton against a list of clip planes, capping per each clip's Seal flag.
  • Added simpleton:PushConvex/PushBoxConvex, which is used to store convex data on shapes, for use with bisect.
  • Added an optional argument to PushPrefab to build a matching convex simpleton, for the compositional shapes such as rail_slider, airfoil, etc.
  • Note that airfoil cannot be clipped because it is just an arbitrary point cloud, not a set of convexes.

After removing clips from a primitive, client side traces have issues intersecting the rebuilt mesh. Inspired by fixes in the think hook and from Improved Clipping, this seems to work.
When clipping multiconvex props, some convexes wouldn't touch the clipping plane at all, yet were removed.

This should fix that.
@LengthenedGradient
LengthenedGradient merged commit 094d110 into main Aug 16, 2026
2 checks passed
@LengthenedGradient
LengthenedGradient deleted the improved-clipping-retry branch August 21, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants