Jump to content

Exporting An Animated Mesh To Maya


ofer

Recommended Posts

Hello!

I have an animated character, in houdini. Unfortunatly, I need to put a shirt on it, and I can't use houdini for the cloth sim, it is too slow.

I think what I want to do is to export the animated character to maya, use nCloth, and export the animated cloth back to houdini.

Now, I don't know maya at all - How can this be done? Can I load many obj file and tell maya to treat it as animation? Maybe the best way is to

use blend shapes?

I can write scripts, if needed.

Thanks.

Link to comment
Share on other sites

It hasn't changed much, as far as I can tell.

Well, I have searched the forums, and only not long ago I found a short topic about exporting to xsi/max, with a point cloud file format.

I also understand that COLLADA might be a good solution.

Thanks, I hope I'll succeed.

Link to comment
Share on other sites

On the other hand, while it's true Houdini's cloth is slow, it is also powerful. It might be faster than trying to learn Maya.

Dragos

That is true. The very good think on houdini cloth is you can make a very low res mesh to start working, and then switch to a hig rez and make the final simulation, or maybe you can also deform your high res cloth with the low res version.

Link to comment
Share on other sites

  • 2 weeks later...

Well, thanks for the suggestions.

I will try houdini again, but it is very slow, and takes two hours to compute 30 frames, and only then i find that the sim is completely broken.

Anyway, I found a script that converts an OBJ file into a maya cache file, it almost works, but the points on the mesh are messed up. The general look and animation of the geo is OK, but it is really not useable.

Dont know why.

Link to comment
Share on other sites

hi ofer,

please forget ncloth, its the largest shit on earth, we use it every day in production, it makes only one problem to the other. forget it and use the houdini cloth, its better, and more controlable, its stable and better to simulate. dont go to maya. i use maya for years, but if you want a effect for closeup in high detail dont use maya. maya is only kinda shit, that makes more problem every day. a software wich consists of a hughe amount a kid-effect-problems. and alot of bugs.

when you can, use it only for rendering lighting, or layering, but not for simulation or something like this.

maya makes so much problems in our produktion, that i gonna hate it. And autodesk is a company wich doesnt got knowledge. The tell us, every day. "Sorry, we dont know this bug, this problem, we never test it!".....-> ?we never test it??? we never testet, to make particle simulation with 1 mio particles???? what kinda shit goes on????

learn houdini.... and use it. its more free of bug as maya in all the years

and i got a script there wich creates in maya. blendshapes. so you can add youre cloth or hairs and so on.

you only have to export it to obj.

bye

global proc loadOBJsequence(string $directory)

{

int $startframe = 1;

string $file_list[] = `getFileList -folder ($directory + "/") -fs "*.obj"`;

string $group = `group -em -n "Blendshapegroup"`;

for ($i=0;$i<`size $file_list`;$i++)

{

file -import -options "mo=0" ($directory + "/" + $file_list[$i]);

rename "polySurface1" ("importObjSequence_" + $i);

select -r importObjSequence_0;

blendShape -frontOfChain -tc 0;

parent ("importObjSequence_" + $i) $group;

}

int $numBlendshapes = `size $file_list`;

int $frameNum;

for( $frameNum = 0; $frameNum < $numBlendshapes; $frameNum++)

{

currentTime $frameNum;

int $bshapeNum;

// fur alle auf 0 keyen

for( $bshapeNum = 0; $bshapeNum < $numBlendshapes; $bshapeNum++)

{

setAttr ("blendShape1.importObjSequence_" + $bshapeNum) 0;

setKeyframe ("blendShape1.importObjSequence_" + $bshapeNum);

}

setAttr ("blendShape1.importObjSequence_" + $frameNum) 1;

setKeyframe ("blendShape1.importObjSequence_" + $frameNum);

}

}

loadOBJsequence("c:/grafik/3d_szenen/houdini/meshtest");

Link to comment
Share on other sites

he he he! Your rock Mainframe123! It so noticeable how angry you are now :lol: !

Beware! Man on fire!

Thanks for sharing your script!

cheers,

sy.

I'm sorry, i think my head blows up yesterday. :blink: what can i say, apologizes.

i dont wanna say something more, but maya reach the end. i wont use it ever again, if i can!

i sucks more than 3dsmax and 3dsmax is a dinosaur. i dont wanna say something, but i cant see, how maya becomes to a 3dsmax clone. nothing new, only one bug after the other. and i dont believe it will become better in 2008. i wont believe it. and i think after the new price politics of sidefx, and the new version 9 maya will gone in the next 10 years. bye bye. I hear it every day from so much people: " maya sucks more and more"...............ok bye

wish you nice evening or morning, good night. i go to bed. bye. apologizes. its only my opinion

Link to comment
Share on other sites

yeah, im caught in between this issue right now, because i'm producing good and fast results with maya ncloth, and good results with houdini, but whats promising is that sesi have something up their sleeve regarding cloth!! so i wouldnt move away from houdini for that.

however ofer, if u need a quick fix,

OBJ_mc_v2.zip

try this python file, it makes a maya cache file from a series of objs,

steps :

1 : load any of the .obj into maya (that was created from the series of objs generated out of houdini)

2 : run the script with a line something like this OBJ_mc_v2.py --obj=c:/temp/try_####.obj --mc=c:/temp/ --chan=testobj

this will generate a series of .mc files with an xml file, that u will need in maya

3: select your object, then select geometry cache from the menu, and specify import cache, point to the .xml file that was generated from the script,

and that should result in a mesh that deforms like the geometry in houdini, and will allow u to sim using ur houdini geom as the collision geom,

just make sure that the point numbers dont change in houdini :-)

give it a try,

aracid

Link to comment
Share on other sites

yeah, im caught in between this issue right now, because i'm producing good and fast results with maya ncloth, and good results with houdini, but whats promising is that sesi have something up their sleeve regarding cloth!! so i wouldnt move away from houdini for that.

however ofer, if u need a quick fix,

OBJ_mc_v2.zip

try this python file, it makes a maya cache file from a series of objs,

steps :

1 : load any of the .obj into maya (that was created from the series of objs generated out of houdini)

2 : run the script with a line something like this OBJ_mc_v2.py --obj=c:/temp/try_####.obj --mc=c:/temp/ --chan=testobj

this will generate a series of .mc files with an xml file, that u will need in maya

3: select your object, then select geometry cache from the menu, and specify import cache, point to the .xml file that was generated from the script,

and that should result in a mesh that deforms like the geometry in houdini, and will allow u to sim using ur houdini geom as the collision geom,

just make sure that the point numbers dont change in houdini :-)

give it a try,

aracid

hi,

Sounds good. But is complicated, too. I think my script is the same, but without any kinda cachfile and so on. With my script you only need to export your cloth simulation, as obj. sequence. The you copy all your meshes, with the mtl files into a cach folder. Than you copy my script in the scripteditor of maya, change the path to your cach folder - path. push enter. and all is fine. My script works that way: It loads the first frame of the anim and make a blendshape obj out them. then he add all the other frames as blendshape targets. This blendshape targets, can be killed after that import. Because, everything is keyed. you can modify animation curves and so on. But you cannot edit your blend targets, when you killed it. So wish you nice day. Dont forget, you can finde more ways to rome.

use my script, we use it in production, it works perfectly. bye

Link to comment
Share on other sites

Thank you all! I used that script to produce the cache file, and it worked well. I know python very well, and I don't know MEL (or anything else related to Maya) at all, so I prefered to use the python script. It has some usage problems and some hard coded constants that I had to remove. I think I will clean it up a bit and upload a better version.

As of using houdini, I really prefer it. But it is so slow. I also found it very unstable. nCloth is way much faster, and although I didnt have much success in my first attempt to animate a shirt, I could see the results interactively. In houdini I had to wait 2 hours to see that the shirt just blows away.

But I will try again, as it I really prefer houdini's style.

Link to comment
Share on other sites

hey ofer

quiet a while back i did some cloth with houdini and actually found it reliable, is there any way u can post the hip, maybe see what might be causing the issue?

mmmm my experiences with houdini cloth where successfull, and it was alot of fun :blink:

now i turn to model all with houdini 9. the new model tools make it quite easy like to model in maya.

i didn't open maya since 3 weeks......amazing i dont miss maya.

Link to comment
Share on other sites

Hi,

I finally got my MacBook Pro, with lots of RAM and CPU power. It will take me a few days to get comortable with it, and then I will try again. I ran a quick simulation of many little cubes droping on the floor, and it didn't even choke. Once I transfer all my data to the new laptop, I will post the script and the HIP.

Thank you all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...