Hi there,
I’ve seen MAYA doesn’t seem to export UV animations, either to glTF or Babylon formats.
Even when Babylon do export UV transforms, it ignores it when they are animated.
I have this MAYA scene with some boxes stretching in an animation, and UVs stretched to in order to not deform the texture applied.
I guess that is NOT supported at all by neither of the two formats, but wanted to be sure by asking here.
May you give a sight to the scene, please?
Thanks in advance.
ArmariosCompletos_PuertasDeslizantes.zip (17.9 KB)
Hmmm I haven’t used Maya before but I do know that GLTF doesn’t support some UV transformations, namely any U,V rotation
I’ll assign Patrick here but he’s on a well deserved break so it will be a bit before he can see this
Well, as I said in first post, I know glTF doesn’t support UV transformation, but .babylon does indeed.
…, but not animated ones, as far as I can see.
Cheers.
Babylon does support the uv scale offset animations at runtime but not sure the maya exporter does Maybe you could have a look at the blender exporter if @JCPalmer confirms the anim would be supported there ?
I do not even need a look. Material animations are not exported. Only mesh (pos/rot/scale & morph), light, camera, & skeleton. Pretty much any property could be animated on both sides, but I have no intention to expand.
I do all my own animation, including IK, at runtime, and am building an animation studio in JS just like Blender. Not shipping the stuff. Animation can be bulky & has too long a supply line, especially for skeletons & expressive speech. Cannot imagine having to re-export just to change dialog. IK cannot be exported at all, and it is massively more compact than the alternative. Sorry.
coool, good to know !!! thanks a lot
@joie, you will be hard pressed to find a direct path for animating values beyond what is supported in glTF. There are some things that the .babylon format will support beyond what is available in glTF, but as you can see not everything is available (like animated UVs) and we do not have the ability to fund development on the exporters to expand the format. What I would suggest is a workaround if you need to do the animation in Maya, though the easiest would be to just do the animation in js/ts.
You have a couple of options for animating UVs from a Maya curve, both will use a similar technique.
- If you create a locator (empty in Blender) in Maya, this will export as a transform with no mesh component in glTF, but this is exactly what we need to hold the curve data. You can add set driven keys to connect the position of the locator and the UV offsets of your material. Then by animating position of the locator, you will animate the UVs of the material. You set up all the animation you want to do for your UVs on the locator and then export as normal to glTF. The set driven keys will not export as that connection only resides in Maya as a way to visualize your animation. But then you set up your js to pass the position - in this example position X driving U and position Z driving V - of the locator to the UV offsets of the material’s texture. This embeds the animation curve in the glTF right along with the rest of your asset in as minimal a way as possible living as a simple transform with animation data.
- The second method would be very similar to the first, except you either animate the locator in a stand-alone file so it is not a part of your original asset geometry. You can place stand in assets to visualize the animation being driven if needed, but essentially you want to separate this animation from the main asset. You then export only the locator with animation into a separate glTF file. This allows you to keep your animation separate from the main asset. You would want to do this if you have several people working on your assets allowing one to be working on the main asset and another to be working on animation at the same time. This would also be good to allow you to be able to easily change the animation without touching the original asset. You would simply load the animation glTF separately from the main asset, but the connection in code would be exactly the same.
The main reason to pick one method or the other would be driven by your asset. If this is something that is unlikely to need new animations or changes to animations, keeping everything in one glTF will be easier to manage in code. If you see a future where your asset may need tweaks to animation from time to time or you see the possibility of expanding to more animations in the future, you may want to split the animation from the main asset. I try to avoid reexporting an entire asset when one part needs to change because you can introduce errors every time the asset is exported especially if you come back to the asset after time has passed.
I hope this helps, but please let me know if you have any other questions.
Thank you @PatrickRyan for your in depth help.
As far as I understand your method, it is done on a per material basis, and that’s not what we need.
Because you know every single material and texture end up being a drawcall, and we must have the less of them we can.
So, the trick would be to use the locator to scale the actual UVs of the object, not the material. That way, se could potentially have just ONE material that would appear differently in each object, and we have dozens of them.