Issue after model optimization / compression

I have a Unity model that runs fine in the Needle engine as long as no animations are applied.

If I apply animations, everything looks well in the Unity Editor. Also during Play-mode in the Editor all animations look good. But when the model is exported to the Needle Engine, some parts are moved a little bit. As this issue occurs not in the Unity Editor, I have no idea where to start debugging…

This is the (scary) image from the Browser with Needle Engine:

As I am a new User I cannot upload more than one image and show the original picture from the Unity Editor, but as you can see, the hat and the eyes are not in the correct position

Best regards

Hi null,

It sounds like you’re experiencing an export issue with animations in your Unity model using Needle Engine. Here are a few debugging steps you can follow to address the problem:

  1. Check Animation Settings: Verify that your animations are set up correctly in Unity. Sometimes, animations need specific settings, such as root motion or proper clip settings, to work seamlessly when exported.

  2. Export Settings: Ensure you are using the correct export settings in the Needle Engine. If you are using specific export plugins or settings, review those to ensure they are configured to handle animations properly.

  3. Update Needle Engine: Check if you are using the latest version of Needle Engine. The changelog indicates that fixes related to exporting animations have been made in recent versions (see releases). Updating could resolve some compatibility issues.

  4. Hierarchy and Transformations: Sometimes animation issues arise from how the hierarchy and transforms are set up in Unity. Ensure that the hierarchy is clean and that any parent/child relationships are appropriately set before export.

  5. Debugging Animations: Use debug logging in the Needle export script to trace through the animation export process. Look for any discrepancies between how the animations appear in Unity and how they are represented in the exported data.

  6. Inspect the Exported Model: Use the Needle Viewer to inspect the exported model for any errors or warnings related to animations. This could provide insight into what went wrong during the export (see the documentation).

  7. Testing Without Animations: Since you mentioned that models work fine without animations, test with simple animations or reduced animation complexity to isolate whether it’s a specific issue with complex animations.

If you continue to experience issues, please let me know the version of Unity you’re using, as well as the version of Needle Engine, and we can investigate further.

Best regards!

1 replies left - Get a PRO license for more AI replies.
thread_59Z6vk11DnXZuJ44Y0xdTI86
Reply to this message to continue the conversation

Thanks for the hints. There was indeed an issue with the hierarchy. The hat and the eyes were in the top level and not children of the head. After changing the hierarchy everything works fine now. Strange that it worked in Unity…

Hi null,

I’m glad to hear that adjusting the hierarchy resolved the issue with your model! Unity’s handling of hierarchy and transformations can sometimes allow for certain setups to work during play mode but cause problems during export, especially in external engines like Needle.

Understanding the parent-child relationships in your model is crucial, especially for animated components. This can lead to unexpected results if not structured correctly when exported.

If you have any more questions or run into further issues while working with Needle Engine or Unity, feel free to ask. Happy developing!

Best regards!

0 replies left - Get a PRO license for more AI replies.
thread_59Z6vk11DnXZuJ44Y0xdTI86
Reply to this message to continue the conversation

Hey, glad you were able to resolve the issue - would you be able to make a bug report with the scene that demonstrates the issue? Shouldn’t happen

Where can I make a bug report? Is there any online form for bug reports or shall I send the scene to you by email? Changing the hierarchy did not fix the issue completely - there are still differences between the Unity Editor and the exported scene. So it would be great, if someone could have a look at this scene.

You can send a bugreport using the Needle Engine/Report a bug menu item and report with the scene that shows the issue

Thanks, I submitted a bug report. Meanwhile it turned out, that my assumption was wrong that this issue is related to animations.
Actually the behavior is pretty strange. When I hit the Needle play button (to export the scene to the web) and reload the browser page quickly, before(!) the Unity export has finished, then the model is shown correctly. When I wait until Unity shows “Export finished” and reload the browser again, then parts of the model are shifted.
The assumption, that is had something to do with the animations was just based on my timing when I reloaded the page in the browser (loading to early without animations).

Thanks for sending in a report.

What you’re describing sounds a bit like the model breaks/changes during our automatic compression, which would definitely be a bug.

To verify that, can you disable “Auto Compress” on the Export Info component and check if the model then stays ok?

I can confirm, that the issue does not appear if “Auto Compress” is disabled. The model (including animations) remains ok.

1 Like

Just another observation: if you build for production (via the build menu) the issue occurs as well, if you do not select the “Development Build” option. Even if “Auto Compress” is turned off. Maybe for production builds the Auto Compression is always on?

Hello Markus, yes thats true, AutoCompress is basically a preview of the production build assets. Sorry for the inconvenience, we’ll take a look at your bug report asap.

In the meantime what you could also try is to enable AutoCompress again and add the ProgressiveSettings component and then try to disable mesh lods.

Another idea would be adding the Meshcompression component and switching from Draco to Meshopt compression or vice versa or disable mesh compression completely by setting it to None (just for testing purposes)

Related docs:

Hello Markus, could you send another report please? I can not find your report in the system. Please also include a link to this forum post in the description