Do the 2024 Blender tools now support UV animations?
Im trying to make tyres in the new SDK but I cant get them to rotate. I am not sure if it’s me or if UV animations still aren’t supported with the blender tools.
I’ve been told this isn’t possible in Blender. It would be great to be able to, as most of the community is using Blender at this point.
No, Blender Exporter (2020 or 2024) does not support animated UVs.
Therefore, you can’t do bone armatures on the tire mesh and “fake” rotation through animated UVs. If you try to physically animate the tire with the bone animation, it won’t stay on the ground and will look strange rotating around the tire. So for now, not available using official documented methods.
Thanks for the info! Guess im learning Max to export the gear
Hello,
The MSFS2024 Blender exporter does support animated UV in materials, you just need to animate the supported material propreties (Offset U/V - Tiling U/V - UV Rotation - Metallic - Roughness - Wear Amount - Wiper 1 State) in an action or in the blender timeline (see the attached example) and export your mesh and animations with the multi-exporter.
Thank you !
Big news thanks!
That’s great news, however I’m still experiencing major issues with Decals, Draw Orders, Vertex Colors, Detail Textures, Comp Texture Exporting, and Masking. So the new Exporter is unstable in it’s current state. So, these new features are still on the backburner. As-Is, if you just build your new project with 2024 Exporter, even after rebuilding your materials, it yields too many visual oddities to be useable.
2020 Exporter vs 2024 Exporter:
If I’m not setting something up right, please let me know. But I’m simply using a model with the same material .pngs as the Official 2020 Exporter. For extra precaution, I’ve also rebuilt these materials using the new Exporter but the same data parameters in Blender from 2020, like Opacity Values or Roughness Values… The results just aren’t usable yet. If you need more information, please let me know and I’ll do my best.
In that case, i’m having a bit of trouble seeing the UV animation in game. I’ve animated UV offset V so the tyre “rotates” in blender, and used the supplied template. But I’m not seeing any movement. The rim also uses the same animation name ‘c_gear_rolling’ and it displays fine, but as the rim moves the tyre remains static.
could this be a bug? or an issue with my implementation.
Hello @Jonx,
Can you open a separate bug about these bugs ? and maybe send us your exported models to se what could have been done wrong in your case ?
Thank you !
Hello,
Can you send us your exported gltf file ? In your case, have selected the NLA tracks animation mode in the export settings ?
Thank you
I did try with NLA tracks animation mode, it exports and builds, but after export all the animations are deleted in Blender and I have to close and reopen the file back to before export. Not sure if that’s expected behaviour either.
Sent PM to private content with link to exported GLTF
have you had any time to look into this? advice on if its user error, or not possible would be great.
SDK 1.0.1 now puts the UV animation properties into the GLTF, but also adds an empty NLA track to the object with a UV animation. The sim then refuses to build it with this error
GLTFValidator | Found in A:\MSFSDEVFILES2024\FU-24-950_954\PackageSources\SimObjects\Airplanes\fu24-950-954\attachments\aerialsim\F_Gear\Model\FU24_950_F_Gear.gltf - c_gear_rolling: sampler index out of bound, the animation does not contains a sampler for the index specified , ignoring extension ASOBO_property_animation
I was looking into material animations and also found that the exporter has a small defect with how it writes the sampler index in the properties of the ASOBO_property_animation extension.
It seems that there are only two samplers created but the index gets written as 2 instead.
channels: [ { "sampler": 2, "target": "materials/2/extensions/ASOBO_material_UV_options/UVOffsetV" } ]
In the finalize_material_animation method of asobo_property_animation.py, it has this line: sampler_index = len(gltf2_animation.samplers) + 1
With this correction, the material animation does seem to work correctly from my brief testing. I hope this helps because this feature is very useful and a welcome addition to the Blender exporter.
What is the correction? that line is already there.
@staticmethod
def finalize_material_animation(gltf2_animation, material_animation, gltf2_plan = None):
sampler_index = len(gltf2_animation.samplers) + 1
if not gltf2_animation.extensions:
gltf2_animation.extensions = {}
remove the +1??
OK, a simple cube with a UV offset U and UV Offset_V animation -
edit : seems to work but yes there is an extra count?
The 3DS code does not have the + 1 so my guess is remove the + 1
{
if (!exporter.materialToGltfMaterialMap.TryGetValue(babylonMaterial, out GLTFMaterial gltfMaterial)) return gltfObject;
int samplerIndex = gltfAnimation.SamplerList.Count;
AddParameterSamplerAnimation(babylonMaterial, gltfAnimation, exporter, gltf, animationExtensionInfo.startFrame, animationExtensionInfo.endFrame);
GLTFExtensionAsoboPropertyAnimation gltfExtension = new GLTFExtensionAsoboPropertyAnimation();
That’s right. Removing the +1 so it sets the index correctly. I’m not sure the purpose exactly, so it may be needed in some cases.
It seems like it needs to add an extra sampler for the channel target but it’s the second sampler that drives the material property.
There was another minor issue. When creating multiple materials with animation, I would see some of the animations pick up the incorrect keyframe data and export some of the UV samplers to VEC4 instead of SCALAR values.
I made a change in the add_placeholder_channel method to give a unique name to the placeholder action. Since this is added to bpy.data.actions, I feared this might possibly affect other actions being gathered.
These edits are not fully tested so I am only trying to solve my own problems but I thought it was worth sharing the information.
# temp_action = bpy.data.actions.new(name="placeHolderAction")
temp_name = "placeHolderAction" + str(len(bpy.data.actions))
temp_action = bpy.data.actions.new(name=temp_name)
The 1.3.1 version of the Blender Addon
Hello,
I will remove the +1, this must be a mistake, we apologize for that. I will fix it and you will get it in the next Core SDK 2024 Update.
Thank you for your report,
Yasmine