Nodes/comfyui_bmad_nodes/RemapToOuterCylinder
ComfyUI Node Runs on cloud

RemapToOuterCylinder

Wrap an image around the outside of a cylinder — label-on-a-bottle, done in two knobs

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
RemapToOuterCylinder
    • REMAP
    fov90
    swap_xyfalse

    The outer-cylinder projection is the one that looks like a product shot: a flat image wrapped around the outside of a cylinder, so the middle of the image bulges toward you and the edges curve away - exactly how a label reads on a bottle or a poster wraps around a pillar. It's the sibling of RemapToInnerCylinder (which puts you inside the cylinder looking out), and it's arguably the more immediately useful of the two because "wrap something around a round object" is a design task people actually have.

    Family rules apply: it's a REMAP generator, so the output feeds the Remap node, which does the actual distorting. RemapToOuterCylinder → Remap → image.

    How it works

    Same projection machinery as the inner variant, just viewed from outside. The image is projected onto the exterior of a cylinder and the field of view (fov) sets how much of the wrap you see. Where the inner version bows the edges inward (the wall recedes), the outer version bulges the center outward and compresses the edges as they curve away from the viewer. That center-out bulge is the whole product-shot look.

    The fov input runs 1–179 degrees (default 90). Low fov = a narrow, mild wrap where you barely see the curve; high fov = an aggressive sweep where the edges wrap visibly around the side. swap_xy (BOOLEAN) rotates the projection so the image wraps around a vertical axis instead of a horizontal one - turn it on and your horizontal label-wrap becomes a vertical pillar-wrap.

    The inputs

    • fov (1–179, default 90).
    • swap_xy (BOOLEAN, default false).

    Output: REMAP.

    Where you'd reach for it

    The label-wrap mockup is the star use: render a design, wrap it to the outer cylinder, composite it over a bottle photo, and you've got a convincing product shot without a 3D renderer. It's also the go-to for poster-on-a-pillar, sticker-on-a-cylinder, and any "flat content should sit on something round" job. Pair it with the pack's mask nodes (composite the wrapped result through a mask) for a finished look.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/bmad4ever/comfyui_bmad_nodes
    

    restart, or search comfyui_bmad_nodes in ComfyUI Manager. OpenCV covers the mechanics; no model downloads.

    The honest caveat

    The edges are where this effect shows its seams. Because the cylinder curves away, the outer pixels of the image get heavily compressed and can look smeared at high fov - keep fov around 90–120 for believable wraps and crop before the edges turn to mush. And since compression is involved, remember the Remap node's interpolation setting does real work here: INTER_AREA (its default) handles the compressed edges best. One more family habit: tweak the generator, run, and then judge - the preview only updates on execution.

    It won't give you real 3D lighting or shadow on the bottle - that's compositing work, not this node's job. What it does, it does fast and reliably: flat content convincingly curved around something round.

    CategoryBmad/CV/Transform

    Inputs (2)

    NameTypeDefaultDescription
    fovINT901–179
    swap_xyBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    REMAPREMAP