8000 Question regarding instantiated meshes · Issue #137 · jpcy/xatlas · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Question regarding instantiated meshes #137

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

Open
sigvald opened this issue Sep 4, 2024 · 1 comment
Open

Question regarding instantiated meshes #137

sigvald opened this issue Sep 4, 2024 · 1 comment

Comments

@sigvald
Copy link
sigvald commented Sep 4, 2024

Regarding instantiated meshes like in this scene that contains 2 instances of the cube object, I am surprised to see that there are 12 faces in the generated UV map. I would have instead expected only 6 faces because the same mesh is present twice.

This is just a test scene but the models I plan to work with will be much more complex and if XAtlas doesn't take instantiation into account then I can expect huge UV maps that would hinder performances.

Is there something I'm missing?

Thank you for your help.

InstantiatedScene

@siliconvoodoo
Copy link

if you're making a mega texture, a shadowmap or a lightmap, you need instances to have duplicated packings. Either this works by fully duplicating the geometry to have a UV[1] channel unique per instance.
Either you've got to parameterize mesh by mesh, each mesh going to get UV[1] between 0,0 and 1,1.
And then use a RECT per instance, to place each instance in a different region of the final atlas. In that case I don't know how the packing works, I'm not sure xatlas supports it.

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
0