Auto UV Mapper

Let’s just face it. We all hate doing uv mapping. I mean no matter how hard working person you are, I think we can all generally agree that uv mapping is just a pain in a butt. It is something that you would rather avoid if possible. But then this horrible , time consuming job comes to us time to time, making us to take a deep breath and put your head phone on. And we all just get on with it, sometimes for a days.
Therefore I am not going to give some technical reasons for why I started working on this tool. It is simple. I don’t like doing uv mapping and I wanted it to go away as fast as possible.
Started by looking at some of the other commercial and non commercial uv mapping tools, I found that some method indeed does work better than the others. My method is rather a collection of what I have experienced and some clever buttons that auto executes series of commands that I would run as if I am doing them manually.
I do not intend to say I have invented them. But what you will see here is just a tool to help you in your work flow. All the core functions of the doing unwrapping and mapping is natively built in the Maya or some of them are even external.
If you have used Roadkill before , you won’t have too much problem understanding the work flow of this tool. The work flow is very similar to the Roadkill and some other commercial uv mapper. But I tried to integrate everything inside Maya so that you won’t have to export anything yourself. I have tried to make it so that all your usual Maya tools just work along side , no matter in what stage of uv mapping you are on.
Before you want to jump in and start experimenting with this tool, I suggest that you watch at least a introduction video and some initial set up process you need to run. I have not managed to create an installer yet (unfortunately) and although the tool does try to minimize the hassle by loading the plugins for you and setting up the hot keys so on, but you have to provide some informations to the tool in order for it to function 100%
Also, from now on I will refer this tool as Cas_autoUnfold tool. Named after great but not much loved unfold tool in Maya.
Befire I get started , I want to give the credit to where credit due.
This tool utilizes mainly internal Maya functions, but I did include ABF++ and LSCM unwrapping mode in the later stage of the project. I am calling these functions from the external program called Roadkill and it is based on the Blender unwrapping technique (which is based on the other acadamic paper that I won’t mention here)
I have thought of distributing Roadkill with this tool, but I chose not to, and if you want to use these two functions then you must get it from the official Roadkill site and install it first. You can find the link to the Roadkill site at the bottom of this page.
Known issues :
-
Undo for ABF and LSCM does not work properly. If you run undo, then it will leave a temp object and all your selected faces will be splitted into individual uvshells. So please do not undo ABF and LSCM tools. To fix this problem select the faces and uncheck save internal uvseam off then apply planar uv mapping. Delete temp object.
-
Memory issue – If you are using Win 32 Maya then there is possibility that it will run out of memory. This is due to Maya eatting lots of memory for its undo queue. So always save often.
-
Save Photoshop Path function does not work with 64bit version of Maya, except Maya 2011×64. This is due to python win32com limitation. Maya 2010×64 version coming soon.
How to run this scipt :
- Exit Maya if you are running it.
- Install the tool by running the setup file. Follow the instruction
- Start Maya
- Run mel command Cas_APU;
![[popup] [popup]](http://www.castorlee.com/wp-content/plugins/shout-stream/popup.png)

Posted on August 10th, 2009 at 2:19 pm
thanks a lot
its very easy to use in 3d pro.
Posted on August 22nd, 2009 at 7:00 pm
Thanks for releasing this and for the documentation – can’t wait to try it.
Posted on August 24th, 2009 at 12:02 am
…tried it, love it, thank you! I can only hope these will work with Maya 2010 when I’m ready to upgrade
Posted on October 14th, 2009 at 10:59 am
can anyone tell me where to put the following files?
Cas_IO.py
Cas_autoPlanarUnfold.py
I’m running maya 2008 32bit version which mel script files should I put into the maya scripts folder? just use this Cas_autoUnfold_Maya2008.mll?
or do I need to put
Cas_autoUnfold_Maya2008_x64.mll in there also?
Posted on October 16th, 2009 at 10:14 am
you should put all your .py python files to your usual maya script folder. That is normally found place like :
C:\Users\userName\Documents\maya\scripts for Vista
and plugin to
C:\Users\userName\Documents\maya\plug-ins
There is how to run script section is this posting so take a look at that first.
If everything is too complicated then have a look at this posting and try beta version of 1.0 It has a installer which will copy all the files correctly (hopefully) for you.
http://www.castorlee.com/maya-tools/cas-autounfold-uv-mapping-tool-version-1-0-testing-beta
Posted on October 29th, 2009 at 11:45 pm
This is Brilliant!!, I’m starting to use this tool for my project and seems to work great. Somebody should give u guys a nobel prize!
Thanks
Posted on October 30th, 2009 at 1:57 am
Awesome tool, it has definitely improved my workflow. ***** 5 Stars
haven’t come across any problems yet
Posted on November 19th, 2009 at 1:18 am
Hello
I would like to use the plug’in on maya x64 bit but the script doen’t to start.
In the script editor I can see this Error
Cas_APU();
# Traceback (most recent call last):
# File “C:\Program Files (x86)\Autodesk\maya2009\Python\lib\site-packages\maya\app\python.py”, line 17, in formatException
# result = stringBuffer.getvalue().decode(’utf8′)
# File “C:\Program Files (x86)\Autodesk\maya2009\bin\python25.zip\encodings\utf_8.py”, line 16, in decode
# UnicodeDecodeError: ‘utf8′ codec can’t decode bytes in position 99-101: invalid data
Can you Help me please
Thanks
Posted on November 19th, 2009 at 12:04 pm
Hi. Your error seems coming from Maya’s python lib. In that case there is nothing wrong with the plugin or scripts but probably due to your set up in Maya. You said you are running 64bit of Maya but your error suggests that your Maya is trying to load 32bit version of the python core. (directory (x86) suggests this) So obvisouly your Maya is running 64bit but configered to load 32bit version of python. Not sure how this has happened… but please check it first
Posted on November 22nd, 2009 at 8:37 pm
Hi can you do something with undo queue i mean after i use this tool it set undo number to 7 or so but imo it should set back value before I run tool or even better disable history when your tool is doing it’s job and enable it after it’s done
other than that it,s great, super usefull tool ! thx!
Posted on November 23rd, 2009 at 12:09 pm
Update!
I actually found solution to this and version 1.01 will do just what Destro asked. Undo options are now restored!
Yes that is something that I have a bit of issue with. Ofcourse , I had that idea from the beginning but apprently, there is no way to tell in Maya if window is closed (or being closed) from within the script itself. And there is no apprent “events” tiggers from Maya when a window UI closes. This is confirmed by Autodesk and sadly unless there is some other hacky clever way to do it , I am afraid that it is not that simple.
Posted on December 11th, 2009 at 1:29 am
will there be a maya 2010 version?
Posted on February 27th, 2010 at 1:31 am
Hi- I’m back, and I second the vote for a Maya 2010 version
Thanks
Posted on March 10th, 2010 at 1:52 pm
Hi,
I’ve installed your version Cas auto uv mapper 1.0.2 (maya plugin) from Creative Crash. I also downloaded and installed Roadkill 1.1 (release candidate 3) from their website.
With Maya 2009 x64 Windows Vista, it gives an error when I try to unwrap an object with LCSM or ABF through Cas: “#Warning: RoadKill1_1.exe not found. Please load it manually.”
RoadKill loads fine though when I run it from Maya.
Would you maybe have advice on what I’m doing wrong? Thanks a lot!
Posted on March 10th, 2010 at 3:11 pm
Unfortunately, tool does not detect where Roadkill is automatically, so you have to tell it where it is. What I mean by load it manually is : go to misc option in the auto uv tool, click on the button to bring up browser which you can load the roadkill.exe
It does not “load” road kill into memory or anything, it is just to know where to find it.
Let me know if you run into more problem.
I intend to make Maya 2010 version when I can get hold of its sdk.
Posted on May 14th, 2010 at 4:36 am
Hello, I’ve installed the latest version of the automapper and installed Roadkill as well, pointed Cas_APU to roadkill however everytime I use one of the Roadkill functions ABF or LSCM my computer tells me that Roadkill has crashed. I’m not sure why all of a sudden it isn’t working correctly as it was a while back.
I appreciate the help, thank you.
Posted on May 14th, 2010 at 9:30 am
Humm, that is odd. It could be a genuine crash from Roadkill. Does it crash every time and for any kind of mesh you are trying to unwrap? Or one particular model you are trying to do? Can you just try to launch Roadkill and see what happens? ( double click on the roadkill or run from command DOS line )
Posted on May 16th, 2010 at 2:47 am
Well I totally reinstalled Maya your plugin and everything, twice, and it still crashes. To answer your questions though:
Yes it crashes everytime
It seems to be just for that mesh
and the standalone Roadkill also works fine
Something in the mesh must be causing a problem, I’ve had problems before with meshes imported from other programs. I was so wrapped up in anger from it not working I didn’t think to check it on other meshes, so at least I know that it still works. Thank you very much for your help and this amazing plugin, it really has cut all the boring out of UV mapping, now I almost look forward to it!
Posted on June 8th, 2010 at 1:20 am
****Save Photoshop Path function does not work with 64bit version of Maya. This is due to python win32com limitation. function does not work with 64bit version of Maya.****
is there way around this? I really want this tool for the save photoshop path option.
Thanks.
Posted on June 8th, 2010 at 9:31 am
Ok well, you can try 32bit version of Maya
And I gues that is not an option as you would have already tried that if you could.
I am keeping my eyes on for the 64bit version of that Python module. It is really shame that it is not available yet. Sorry.. I dont know any other way yet to do it. But I am still looking, never give up!
Posted on November 9th, 2010 at 12:45 am
Is there any chance of a build for maya 2011?
I miss this tool. Such a time and sanity saver. Thanks for making it.
Posted on November 16th, 2010 at 7:33 pm
hi I’m maya 2010 and it gives me this error
// Error: Cannot find procedure “Cas_APU”.
Posted on December 6th, 2010 at 6:26 pm
Hello,while trying to unwrap an objecti got this error
# Warning: UVshell / Object need to clean up for ABF++ LSCM method.!
# # Warning: Some file exporting failed while trying to export edge/obj!
# # Warning: Finished with errors in 0.75 seconds. Please check the errors in the script editor #
and i don’t know what to do about it.
i hope you can help me.Thank you
Posted on December 6th, 2010 at 7:31 pm
in maya 2011
// Warning: No items found to cleanup. //
file exists , deleting C:/-ANGE WORKS/ballon/Cas_APU_tempObjFile.obj
object export success
file exists , deleting C:/-ANGE WORKS/ballon/Cas_APU_tempEdgeFile.edg
edge export success
# Error: WindowsError: 87 #
thanks
Posted on January 12th, 2011 at 10:26 am
Hi there!
I’ve just used your tool for a couple of minutes, and i love it right away! I’m using roadKill pro 1.03 atm, and this will be a great addition!
I don’t know if you solved it already, but i managed to get the path into photoshop cs5 64x. I’m on a 64x system, ofc, with maya 2010 64x. The only problem is that the path is way to big and aouside document borders. The document open in PS was a 512^2 texture.
Here’s a pic of how it looks.. http://i51.tinypic.com/2czq77.jpg
I hope it helps (:
Posted on January 20th, 2011 at 10:28 am
Hey, this tool looks pretty cool, doesn’t seem to work quite right for me many of the important tools give me various errors, I’m using Maya 2011, 32bit (on a 64bit system), Windows 7.
The ABF++ and LSCM functions give me :
// Warning: No items found to cleanup. //
// Error: $temp = $Cas_APU_tempInt; //
// Error: Cannot cast data of type int to string[]. //
# Error: RuntimeError: Error occurred during execution of MEL script
Cannot cast data of type int to string[]. #
The Photoshop bridge that gives me :
# Warning: No win32com python lib found. Please readme to find out how to install them #
(I’m pretty sure I installed it right though, should something show up in the maya plugs?)
Also a bit annoying that the script overwrites some shortcuts by default, removing some of my own, but not too troublesome (I’m just more of the mind that the user should decide, or be given the choice, but who are we to complain when people like you make great scripts like this for us
.
Posted on February 11th, 2011 at 4:57 pm
I’m getting WindowsError 2 with a fresh install of maya 2011. I have the same error as Xuan. Please help.
Posted on February 11th, 2011 at 5:02 pm
ok so i managed to fix issues for Bal and Valdemar, and i think i know what is issue with Ran and Xuan. Thanks for letting me know guys,.
Posted on March 9th, 2011 at 11:29 am
Hi again!
Dude, you gotta try to fix the undo error. It’s really been fucking with my stuff
And again, great tool1
Posted on March 9th, 2011 at 1:45 pm
Can you be more specific with “undo error” you are experiencing? I know there is some issue with undo like limited number of undo and maybe not being able to undo ABF++ functions like and so on but without more information, I can’t attempt to “fix” any issues.. But thanks for your compliment anyway!
Posted on March 13th, 2011 at 11:46 pm
im new 2 maya………but thanks 2 da admin 2 made my study more easy……
Posted on March 14th, 2011 at 12:54 am
uhmmmmmmmmmm………
admin plz help me im new 2 maya i cant get da way 2 launch da cas_autounfold…………commond…….as like Cas_APU; one 4 Cas_autoUV……..so plz give me da instru 2 launch………..
Posted on March 17th, 2011 at 2:26 pm
I have installed it but where are the instructions?
Posted on June 14th, 2011 at 8:24 pm
Amazing tool.
I had a hard time learning UV mapping and often thought that what I was doing was stupid.
Till I found this tool today which does all what I couldn’t imagine someone did not make it before.
A true gem for me.
Posted on June 14th, 2011 at 8:29 pm
Thanks Marcthur!
Posted on June 20th, 2011 at 8:14 pm
After some re-installs and stuff i’ve picked up your awesome plugin again. Like i said before, the undo error is really the only thing that bad with your tool..
It’s like this. You set your undo to infinite, work and undo like crazy always. Then you start UV and open you script, BANG the undo settings is turned to 7 undo ques. And that’s without you noticing. I always worked on a copy before, but that’s just stupid. I tend to try stuff back and forth when i UV and this is really limiting that..
If there’s anything i can help you with regarding logs and stuff, just email me!
Posted on June 21st, 2011 at 9:16 am
It is said in the documents that undo has been limited to 7 or (user defined to some degree) upon launching the tool. and then when you close the tool, it resets to whatever it was before.
The reason for this is that I found maya tends to cramp up memory usage when I use the tool. It is because I am sometimes calling lots of Maya’s native mel commands to do some of its operations.
So unlimited undo tends to cramp up memory quite a bit. And for computer with limited memory and running 32bit , it can sometimes crash Maya because of that.
I chose method of limiting undo queue rather than crashing Maya.
However, having said that, I am also not convinced that this is the best way to go about it and will be looking at it in the future. Also people are starting to use computers with higher ram and 64bit Maya so I think I may increase default undo queue to somewhere around 30 rather than 7.
For now , if you go to the misc option , there is slide bar you can use to increase undo queue a bit.
If this is still limiting for you then let me know, I will send you modified version with undo unlocked or make it really big and see how it works for you.
let me know.
cheers.
Posted on July 6th, 2011 at 12:26 am
Hi,
I’m using Maya 2010 x64, however in Cas_autoUnfold-1.13-Setup.zip it seems that a .mll for 2010 x64 was not included.
Would you be able to provide that plugin? Looking forward to trying it.
thanks,
DK
Posted on July 22nd, 2011 at 7:37 am
I use this tool for a last few months with Maya 2011 64bit version
and it cut my unwraping time by about 80%
I do mostly characters and this tool works awesome for unwraping organic models
I just want to thak you… so THANK YOU!!!!!
Posted on July 27th, 2011 at 1:31 am
hi i use may 2011×64 and the Photoshop bridge that gives me :
# Warning: No win32com python lib found. Please readme to find out how to install them #
Posted on August 25th, 2011 at 9:22 am
Thx!)
Posted on August 27th, 2011 at 5:16 am
Does this work on mac?
Posted on September 14th, 2011 at 10:27 pm
This is a brilliant plug-in and it works great. Thank you!
Posted on September 15th, 2011 at 12:40 am
I noticed you added 2012 to the current Maya versions. I uninstalled and re-installed the updated version. At first it didn’t work at all for 2011 or 2012. I had to modify the path for the Cas_autoUnfold_1.x_Module.txt ( added “\Cas_autoUnfold 1.x” to the end of the patih). Now, everything works great in 2011 but 2012 I keep getting the following error message:
// Warning: No items found to cleanup. //
file exists , deleting C:/Users/RB/Documents/maya/projects/default/Cas_APU_tempObjFile.obj
object export success
file exists , deleting C:/Users/RB/Documents/maya/projects/default/Cas_APU_tempEdgeFile.edg
edge export success
# Error: WindowsError: 87 #
I noticed someone else posted this issue with 2011.
Thanks for your help and an awesome plug-in.
RB
Posted on September 17th, 2011 at 1:15 pm
>It is said in the documents that undo has been limited to 7 or (user >defined to some degree) upon launching the tool. and then when >you close the tool, it resets to whatever it was before.
I would like to have the option of “infinite” (unlimited undo), it would be great, because constantly restart script is not very good
Thx
Posted on September 23rd, 2011 at 8:40 am
Hey i’m using maya 2012 64 bit, with the latest version of castor and, following the tutorial, i’ve got the head, have the ears and back of head off the basic head shape, but when i try to use the ABF ++ it comes up with # Error: WindowsError: 87, just wondering if there’s a solution for this
Thanks
Posted on September 23rd, 2011 at 9:01 am
I tried the 2011×64 version and it doesn’t seem to do anything – can’t locate the files after installing and Cas_APU; leaves me with ‘cannot find procedure’
Posted on September 23rd, 2011 at 11:13 am
I know some of you guys are having problems with windows error.
This part of the error is at how Maya python calls external application.
Problem is that the error themselves doesn’t give out any meaningful information as why and how and what has happened to cause this.
I suspect it could be combination of OS you are using and incompatible python versions you have got installed in your pc.
I have not fully had time to investigate this issue, but if I can discover anything , I will try to fix them. Otherwise I will try some other alternative ways to call external apps.
Martin, please contact me saehoon@gmail.com to begin trouble shoot your issue.
Posted on October 4th, 2011 at 11:19 pm
I wanna try this tool but encountered some problem. It has installed to the path it has detected.
Now Cas_APU; in Script Editor gets me to this: # Error: UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xcc in position 71: ordinal not in range(128) #
Posted on October 23rd, 2011 at 4:15 pm
Hi there, this is going to be a huge life saver if I can get working correctly. I’m also getting the same # Error: WindowsError: 87 as the person above. I’m running Windows 7/64 bit with Maya 2012. Any suggestions would be greatly appreciated.
Posted on November 9th, 2011 at 2:50 pm
Hi, thanks for the great Tool. So is there a way to get the “Send as Path” Function working in Maya 2012 64-bit (and Photoshop CS5 64-bit)? Did you ever try comtypes (http://sourceforge.net/projects/comtypes/) instead of win32com? I just startet Python programming, but perhaps you can get it running.
Best.
psApp = comtypes.client.CreateObject(’Photoshop.Application’)
comtypes.gen.Photoshop.PathPointInfo(Kind = 2, Anchor =[line[0],line[1]], LeftDirection =[line[0],line[1]], RightDirection =[line[0],line[1]])
win32com error:
—
# Error: -2147221005
# Traceback (most recent call last):
# File “”, line 1, in
# File “C:\Program Files\Cas_autoUnfold\scripts\Cas_APU_photoshopFunctions.py”, line 243, in Cas_APU_exportPhotoshopPath_cmd
# lineArray.append(win32com.client.Dispatch(”Photoshop.PathPointInfo”))
# File “C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\win32com\client\__init__.py”, line 95, in Dispatch
# dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
# File “C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\win32com\client\dynamic.py”, line 108, in _GetGoodDispatchAndUserName
# return (_GetGoodDispatch(IDispatch, clsctx), userName)
# File “C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\win32com\client\dynamic.py”, line 85, in _GetGoodDispatch
# IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
# com_error: (-2147221005, ‘Invalid class string’, None, None) #
Posted on November 10th, 2011 at 12:03 pm
Hi there,
fixed it, it was simpler than i thought, after adding the Version Number behind PathPointInfo (Photoshop.PathPointInfo.55) and SubPathInfo (Photoshop.SubPathInfo.55) everything runs as expected, no need for comtypes.
This tool helped me to find the ID (under All Objects):
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7007
Best regards.
Posted on November 16th, 2011 at 9:06 am
Hey,
I am in need of some help, I’ve been using this plug-in for some time now and it has worked great for Maya 2011 x64. However since I upgraded to 2012 x64 I have had errors with it. It still works however when I use the unfold functions it always creates a Roadkill out because it thinks it hasn’t worked properly.
Now when I load the plug-in I get #Error: RuntimeError: Invalid object or value:
That appears at the bottom in the command prompt box. When I go into the script editor it says this:
Cas_APU;
Maya version : 2012 x64
plugin name : Cas_APU_2012×64
Loading plugin : Cas_APU_2012×64
# Error: Unable to dynamically load : C:/Users/Jon/Documents/maya/Cas_autoUnfold/plug-ins/Cas_APU_2012×64.mll
The specified module could not be found.
#
# Error: The specified module could not be found.
#
# Error: The specified module could not be found.
(Cas_APU_2012×64) #
# Error: RuntimeError: Invalid object or value: #
Anyone able to help me with this please? I have checked the plug-in folder and the file it is trying to find is there so I dont understand why it can’t see it, as the 2011 x64 one is in there also and that works fine.
Thanks
Posted on December 1st, 2011 at 2:02 pm
buy kamagra soft
kamagra online
Posted on December 11th, 2011 at 1:55 pm
Your blog is really interesting to me and your topics are very relevant. I was browsing around and came across something you might find interesting. I was guilty of 3 of them with my sites. “99% of site owners are committing these five HUGE errors”. http://is.gd/HWKqeJ You will be suprised how simple they are to fix.
Posted on December 23rd, 2011 at 10:38 pm
I’m using Maya 2012×32, i very need version of plugin for Maya 2012×32. =(
Posted on December 28th, 2011 at 8:13 am
HI
i have maya 2012 x64…so i installed the using the setup and then installed the pywin32 for 2011.
this error popped up:
Cas_APU;
Maya version : 2012 x64
plugin name : Cas_APU_2012×64
Loading plugin : Cas_APU_2012×64
# Error: Unable to dynamically load : C:/Users/owner/Documents/maya/Cas_autoUnfold/plug-ins/Cas_APU_2012×64.mll
The specified module could not be found.
#
# Error: The specified module could not be found.
#
# Error: The specified module could not be found.
(Cas_APU_2012×64) #
# Error: RuntimeError: Invalid object or value: #
also i get this error when i try to Send as Path or Layer to Photoshop:
# Warning: No win32com python lib found. Please readme to find out how to install them #
WHat do i do?