Jump to content

exporting fractured geometry to maya via .obj - problems


ranxerox

Recommended Posts

hey all, I've been using kumpa's kfracture otl modified somewhat (THANKS KUMPA !!) to split up geometry into "sphenoid hendecahedrons", which works great. I've fractured my geometry into about 230 pieces and everything works well in houdini. I am now trying to export the fractured geometry into maya as .obj files. I used a foreach loop to loop over the pieces and write the files out with a file sop. I wrote a script in maya load all the individual pieces and on several of them (6 to be exact) I get the nonspecific error "// Error: line 0: OBJ file line %d: index out of range for face creation. //

// Error: line 0: Error reading file. // " - gotta love maya. I get this error even when I try to import the specific piece via the menu. I assume the .obj file has something in it which maya doesn't like. I've tried a bunch of things to try and massage the geometry before writing it out, but to no avail. I wish I could do the whole shot in houdini but the pieces have to be exported to maya for lighting. Has anybody ever encountered this error or have any ideas ?

thanks for your time.

-ranxx

Link to comment
Share on other sites

allright well, I never could get those objects through in .obj file format, was about to write my own obj importer when I tried using .fbx file format. I had overlooked this option because the .fbx file format exports everything as a single mesh (as far as I can tell), so I just exported the pieces which were not working by hand one by one and everything came in fine.

-ranxx

hey all, I've been using kumpa's kfracture otl modified somewhat (THANKS KUMPA !!) to split up geometry into "sphenoid hendecahedrons", which works great. I've fractured my geometry into about 230 pieces and everything works well in houdini. I am now trying to export the fractured geometry into maya as .obj files. I used a foreach loop to loop over the pieces and write the files out with a file sop. I wrote a script in maya load all the individual pieces and on several of them (6 to be exact) I get the nonspecific error "// Error: line 0: OBJ file line %d: index out of range for face creation. //

// Error: line 0: Error reading file. // " - gotta love maya. I get this error even when I try to import the specific piece via the menu. I assume the .obj file has something in it which maya doesn't like. I've tried a bunch of things to try and massage the geometry before writing it out, but to no avail. I wish I could do the whole shot in houdini but the pieces have to be exported to maya for lighting. Has anybody ever encountered this error or have any ideas ?

thanks for your time.

-ranxx

Link to comment
Share on other sites

actually I'm not doing the animation (it's being done in Maya) so it seems to have worked out.

thanks again for sharing your great work (kfracture). I really learned a lot looking over the network.

cheers

-ranxx

Exporting .obj will do no good since there will be no velocity vectors. Saving sequence in MDD file format seems to be good way to do this but you need mdd loader for maya, but never tryed this myself.
Link to comment
Share on other sites

actually I'm not doing the animation (it's being done in Maya) so it seems to have worked out.

thanks again for sharing your great work (kfracture). I really learned a lot looking over the network.

cheers

-ranxx

thank you, i am happy you like it :)

Link to comment
Share on other sites

  • 1 month later...

Follow-up question here: is there some way to drive fbx export script-o-matically? I'm trying to export some fractured pieces via fbx (because of the same obj failure given above), and I'd like to write a script that loops over the problem pieces and exports them via fbx one at a time.

Link to comment
Share on other sites

Well, there's the Filmbox FBX rop/output driver.

Yep. I set up a thing with a Delete and an FBX ROP to "solo" each piece based on the frame number, then write it to the appropriate filename. (ROP reads the group name from the Delete, and makes a filename out of it.) Unfortunately, when I tried running a frame range, it kept writing to the same file - guess the ROP parms aren't updated per frame. Will investigate a Wedge instead - but for now, rendering one frame at a time isn't too bad.

Link to comment
Share on other sites

Wow, I know it'll be a bit late since it was now done in Maya, but I just went through this whole ordeal.

I had a destruction shot I had to get imported into Maya for rendering, naturally seeing FBX in those apps was the choice to go, but when I tried it the vertex cache made the points swim in the Maya import, and UV'ing wasn't going to work, this might have been fixed on a newer build. But the other thing I noticed was it imported all the pieces as one node inside of Maya, naturally you could probably use the Extract or Separate tool in Maya, but when it's over 500 pieces, it's not that usable.

We didn't have PointOven, so that wasn't an option. The only way I saw was to use .obj files and to export out the animation of each object and then read it inside of Maya and apply it to each of the objects as it imports it. We'd end up with separate objects with keyframe animation on all of them, then we can go crazy inside of Maya and UV or even refine the model, and all we can do after is apply the animation and we're rocking.

In between working on this, I noticed I was also getting the error where it would stop importing an obj inside of Maya and didn't want to read it. The way I got everything to work was right as I was exporting out each piece I would fuse all the points, so there wasn't any floating edges or points, and then I ran it through a Divide SOP which would triangulate the mesh, since that's what Maya seemed to like.

Now the way you write out the chan files I could only figure out how to do it straight off DOPs, using the Dynamics Chop I get the result of 3 vector for translate, rotate and pivot, which is how I read it in, but if I went inside of sops and in chops used a Geometry Chops I get the values on a per point base, which is not very useful for what I'm trying to do, I tried to figure out a way to just get the same result I'd get from the Dynamics Chop, but my attempts where futile, maybe this is something SESI should look at?

Took about 5 days total to build it and to get it working. I'm finishing here this week, so next week I'm going to fix up the script and setup a Houdini scene and post all of it on my blog and make it available for people.

-Rick

Link to comment
Share on other sites

Yep. I set up a thing with a Delete and an FBX ROP to "solo" each piece based on the frame number, then write it to the appropriate filename. (ROP reads the group name from the Delete, and makes a filename out of it.) Unfortunately, when I tried running a frame range, it kept writing to the same file - guess the ROP parms aren't updated per frame. Will investigate a Wedge instead - but for now, rendering one frame at a time isn't too bad.

Hey Mitch - you should definitely post your FBX findings up on the Side Effect forum; if there is a bug, they are extremely diligent about making sure FBX support is solid.

Jason..

PS. You do know that putting $F in a filename will cause it to have a frame number embedded in the name, yes?

Link to comment
Share on other sites

PS. You do know that putting $F in a filename will cause it to have a frame number embedded in the name, yes?

Yep - that's what I'm saying... the ROP output one file, with the $F = the first frame of the range. (And an additional "fpc" directory.) I took this to mean that the filename wasn't getting updated - but in retrospect, it's probably just the output driver deciding that a sequence means something other than a series of static fbx files.

I'm assuming I could force the latter behavior (which is what I want, in this case) by writing a script that advanced the frame, then fired the ROP, then advanced, etc.

Link to comment
Share on other sites

Yep - that's what I'm saying... the ROP output one file, with the $F = the first frame of the range. (And an additional "fpc" directory.) I took this to mean that the filename wasn't getting updated - but in retrospect, it's probably just the output driver deciding that a sequence means something other than a series of static fbx files.

I'm assuming I could force the latter behavior (which is what I want, in this case) by writing a script that advanced the frame, then fired the ROP, then advanced, etc.

I know absolutely nothing about FBX, but perhaps it's writing the animated sequence into the same file? ie, Does FBX allow the storing of multiple frames of geometry within a single file?

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...