Skip to content

Mesh Warp / Image Wrap on 2D Object (Bottle) like Ink AI #30

@PLKHawaR

Description

@PLKHawaR

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.

Image Image
ScreenRecording_12-01-2025.11-41-43_1.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions