Poser to maya

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2011   #1
Poser to maya

I'd like to import a poser animation to a maya rig:

1. Mesh: No problem.

2. Joints with keyframes: I should probably use collada or bvh; any recommendations?

3. Smooth skin weights: Only a fantasy?
 
Old 12 December 2011   #2
After spending a few hours I think I finally got it all, and it seems that a weight map isn't a fantasy at all, it's something inherent in .fbx and .dae. There are three options:

1. Poser pro 2010 can only export one frame of collada. Export it and the .bvh, import both to maya (You'll need two plugins: imocaputilz.mll and fbxmaya.mll). You'll get two skeletons, one for motion and one for binding the shape. So do skeleton retargeting from the first to the latter (involves label characterization of the joints).

2. Poser pro 2012 can export a multi-frame collada, but it's still buggy. After importing it to maya, you'll need to fix the joints name, and the initial joint isn't the root, and you should take the root joint (hip) with MMB outside of it.

3. The best option: Export .bvh from poser. Open in Daz 4 the poser file (.pz3) from poser pro 2012. Export as .fbx. Inside maya import first the .bvh, then import the .fbx. Since they both use the same names for the joints, the .fbx would only update the skeleton from .bvh and you'll get a perfect rig with animation.


I guess that these tips should be useful the motionbuilder as well.
 
Old 12 December 2011   #3
Good info. Did your skin weights really come in just like they were in Poser? I've had to make that conversion several times, but I always ended up re-skinning in Maya.
__________________
Side effects may include Involuntary Narnia Adventure.
 
Old 12 December 2011   #4
Okay I played with it a bit more. There are some examples which the .fbx export from daz is screwed, so the third option isn't the best.
So the current best option is number 2, and yes it exports the skin weights flawlessly. I wrote a python script to fix the joints names:

import maya.cmds as mc
 import re
 
 joints = mc.ls(type="joint")
 for jo in (joints):
 	ma = re.match('^Figure_1(.+)_1_node$', jo)
 	if ma is None:
 		continue
 	new_name = ma.group(1)
 	print jo, ">", new_name 
 	mc.rename(jo, new_name)
 
 
 
Old 12 December 2011   #5
Here is an example:

https://docs.google.com/open?id=0B4...zkxYmJlZWU2Mzlh
 
Old 01 January 2012   #6
If you want to create all the poser content in DAZ Studio and export the content from daz using my third method, then here is a script to delete the redundant joint effectors:

import maya.cmds as mc
 import re
 
 joints = mc.ls(type="joint")
 for jo in (joints):
 	ma = re.search('_Effector$', jo)
 	# print jo, ma
 	if ma is None:
 		continue
 	print "Deleting", jo
 	mc.delete(jo)
  
 
Old 01 January 2012   #7
Another important tip: Poser and DAZ work with 30fps. So set you maya scene to 30fps before importing, else the keys would be out of synch:

http://forums.cgsociety.org/showthread.php?t=1028049
 
Old 09 September 2012   #8
Hi.

I'm not understanding whether the 2 import scripts are supposed to be mel or python, firstly.
When I paste as mel, I get errors. As python, I get indention errors.

What's the deal?
 
Old 09 September 2012   #9
First, there's only a slight chance for it to be mel:

http://forums.cgsociety.org/showthread.php?t=1044538

Second, this forum sucks when it comes to posting code and keeping the indentation, so you'll have to fix it manually. However since you've been so nice (... ), you can try to copy the functions from here:

http://svn.code.sf.net/p/mymayaplug..._joints_name.py

and add a call to fix1() or fix2().

Last edited by zoharl : 09 September 2012 at 11:24 PM.
 
Old 10 October 2012   #10
OK. I'm not any kind of programmer. Just looking to take code, load it and have it work.

It looks like I need to add something to the "def fix1():" or "def fix2():" part(s) of the code
(I thought I was just loading and running), because adding the code to the script editor then running it, did nothing.

What does "add a call" mean?


Help!!
 
Old 10 October 2012   #11
After copy/pasting to the script editor add another line of fix1() or fix2().
 
Old 10 October 2012   #12
Currently having an issue with Daz 4.5 on Mac. I just installed it over my older version 4 but now I can't navigate to any of my content (something to do with “Unable to expand, “GenesisStarterEssentials"). So now I can't test out your 3rd option.

(By the way, I'm using Maya 2013)

I've tried:

"import maya.cmds as mc
import re

def fix1():
joints = mc.ls(type="joint")
for jo in (joints):
ma = re.match('^Figure_(\d)(.+)_\d_node$', jo)
if ma is None:
continue
new_name = ma.group(2)
print jo, ">", new_name
mc.rename(jo, new_name)
fix1()"

And pasted the entire:

"import maya.cmds as mc
import re

def fix1():
joints = mc.ls(type="joint")
for jo in (joints):
ma = re.match('^Figure_(\d)(.+)_\d_node$', jo)
if ma is None:
continue
new_name = ma.group(2)
print jo, ">", new_name
mc.rename(jo, new_name)

def fix2():
joints = mc.ls(type="joint")
for jo in (joints):
ma = re.search('_Effector$', jo)
# print jo, ma
if ma is None:
continue
print "Deleting", jo
mc.delete(jo)

def fix():
fix1()"

Nothing is happening.

Why can't I just load the "fix_joints_name.py" file?

Last edited by trashtalk : 10 October 2012 at 04:06 AM.
 
Old 10 October 2012   #13
You don't have to copy/paste, but it's the only thing that most people know around here.
Alternatively put the script in the python path and execute from the python script editor (no indentation - leading spaces - before each line):

import fix_joints_name
  reload(fix_joints_name)
   fix_joints_name.fix1()
   


or

import fix_joints_name 
   reload(fix_joints_name)
   fix_joints_name.fix2()
   


Now, I can't understand anything from the code you pasted. When I paste it as mel, I get errors. As python, I get indention errors. What's the deal?
I'm kidding...
Probably you ran everything correctly. Nevertheless I should stress that if you didn't use the alternative way, the added lines fix1() and fix2() should be on a new line without indentation (no spaces / tabs before the code). Next, let's synch your expectations. We are talking about two, very dumb scripts. The first code (fix1) only change the names of the joints imported from poser, and the second code (fix2) deletes some annoying effectors which make the skeleton imported from daz intelligible (make refers to effectors of course...). Thus if you didn't import anything, there's nothing to rename or delete, so the script would do nothing.

Last edited by zoharl : 10 October 2012 at 05:27 AM.
 
Old 10 October 2012   #14
Okay. I don't know why its not doing anything, but I'm still nowhere with your method.

After importing the collada file(s), fbx, bvh, etc., (having the mesh selected or not) I get only Maya sourcing the pasted code (no indentions) under the python tab.

import fix_joints_name
reload(fix_joints_name)
fix_joints_name.fix1()

I dont' understand why this code doesn't include the prior import function for maya commands either.

Why is :

"import maya.cmds as mc
import re

def fix1():
joints = mc.ls(type="joint")
for jo in (joints):
ma = re.match('^Figure_(\d)(.+)_\d_node$', jo)
if ma is None:
continue
new_name = ma.group(2)
print jo, ">", new_name
mc.rename(jo, new_name)
fix1()"

different or necessary, and the following doesn't have the rest of the code?
Why is "import maya.cmds as mc
import re", left out from your last post?:

import fix_joints_name
reload(fix_joints_name)
fix_joints_name.fix1()


(The "def fix1()" section above had the same indentions in your first post of it.Why are the lines after "def fix1()", left out?)


It would be nice to make a short youtube video demonstrating whatever is supposed to happen with the scripts (before and after). Cuz I'm going to have to do something else. It seems those scripts don't work or don't do what they say they're meant to do. Again, there's no feedback after sourcing the script(s), what so ever that indicates something right happened or wrong (only sourcing). I copied the original "fix_joints_name.py" you made initially, into a text file then saved it out so Maya could see it and load it under the plugin setting manager window, and while it see's it and loads it, it does nothing.(Under Mac on both 2012 and 2013).



Please. Anyone. Is there some other consistant way to setup or just auto re-rig a Poser/Daz figure in Maya 2012 and 2013? Help!!

Thx

Last edited by trashtalk : 10 October 2012 at 10:58 PM.
 
Old 10 October 2012   #15
I didn't understand the first part of your post; are you looking for a python tutorial? You can find some recommendations in the programming sub-forum.

Load it as a plugin? It's not a plugin, it's a dumb script, and you should put it in the script path, or copy-paste it contents to the script editor.

Why there's no feedback? It's a dumb, quick and dirty script.

I didn't see many people interested in this thread so far, and up until you came I was mainly just talking to myself for future reference. Also a python programmer could exploit my code in a second, and it wasn't really meant as a release for the general public (did I mention quick'n'dirty already?).
Nevertheless, please provide a link (e.g. google drive) to a zip that contains: The daz or poser files, the exports (collada, .fbx, .bvh - and let me know from where they were exported), and the scene file (.ma), and I'll try to walk you through this.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:50 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.