-
Notifications
You must be signed in to change notification settings - Fork 124
Description
I want to implement a mesh warp effect in iOS using Swift, similar to how the Ink AI app wraps a tattoo image on a 3D object like a bottle.
Requirements:
When the user drags the image (UIImageView) using a pan gesture, the image should curve or bend according to the underlying object’s shape.
The warped image should conform to the visible portion of the object (e.g., sides of the bottle) and adjust dynamically as the image is moved.
Effect should give the illusion that the image is "wrapped" on a 3D surface.
Questions:
What is this effect officially called in iOS / graphics programming? Is it mesh warp, displacement map, or something else?
How can this be implemented efficiently in Swift? Is this done using CALayer, Metal, CoreImage, or a custom mesh approach?
From your description, this is commonly called “mesh warping”, “image warping”, or “texture mapping on a 3D surface” in graphics programming. In iOS, people usually implement this with:
CoreImage filters like CIBumpDistortion or custom CIWarpKernel.
Metal / GPU shaders for real-time mesh deformation.
CAShapeLayer / CATransform3D for simple 3D-like transforms.