Page 1 of 3 123 LastLast
Results 1 to 15 of 34

Thread: UV distortion on subdiv surfaces (again and again...)

  1. #1

    UV distortion on subdiv surfaces (again and again...)

    On the old message board there was a thread/feature request to fix the texture distortion that happens with UVs on subdivided objects. IIRC Arnie Cachelin explained some of the technical problems involved, at which point I stopped arguing for it

    Anyway, I just came across this Maya workaround, it appears to address the texture distortion issue with "smoothed" meshes (not exactly subdiv as we know it but a similar "metaform" effect). So I'm wondering; would applying the metaform algorithm to the 2D UVs (as though it were a flat 3D object) fix the distortion problem, as it appears to here;

    UV smoothing?

    I hope this doesn't come across as a grandmother/egg sucking tutorial to the Newtek guys, it's probably not a simple as this. Just food for thought...


    Regards,
    Terry

  2. #2
    Newbie Member Tom Speed's Avatar
    Join Date
    Feb 2003
    Location
    Liverpool, England
    Posts
    86

    Talking

    Hi,

    I've been messin with some scripting and I'm glad I did, I've accidentaly found a solution to a task I always wanted to automate somehow, so thanks for that! LOL

    Anyway, back to the Smoothing stuff, try these 2 scripts. Unweld your mesh, make the UV map you want copied to a Morph the current map in the UV window, have the BASE MorphMap selected, run 'UV to MorphMap' and it copies the UV to a MorphMap.

    Mergepoints on the Mesh then you can use any of Modelers tools to adjsut the Mesh (NOT the UVs!) ...Drag, Magnet, Smooth

    When you've finished, keep your original UV map selected and Deselect the UVMorphMap! VERY important this as I'm not sure how to get access to the Base meshes Point Positions while you have a MorphMap selected (yet).

    So make sure you have the (base) Morph selected and run MorphMap to UV. It will copy the shape back to the original UV map, you might want to Mergepoints again after this step.

    The cool stuff I found by accident? Well, when you Mergepoints on the Morphed Mesh, you end up with a nicely welded Mesh with NO discontinuous UVs! This is something I was after for my game Mesh exporter!

    Oh, currently it ignores selections. I'll see if I can make it better later, dinner is calling me

    Have fun
    Tom
    Attached Files Attached Files
    Last edited by Tom Speed; 03-30-2003 at 08:45 AM.

  3. #3
    I Just wanted to be the first to Thank you for this publicly. In case any was interesting any any ideas try this. Copy the uvmorphmap and make a few different projections and then use the airbrush to paint them into one map to blend between differnt typs of progections.
    Great work Thanks

  4. #4
    Newbie Member Tom Speed's Avatar
    Join Date
    Feb 2003
    Location
    Liverpool, England
    Posts
    86

    Wink

    Hey Cas,

    I can't believe the simplicity of it, and I'm suprised it wasn't done sooner! Cheers to Terry for the post b.t.w, this could have gone missed for a while if he hadn't brought this up.

    Here's a slightly updated version, I'm using Absolute Morph Map now so you don't have to deselect the Morph Map before running the 'MorphMap to UV' script. The second script just mentioned also takes selections into account now, though I don't know if that's useful?

    I've also made it create the Morph centred on the X axis, so you can use Symmetry mode, if you'd prefer to have it on 0,0 like in the UV window then edit the 2 scripts and take out the 2 references in each to '- .5' and '+ .5'

    i.e:

    vec.x=v[1] - .5; becomes vec.x=v[1];

    To recap:

    1: Unweld your Mesh
    2: Select the UV map you want to be copied to a MorphMap
    3: Run 'UV to MorphMap'
    4: Mergepoints

    Edit your Morphed UV Mesh, DON'T Edit in UV window

    At any time while you have your original UV Map selected, run 'MorphMap to UV' to copy the Morphed Mesh shape back to the UV Map .

    The script doesn't delete the 'UVMorphMap' Morph so you can do that when you're finished.

    Any ideas for improvement?

    Cya!
    Tom
    Attached Files Attached Files

  5. #5
    Great script Tom, it opens up all of Modelers tools for UV editing. I did a quick test with a frozen subpatched head to see if the Maya technique holds up;

    Normal freeze, distortion typical of UV on subdiv:


    Freeze including UV morph, morph transfered back to UVs (in effect applying subdiv algorithm to the UV map):


    Just a quick test, but interesting (the lump on top of the second head is a result of unmerged points, fixable but I couldn't be a*sed)...

    This script won't completely fix the distortion on an unfrozen subpatch object (because there's no way to access the extra verts that subdivs create without freezing), but it will decrease distortion, and seems to prove that if the subdiv UVs are "smoothed" the distortion problem gets fixed (or at least drastically reduced). I wonder if it holds up with a heavily edited or segmented UV map...

    Kudos Tom.

    Regards,
    Terry
    Last edited by TerryFord; 03-30-2003 at 12:24 PM.

  6. #6
    hmmmm....
    very cool

    Tom include a little doc on zip file if possible.

    thanks Tom I will try it.
    V a l t e r . S i l v e i r a
    3D Artist - Editor
    http://valtersilveira3d.blogspot.com

  7. #7
    Newbie Member
    Join Date
    Feb 2003
    Location
    Sweden
    Posts
    48
    Darn! Hey Admin! Can┤t download the script from here! I┤m logged in and everything. On a Mac with Explorer.

    Johan Gr÷nwall

  8. #8
    Newbie Member Tom Speed's Avatar
    Join Date
    Feb 2003
    Location
    Liverpool, England
    Posts
    86

    Post

    Hi,

    The lump on the head is because of subdividing while you have the morphmap active. Because the 'seem' is unwelded in this state, it doesn't receive any smoothing during the subdivision process, so a little tweaking will be needed afterwards.

    I noticed something else, while you have an Absolute morphmap (pretty sure it applies only to Absolute morphmaps which I use in the script), regardless if you have the base morph selected or not, when you mergepoints it will not merge any points on the seems, similar to the above side effect. So remove the morphmap before you do the final mergepoints.

    Someone has requested a version of the script that will work on LScript 2.5 because of Mac 7.5b update problems, I'll sort something out for you guys.

    Cya later
    Tom

  9. #9
    Addicted since vers. 5.5 JDaniel's Avatar
    Join Date
    Feb 2003
    Location
    Tampa Bay - Orlando
    Posts
    296
    (because there's no way to access the extra verts that subdivs create without freezing),
    Terry, that is key. So here is the only true LW distortion free/uvSubd tutorial. I'm simply Frnt. Projecting my maps in Layout and Baking to UVmap. Just like a 3d paint program. (Aura 3d!!!)


    http://www.jackydaniel.com/pages/Tutorial.htm

  10. #10
    Newbie Member Raul3d's Avatar
    Join Date
    Feb 2003
    Location
    Madrid, Spain
    Posts
    2
    hello everyone, how do I can get this uv map?. I only can get this ugly uv map


    regards
    See you in hell ... MWUAHAHAHAHAHAHA ... HA

  11. #11
    Here's the old fashioned way;

    For safety creat a temporary morph
    Select Mode - Action center: selection
    Select polys you want a cylindrical UV map for
    Rotate 90 degrees around Y axis ("e" shortcut in top viewport)
    Create new UV
    Rotate back - 90 degrees ("r" shortcut) or delete the temporary morph
    Merge points (when you've finished moving the UVs around)

    Or you could get this in-development UV guide tool;
    UV Guide II




    Regards,
    Terry

  12. #12
    Newbie Member
    Join Date
    Feb 2003
    Location
    Sweden
    Posts
    48

    Talking

    The LW community is simply frikkin awesome! What fantastic talents you find out there! I wonder if it is the same with other 3d communitys. Doubt it.

    Johan Gr÷nwall

  13. #13
    Newbie Member Tom Speed's Avatar
    Join Date
    Feb 2003
    Location
    Liverpool, England
    Posts
    86

    Wink

    Hi,

    Here's 7.5 versions of the scripts for the Mac guys, you'll have to select the UV map each time from a requester. Let me know if there's anything wrong with them.


    Cya!
    Tom

    p.s Terry, didn't realise you're the author of SpinTris, there's not many plugs/scripts I'll give a hotkey to, but SpinTris sure gets one!
    Attached Files Attached Files

  14. #14
    Newbie Member Raul3d's Avatar
    Join Date
    Feb 2003
    Location
    Madrid, Spain
    Posts
    2
    Thanks terry for your reply and your help. This plugin is really awesome ,thaks Lynx3d for share.

    Regards
    See you in hell ... MWUAHAHAHAHAHAHA ... HA

  15. #15
    Newbie Member
    Join Date
    Feb 2003
    Location
    Sweden
    Posts
    48
    Admiiiin...! There is some sort of d/l problem on the Mac. All I get is a file called "attachment.php" when I try to d/l the script. I┤m on Explorer 5.1, but this is the same for Explorer 4.5, Netscape, 4 and 6.01. Yeah, got┤em all.

    Johan Gr÷nwall

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •