Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two objects with linked mesh data and identical modifiers do not cache uniquely #2472

Open
yrns opened this issue Jan 24, 2025 · 2 comments
Open

Comments

@yrns
Copy link

yrns commented Jan 24, 2025

Describe the bug
Two objects with linked mesh data and identical modifiers do not cache uniquely.

To Reproduce
With a new Blender project and just the default cube, add a bevel modifier, and then duplicate the cube with Alt+D. Export with modifiers applied.

Expected behavior
I would hope this exports two nodes and one mesh, but I get two distinct meshes. I believe this is because identical modifier stacks hash to different values (maybe because id_data is different?) Maybe my expectations are wrong.

.blend file/ .gltf (mandatory)
untitled.zip

Version

  • OS: linux
  • Blender 4.3.2
@scurest
Copy link
Contributor

scurest commented Jan 24, 2025

Note that objects with identical modifier stacks (including identical options on all modifiers) do not necessarily produce identical meshes. The modifiers are properly to the object, not to the mesh.

For example, a Mirror modifier with a mirror object depends on the relative position of the modified object to the mirror object. Objects in different positions but with the same linked mesh will have different results.

@yrns
Copy link
Author

yrns commented Jan 25, 2025

Interesting, thanks for the insight. In theory, if you had a list of known modifiers that referred to object properties, you could do some kind of equivalence test on modifier stacks that accounted for those problem modifiers? At that point, though, maybe you'd be better off just comparing the final evaluated mesh data directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants