Home Technical Talk

maya 8.5: flatten out an object?

mod
Offline / Send Message
rooster mod
im looking for a quickish way to flatten an object in the same way that roadkill or relax flattens the uvs, ie tries to keep the same shape ratio for polygons as the 3d model in 2d
any ideas? cheers!

Replies

  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    use unfold with default settings and rescale 0.1 and then press layout button. U need to be sure if you make your seams first. You also have an option of auto uvwrap in the uv menu.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    ah sorry to be clear I want to do it to the object not the UVs
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    TBH it'd be quite easy to do an unfold on the UVs, then get the UVs position and translate it into world space for each vertex. In fact I've done something similar before. Not sure if it's something I can share though.
  • Toast
    Options
    Offline / Send Message
    Toast polycounter lvl 11
    Have you tried average verts?

    Select verts > Shift + Right Click > Average Vertices

    Sculpt Geometry Brush?

    Under sculpt parameters you can change smooth strength, scale falloff.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    {
        string $sel[] = `ls -sl -o`;
        string $obj = $sel[ 0 ];
        int $numUVs[] = `polyEvaluate -uv $obj`;
        for ( $i = 0; $i < $numUVs[0]; $i++ ) {
            float $uvPos[] = `polyEditUV -q ( $obj + ".map[" + $i + "]" )`;
            string $geoVert[] = `polyListComponentConversion -fuv -tv ( $obj + ".map[" + $i + "]" )`;
            xform -a -ws -t $uvPos[0] $uvPos[1] 0 $geoVert;
        }
    }
    


    That code should move all the geometric verts of your object to their UV locations in world space. Will probably result in a tiny mesh (since UVs are in the 0-1 range usually), but you can scale it up afterwards.
    Also this will probably screw up if you have more UVs than geometric verts.

    So I guess ideally you'd select all the faces of your object, do a Planar map from whichever angle is most appropriate, then do an Unfold (or Map UV Border and Relax), then run this script with your object selected.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    Sha-Wing!

    cheers man :)

    toast: aye i tried mayas relax features but they just keep squishing the polys together until the model eventually becomes a thin line- they don't really keep the polygon shapes like roadkill
  • skyasay
    Options
    Offline / Send Message
    I've been trying to figure this out for quit some time without success. The trick for me being that rebuilding the surface in the same shape doesn't keep the same point order which causes blend shape issues. I appreciate you sharing and saving me time!
Sign In or Register to comment.