Search Unity

Carrara animation to FBX procedure?

Discussion in 'Asset Importing & Exporting' started by CarlL, Nov 26, 2008.

  1. CarlL

    CarlL

    Joined:
    Nov 11, 2008
    Posts:
    83
    Hello,

    I'm new to Unity, and trying to see if I can get an assets pipeline going with the tools I have at hand, without spending and extra 2k on Maya for my Mac... I have Lightwave but I hate it, I normally use Carrara so I was happy to see that listed as a program that could work with Unity.

    With the fbx exporter I am able to import files into Unity that have bones attached. I can move the bones in Unity, and animate the figure in Unity using the Animation timeline.

    I've been unable to ever get an animation to import from Carrara, though.

    Is there a particular way of structuring the file and saving it, and importing it such that I can get my bone animations in?

    Any suggestions are appreciated!
     
  2. CarlL

    CarlL

    Joined:
    Nov 11, 2008
    Posts:
    83
    So, I take it there is no way?
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Have you verified that Carrara is exporting the animation in the FBX file? I haven't used Carrara in a long while, but the last time I did (maybe a year ago?) its FBX export wasn't complete. UV maps weren't exporting and neither was animation. But its been a long while since then and there have been a couple of updates since. I'd take your FBX file and try to import it with something else, like maybe Cheetah 3D (use the demo version if you don't own it).

    That's what I would try...
     
  4. CarlL

    CarlL

    Joined:
    Nov 11, 2008
    Posts:
    83
    Thanks for the reply.

    It turns out that the Carrara fbx exporter has improved since you last used it in that it exports the Model, UV's, bones and Weights. All it's missing is the animation. I discovered that I could animate an imported object right in Unity, which is GREAT, but maybe not the professional way to do things. I couldn;t seem to break that sort of animation into clips...

    I saw that Maya was the only program that can be opened natively in unity on the MAC, so I bit the bullet and bought it. Yikes. It put me back some but probably will be worth it to avoid some headaches.
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'm not sure where you saw that...you can open Blender and Cheetah files natively in Unity, and both do animation fine and are far cheaper than Maya; especially Blender which is free. ;) (Although in all cases, including Maya, the files are technically not imported natively, but instead Unity opens the app in the background and makes it export to .fbx.)

    --Eric
     
  6. CarlL

    CarlL

    Joined:
    Nov 11, 2008
    Posts:
    83
    Oh darn.

    Part of the confusion was that the Unity website lists lots of programs as importing fine, when in fact some of them actually do not. I heard word of mouth that Maya worked pretty seamlessly so that's what I went with.

    Oh well. I think Maya is way overcomplicated overkill for game projects but it works fine so far so it can't hurt to know it.
     
  7. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    Has there been a resolution to this?

    I own Carrara 7 Pro and LOVE it. I am having some trouble exporting .fbx files and have the model show up with its textures in Unity.

    I have not tried to export a model with rigging into Unity yet, but according to the Unity website, it is possible.

    I really do not like Blender, despite its price, and will not purchase Maya (I have an old Maya 4 license) again. I own Lightwave, but never really use it. Carrara pretty much gets all of my attention because I know it and I like the speed and look of the renders, so I most comfortable with it.

    Any help is appreciated.

    Mike
     
  8. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    Have either of you tried to route your Carrara output through Daz Studio or Poser? I haven't tried this myself, but maybe the FBX exporter in the latter applications is more robust?
     
  9. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    I could try, but I REALLY hate Daz Studio - just not very stable for me. Carrara has been rock solid.

    I also hate Poser and simply will not use it. It crashes all the time and is soooo slow - for me. I bought poser 7 and will not upgrade. Hell, I wish I could sell it.

    So, I will try and figure out how to do it in Carrara.

    Mike
     
  10. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I am having the same problem. >_<; Except when I tried importing my animation, my model was totally screwed up. 0_o; I tried various ways to export it but all it did was retain its shape but nothing else worked. :?
     
  11. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    i've only been working with static meshes - no animation.

    Was yours static?

    I used the fbx export and used the 6.0 setting with binary. That worked for everything except textures/colors. Still trying to figure out why that did not work (my thought is the textures are not being found by Unity and are someplace Carrara puts them - if that's the case, I have to find them and move them manually.

    If I have any progress, i'll document it here.

    Mike
     
  12. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I was trying to import this:

    http://www.youtube.com/watch?v=Rr_izd7dGNo&feature=channel_page

    Maybe if I delete the floor it won't screw up so much. The textures didn't transfer with mine either but they work fine on my .3ds files.

    EDIT:

    I can't even get the most basic of animations to work. The kind where you animate squishing an object without any bones or anything. :?
     
  13. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Unity doesn't automatically import textures when you import a model. The first time you import the model, you need to manually associate your texture(s) to that model's shader(s). Then any time after that you change the model or textures, they will automatically update in Unity.
     
  14. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    I loaded in a simple model (3ds or fbx seem to work somewhat) with one pre-made texture. I dragged that into my game level/scene. I used Hexagon 2.5 to UV unwrap the texture and loaded that in as a PNG file to Unity. I dragged the PNG file onto the loaded model. The loaded model turned stark white and that's it. I changed the color and that worked, but no texture.

    Is there another step (like texture baking or lightmapping) - what am I doing wrong?

    I tested the level and the texture was indeed not there.

    Help is appreciated.

    Mike
     
  15. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I suspect that the Carrara .FBX exporter is still not saving the UV mapping info. Try exporting as a .OBJ file and see how that works.
     
  16. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    In Carrara 7 Pro, I tried exporting to:

    .fbx
    .dae
    .obj
    .3ds

    None worked. The .fbx was the best and smallest file, but none of the texturing exported with it.

    Daz Studio did not work either (.dae). Using Hexagon, I was able to do a UV unwrap and saved that as a .png file. However, Unity just does not want it to texture the right way - it is obvious I am doing SOMETHING wrong. When I import the asset into Unity, it shows the preview and it looks right, but the texture simply does not appear on the model (static model, by the way - no animations).

    Any ideas or advice?

    Mike
     
  17. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Hmm... I seem to recall with Unity and .obj files, you have to drag both the .obj file and it's accompanying .mtl file into your project. Normally this .mtl file is generated when exporting .obj files from most 3D apps.

    (If I remember correctly, the necessary texturing info is stored in the .mtl file...)
     
  18. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    OK, I will try that since there is an .mtl file - I figured it was somehow loaded in via reference from the .obj.

    That will be fine if it works for stills, but what about characters with rigs and animations? I was REALLY hoping the fbx or dae worked straight out of Carrara.

    Mike
     
  19. Bunzaga

    Bunzaga

    Joined:
    Jan 9, 2009
    Posts:
    202
    I have a friend who also uses Carrara, and he is considering coming to Unity from a different engine. I am not sure what version, etc he uses, but if you find a solution, could you post it here so I can tell him what you did?

    Thanks guy!
     
  20. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    Absolutely. I really love Carrara and use it for all of my client's video and animation needs (even website gfx). I would really like to keep using this pipeline since I know it well enough to use it for my simple (hopefully) little games I want to create for my son.

    Mike
     
  21. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    OK - that part is partially solved. The following works great for pre-made content available from Daz.

    In Carrara, select all parts of the static mesh you want to export to and go to FILE -> EXPORT. Choose .obj as the export file type.

    In the export dialog, use the default preset. 'Map Carrara Z axis to OBJ Y' should be ticked. Also tick 'Export objects with Morphs and Skinning' and 'Export objects full path'.

    Under materials export, choose 'convert procedural shaders to textures' unless you know for a fact that all that was used was colors or textures - tick the appropriate choice. I use a resolution of 512 x 512.

    Finally, make sure the write the file name as a 'full path' is ticked.

    Keep the texture format to .jpg and keep the surface fidelity at 100%.

    Press OK and wait for it to finish. You are done with Carrara for now.

    Drag and drop the exported .obj file into Unity's project area.

    Now, here it gets tricky. Assuming you can, load up Daz Studio and open your object you just exported. Preferably, you also saved that object in a native format Daz Studio can open up (like pre-made content, for example). Select it and choose EXPORT TO HEXAGON. Obviously, you need Hexagon 2.5 for this to work. Hexagon will open up and your model/mesh should also be there. Go to the UV menu and choose UNFOLD. There's a little camera underneath the now unfolded UV - click it and choose PNG as the image save format.

    Drag that now saved image into Unity's project area.

    Click on the object folder in your hierarchy area to open it up (or click on the actual mesh object if you placed it in your game world). You will see the object along with a box that contains no texture. Click the button inside that box that reads SELECT and choose the .png file you dragged earlier.

    You may want to change the color of the object from bright white to something a bit darker - suit to taste.

    Now I need to know how to re-create the shadowing. I tried to re-do the lightmap on the terrain (with the shadow box ticked), but that did nothing. The boxes marked 'cast shadows' and 'receive shadows' are also ticked on. So how does one get the shadowing to show in the game level?

    I am sure it's in the manual, but I have not read to that point and I am too impatient. If anyone of you who knows the engine pretty well can tell me, it would be most helpful.

    However, it is more involved with your own custom made models (I had to export custom made models or entire levels to .3ds and then have to export each and every texture as a separate file (loaded the .3ds files into Silo2 and exported the UV unfolded pictures that way - or export the entire texture for each object - then in Unity you have to load them all in and then texture each and every object separately)

    So, there is no easy way right now. I am still investigating and will post to Carrara's forum as to why there is not a "Export to Hexagon" choice like there is in Daz Studio - so that we could more easily save the resulting unwrapped UV file.

    Mike
     
  22. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Do you know what to do with the .mtl file? I got it into Unity but it didn't do anything. 0_o

    I'm still experimenting but the 3D paintbrush makes the texture files which seem to import fine into Unity. I've only tried it with simple stuff so far.
     
  23. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    Nothing.

    The .mtl file does nothing.

    Delete it and generate a UV map somehow (I use Hexagon for Daz Studio compatible models and Silo for all others)

    Then import/drag and drop the resulting UV map and choose that.

    If your models are made up of lots of other models, you will have to generate a UV map for each and every part of that model. It's a royal pain in the buttocks.

    Mike
     
  24. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Is it possible this is all being a pain because we aren't using the Pro version? >_<; It would suck if that was the case.

    I don't have Silo or Hexagon or anything. I only have Carrara so I guess I have to try and resort to the basics without anything too fancy. But it's not so bad for me really since what I want to make doesn't have a lot of complicated textures.
     
  25. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    You sure about that? From my understanding, the .mtl file contains the actual UV coordinates needed to align the texture map correctly...

    Here's another thread on the subject...

    Apparently the .mtl file is a sort of check-list that coordinates how the texturing of an object is handled and what details are involved, including paths and file names to additional files.
     
  26. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Any idea how they did that?
     
  27. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Well, it shouldn't be all that difficult other than making sure both the mesh file (.obj) and the .mtl file are copied to the Unity assets folder at the same time, along side any associated image files that are part of the texture. (I believe these need to be in pixel sizes in powers of 2... 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048, etc...)

    If you checked that thread I linked, it tells you to look at both your .obj file and .mtl file in a text editor to make sure both files are referencing each other with the correct file name. If you happened to change either file's name or modified/re-exported the .obj file, the current .mtl file might not work and may need to be regenerated from your 3D software. (Especially if the geometry has changed.)

    As for the Unity versions themselves, Unity Pro and Unity Indie should support mesh files exactly the same way.
     
  28. karmacomposer

    karmacomposer

    Joined:
    Apr 7, 2009
    Posts:
    19
    Unfortunately, I am no expert. However, what I did DO to make it work for ME was use Hexagon's .png UV map of the model(s).

    The .mtl's did nothing and seemed not to work.

    I could be totally wrong.

    I own the PRO versions of everything except Unity (which I am demoing, so who knows what version this is) - but this is EXACTLY why I am demoing it.

    Mike
     
  29. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I know but I'm wondering how you look at the program in a text editor. 0_o; Do you just open it somehow in Notepad or something?

    I'm not so worried about the textures at the moment even though later I'm sure I will. Right now I'm interested in getting the objects to animate like they should, even if I have to somehow do it in Unity itself. I'm going to uninstall the program for now and do some research and make a few models and when I have something to work with, then maybe I'll download the trial and try it again.
     
  30. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Yeah... I'm actually a bit behind the times on Carrara myself and am still running v5 Pro. I'm working on upgrading to v7 Pro a bit later on.

    I apologize for not being very clear on this.

    I had to fumble around with the .mtl myself some time ago for a project. At the time though, I think I was either using Hexagon 2.5 or Cheetah3D for generating the models, rather than Carrara. :(
     
  31. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    You can get Carrara 6 Pro for free in a magazine now and upgrade it from there. It would probably be cheaper to do it that way. I own Carrara 7 Pro and it's the first Carrara I've bought so I'm pretty new.

    With the addition of the 3D Paintbrush, I can still make pretty decent textures. It just won't be as nice as the ones I could have made in the shader room.
     
  32. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Ahh ok... To my knowledge there is no easy way to export carrara's animation out to Unity yet. You might want to download Blender (a high-end freeware 3D app) and buy a couple books on character animation for it. The learning curve for blender is pretty big at first, but once you figure out the basics, the rest pretty much falls into place.

    Once you are ready, you should be able to extend your demo of Unity by contacting "support@unity3d.com" with the subject line "New Trial".

    Sorry this has been such a shaky start...
     
  33. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Will my trial still count down even though I uninstalled it? I still have a whole 23 days left on it. 0_o

    That's ok. If I was rich and crazy, I'd buy Maya since I hear it works perfectly with this program, but I'm neither. XD I'll either find my own way around the obsticles or I won't and I'll have to try a different program. *shrug*
     
  34. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Oh? I have a few sites you might want to visit then:

    Digital Carver's Guild
    Inagoni

    These are some of the best Carrara add-on sites I know of. I have several of their plug-ins. Well worth the cost for the additional functionality...
     
  35. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Yeah, I've heard all about those on the Carrara forum. XD but for $30 per app, I can't afford that right now. Some day I will but not at the moment.
     
  36. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Yeah, most likely...

    The Unity Devs are pretty lenient on that stuff, so renewing a demo for another 30 days isn't that big a deal for them if it means an eventual sale.

    Also, the users here in the forum are generally a huge help in most cases. I'm not sure if it's just a slow weekend due to Easter or if it's the fact that it's a Carrara thread.

    Just out of curiousity, are your running on Windows? The Windows version of Unity is still pretty new, so there could be issues with it we don't yet know about. (I'm running on a Mac here...)
     
  37. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Well that sucks. >_<; I thought uninstalling it would halt the countdown. Now I have to decide if I want to install it again. XD Maybe I'll wait a couple of days and install it and see if it did really count down. If it did, I might as well keep it for the remainder of the trail. If not, I'll get rid of it again.

    I'm running on Windows.
     
  38. Bones3D

    Bones3D

    Joined:
    Apr 28, 2008
    Posts:
    314
    Well, technically, you wouldn't have to install it again... they'd just issue you another demo serial number via email.
     
  39. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I do cause I already uninstalled it. XD I thought I could save my trial days until a later date when I had a better grasp of the program.
     
  40. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    UV mapping info is saved in the .OBJ file. Material information is saved to the .MTL file. If the .OBJ file you export from Carrara and import into Unity doesn't have UV information, then the UV info wasn't exported from Carrara. This was the case as far as .FBX files in Carrara 6 Pro. As far as I know, there is no difference in how files are exported in the Pro or Standard versions of Carrara (I have Carrara 6 Pro).

    I was a beta tester for Carrara 5, 6 and 7. I submitted bug reports for the lack of UV support in .FBX exports (and other critical features for use in game development) and as far as I know, these issues were never resolved. The Daz folks basically told me that supporting these features weren't a priority and there was no time line to implementing them, so I gave up on Carrara early in the 7 beta cycle.

    From what I gather from this thread it sounds like you're running into the same issues I ran into. Check the Daz bug tracker and you'll see my bug reports are years old and were never resolved... :roll:
     
  41. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    They probably figured you were the only person who wanted/needed the feature so they didn't bother with it. :?
     
  42. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I think that was/is part of it. The other is that DAZ is first and foremost a "3D content" vendor. That's why they give away Carrara and some of their other applications. Carrara's number one function in their eyes is to create content for their other products. Whether it can or cannot be used to create content for 3D games has no relevance as far as they are concerned.

    As much as I liked using Carrara if you're serious about creating content for Unity (or any other 3D game) then I highly recommend you find a different modeling app. I think you're in for nothing but frustration using Carrara, and there are a number of other great apps that work just fine to choose from.
     
  43. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I didn't know that about DAZ. I thought they had all that content cause lazy people would buy it instead of making it themselves. I'm on a tight budget so I can't just go spending another $200 on a program without it REALLY being something I need and know I can work with. Carrara would be the perfect program if only all its functions worked. >_<; What a better way to show off Carrara then to have someone say "I made all this using Carrara! Imagine what you could do?"
     
  44. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    For low or no budget, I recommend you look at Blender, Wings3D, Cheetah3D, and Fragmotion. I use Blender and, although it may look ugly/intimidating at first, it's really an awesome app once you've gotten the basics.
     
  45. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Do the animations export well into Unity?
     
  46. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Blender and Cheetah3D yes. For Fragmotion, you'll need to also get Ultimate Unwrap 3D to convert the .X files into .FBX. Wings3D doesn't support animation yet. There are other apps out there also, I'm just familiar with these.
     
  47. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Ok thanks. ^_^ I guess I'll have to try Blender. Do you know how well Carrara exports to Blender? If I only had to do animatiions in Blender, that would probably be ideal.
     
  48. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    It used to, that's how I got started with Blender. I was using another 3D engine that used .X files and so I modeled in Carrara, exported to .OBJ and then animated in Blender and exported .X files. After a short while doing things that way I started doing everything in Blender. Once you get the hang of it, Blender is -amazing-. You can do absolutely anything with it.
     
  49. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Ok, it seems I have to download Blender now. XD Is there a way to export a .3ds file into Unity with bones and animate that way? Except for the terrian, Unity very much seems to be an Import kind of program. Everything is made outside and brought in. If I can at least animate inside Unity, then I don't need to have the extra program.
     
  50. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    .3DS files don't support animation, so that won't do it (and neither do .OBJ files). Unity 2.5 doesn't have an animation editor (this was removed while being upgraded) and will re-appear in version 2.6. That editor won't support bones though, you'll need to do that in Blender or another app. Does Carrara export .BVH files? Blender can import those and .OBJ files, you might be able to just rig the model in Blender and then attach it to the BVH animation (although I think it would be easier to just do everything in Blender).

    EDIT: At least I don't think the animation editor in Unity 2.6 will support bones, but since it hasn't been released yet I could end up being wrong about that.