Home Technical Talk

Maya Overlap UV Islands Script?

polycounter lvl 5
Offline / Send Message
dproeder polycounter lvl 5
Was wondering if there is native support in Maya to pack an object's uv islands so that they all overlap and sit atop one another?

Replies

  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    http://www.creativecrash.com/maya/downloads/scripts-plugins/texturing/c/nightshade-uv-editor

    http://www.creativecrash.com/maya/downloads/scripts-plugins/texturing/c/uvdeluxe

    both of those scripts can do that, and also imporve the uv editor in other ways too.

    as far as native best you can do is setting a pivot and snapping
  • dproeder
    Options
    Offline / Send Message
    dproeder polycounter lvl 5
    Thanks pb. That stack shell function looks like what I was looking for!
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    dproeder wrote: »
    Thanks pb. That stack shell function looks like what I was looking for!

    ya i use it all the time, when i stack shells i tend to offset all but 1 of them 1 unit out of the 0 to 1 space, this way it dosnt try to bake the same part of the texture map multiple times.
  • dproeder
    Options
    Offline / Send Message
    dproeder polycounter lvl 5
    While I have your attention, do you know of any good tools that selects similar objects? Maybe selecting objects with the same number of faces. I found one such script, but it took a while to compute in large scenes, and it wasn't reliable.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    hmm not off hand, i could create something that did this easily enough though how would you want it to figure out of a mesh is similar? and Do you mean similar, or the same?

    also i forget there is a native way to quickly stack shells too, if they are all from objects with the same topology.

    the transfer attributes tool can be set to topology and used to transfer the UV's of one object to other objects.
  • dproeder
    Options
    Offline / Send Message
    dproeder polycounter lvl 5
    Well Im just dealing with assets created in Navisworks (if you don't know this software, then you are probably a happier human than I). The scenes I am getting are disorganized and messy. I've been importing objects into maya so I can work with them. If I had a tool that could select all the objects in a scene with
    1. same number of faces/edges
    2. vertex order
    This script could help organize objects that are the similar (by similar I mean same shape and topology, but maybe different scale and orientation).



    Also teach me how to fish. Where is a great place to start learning the finer points of mel? I don't want to keep asking you to do my work for me! I think this is the 3rd or 4th time you have helped me with a scripting problem over the years.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    ya sounds easy, are things actually separate objects, in the scene, or is it one object and it would need to be splitting things up but continuous meshes, and finding ones similar to each other?

    also what do you want done with them, just select all similar meshes?, or rename or group them?

    and as far as learning python or mel i already had programming experience comeing to maya so i just picked up python and used this as reference.


    The concept of what you want is simple. Grab the vert count of the currently selected object, than iterate through all meshes but the currently selected one in scene and grab there vert counts and compare against our previous vert count. if they the same, add to a list to select later, if not do nothing and move to next iteration.
  • dproeder
    Options
    Offline / Send Message
    dproeder polycounter lvl 5
    Its easy enough to separate the imports as individual objects. The ultimate goal is to organize them in the outliner. So I guess making groups for all like objects in the scene would be the best end result. Naming and organization can be done afterwards.

    Scenes I am working with can have upwards to 4,000 indiviual objects at times. You can imagine why a tool I'm describing can be a major boon.

    Thanks again for another great link. I started my college life as a programmer, but gradually migrated to visuals on into my post grad years. I've made a few scripts, but I felt like a cave man repairing a space rocket with duct tape while doing so. I just need some formal training.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    give this a try, if it isnt fast enough i can remake it using the maya api which is a hell of a lot faster than it's scripting engine.

    drop this in your scripts folder
    https://dl.dropboxusercontent.com/u/2360554/mayaScripts/getSimilar.py

    than run it like this in a python console or put this in a shelf button.
    import getSimilar as pbgs
    pbgs.getSimilar()
    

    i commented the shit out of the code explain how it all works since you mentioned you want to learn how to script.

    this only checks face counts, but it is easy to put in other checks too.
  • dproeder
    Options
    Offline / Send Message
    dproeder polycounter lvl 5
    works like a charm. Thanks PB
Sign In or Register to comment.