How do I animate attributes and export it as a fbx-file? - animation

I have made a pipe in Maya, on which I have animated the thickness (Below is an example of 4 of the keyframes in the animation). Unfortunately when I export it as an fbx file, the animation of the of the thickness is not saved. Is there a way to save an animation that would be something similar to this one or some help on getting this solution to work?
I'm fairly new to Maya so there might be something I'm missing. Hope you can help me.

Default FBX won't export the changes in the geometry - it will give you the position, rotation and scale of the object over time but not changes to vertex positions within the object.
You can turn on the 'Geometry Cache' option in the fbx export dialog:
Vertex Animation stored in FBX file without using Point Cache?
However not all applications that use FBX support geometry caches - you'll have to see what your target software supports. Other options might be to export a series of .OBJ files (1 per frame) and use the vertex data from those, or to use an animated geometry specific format like Alembic

Related

How to fix image texture not transfering to Unity from Blender

I textured an object in Blender because it wouldn't texture properly in Unity, and then imported the object and texture to Unity.
I don't know how to fix this, I'll put both pictures here.
Blender Texture Before Import
Object In Unity
Okay, so based on your screenshots..
You're going to select everything then add a modifier called "Solidify", then set this to something very small like .03. (Unity doesn't like objects that are just planes).
double check all your normals are facing out. Let me know if you don't know how to do this...
Go into edit mode select all edges, then right click, select "mark as seam".
Open UV editor window (should be split screen with Edit mode on one side, UV view on the other). In the Edit side select all, then go to UV dropdown menu and click "unwrap". You should then see your object unfolded into flat planes over on the UV window side. There's different unwrap options, like smart UV unwrap, etc. I think just "unwrap" has worked for me, but play around and there may be something that shows your object shapes in a less distorted way..
At this point, since your pattern is basically repeating. If you export the OBJ file and take it into unity, and you add the image file (make sure it's dimensions are perfectly square) it should receive the image file as an Albedo texture much better than in your screenshots. You can play with the 'tiling' and "X/Y offset" till it looks right (you might face issues with rotation though.
BUT
If you want to line it up very specifically, you can export the UV layout as a png from the UV window in blender. Then use photoshop or another photo editor to change/rotate and arrange your texture so the sides line up properly. In blender in the Edit window (assuming you still have both UV + editor open) when you select a side it will highlight in the UV window the corresponding flat plane, based on this you should be able to figure out what should be rotated up/down, etc. Then when you change that 2d image and drag it into Unity, it will adjust and wrap around the object.
I'm pretty new to both, but the advice I've been given is to not do the texturing in blender, but instead to do it in Unity.
This is a 10-month-old post but incase anyone is curious or struggling the same, Blender exports models with a scale of 100 so you need to scale up the tile of the material (in material settings) to see it.
This is a bad solution however because then you are not working with objects on a scale of 1 so you actually want to check "Apply transformations" when exporting the FBX model in blender

three.js / A-Frame ObjectLoader does not load Texture and positions Meshes wrongly

We have an issue with exporting our 3D Assets and animations correctly so that three.js can correctly display them.
All our 3D artists work with Cinema4D so we need to go through blender to export a three.js compatible JSON. They export the scene as FBX and then import it to blender. This seems to work fine. The model looks good there (with Material View set in Preview Window) and the simpler models we exported even worked with textures and animations.
But we now have a scene where, when we load the resulting JSON, some of the meshes are flipped 180° (but only some - the trees) and one of the models (Santa model) is not textured. They all look fine in blender.
When loading the JSON in https://threejs.org/editor/ you will immediately see the issues:
Is this an export problem? Can we fix it by tweaking the export params? Will we need to adjust the model in blender?
I would advise a couple things here:
File a bug on three.js including the .blend file
Try freezing transforms in Blender or C4D before export
Perhaps try a different three.js-compatible blender exporter, like glTF-Blender-Exporter.

Export Maya scene to Three.js

Is there any way to export the whole scene from Maya to Three.js.
Exported elements should be:
all mesh, textures, cameras, including the lights, shadows etc.
So that I can get the proper rendered effect that is been in the maya.
If you read the doc for the Maya exporter, it currently doesn't support exporting lights. You'll have to create the manually in your three.js code.
I don't know the current status of three.js loaders as I havn't used for a while now but back then Collada and FBX exporters were shaky. And still seem to be. You can try exporting from Maya to FBX and convert it (FBX file format supports lights).
OBJ file format doesn't support support lights of animation but this is the easiest way to go.
Long story short, export your models with the correct materials and create and place your lights manually.
PS: You can't export shadows.

Export Fbx from Blender To Unity

I have a complete blender file which has an animated character with two actions and I want to export it as an fbx so i can view it in unity. I did it and for some reason it is only exporting my actions and not the mesh or camera or anything else only exports the actions. Why is it not exporting my mesh I have everything selected and i have apply modifiers and include animation selected. Thanks for the help
Sounds like you are exporting in Blender with Selected Objects options set. In this case you have to select the mesh itself in object mode to export both. Selecting the armature will export animations only.
If you do have a mesh in Unity3D but can't see it in the scene, you have to fix the scale factor. It's set to 0.01 by default. So change it to 1 to see the mesh in its original size.

Maya Mel Scripted Animation Not Animating as FBX

I've acquired a great quad model. I skinned and animated it to a rig build by a
Mel script. It works great as far as editing the animation using sliders and parameters
in Maya. When I export the file as an FBX file to Unity3D, it does not animate. Is something
being lost in the translation from Mel to the rig? Unity needs a boned rig, is this procedural rig not the equivalent of a rig built and animated with the skeleton tools in Maya? I've check that I have a 'Reference' folder, I've set keys, changed root name to "Hips".
Thanks for any insight on this question.
dDuane
If you are transferring the file with no errors and there is no animation then there are three issues to look at.
First, you may have accidentally not exported the keyframes. Make sure the box is checked to export animation on the FBX export UI.
Second, it's possible that the object that contains the actual keyframes is not being exported. When you animate using the MEL scripted GUI, find out where the actual keyframes are on the rig and make sure that object is exporting with the rest of the character.
Third, the object might be transferring fine but depending on the rig setup the connections/constraints/whatever might not be working or supported in Unity. You might consider baking the animation to the skeleton before transferring to the engine. To do this, select the skeleton, click [Edit -> Keys -> Bake Simulation].
I don't know what Maya you are using, but I've always used 2010. This is the workflow that we used for a small unity 3D game project:
Export all of the
animations in one scene as a .fbx. Be sure you just select the geometry (it
usually helps to have it all grouped, but if you can't for some reason that's
okay) and hit export selected.
These FBX export options should be checked:
Geometry:
Edge smoothing,
Tangents and Bi-normals
Animation:
Animation,
Bake Animations,
Bake Animations,
(range of animation),
step = 1
Deformed Models:
Deformed Models,
Skins,
Blend Shapes (if using these),
Curve Filters,
Resample as Euler Interpolation,
Input Connections,
Instances to Objects,
Referenced Containers Content (if using any references),
FBX File Format
Binary
FBX200900
When you bring this into Unity, set animation generation
to "store in root." If all of your
animation is in this one file (which it should be). The "split
animations" box should be checked and define the names and range of these in the
chart below. When you eventually create an animation blending script, drag
and drop it on the animation object within the player prefab, not the prefab
itself.

Resources