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

Alembic scene scale ruins the UV mesh resolving #80

Open
Donatoz opened this issue Feb 26, 2024 · 2 comments
Open

Alembic scene scale ruins the UV mesh resolving #80

Donatoz opened this issue Feb 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Donatoz
Copy link

Donatoz commented Feb 26, 2024

Hi, i've encountered an issue while using a texture to sample a strand color.

I'm using .abc file as a source (exported from Blender, with the scale of 100.0) and Root UV option is set to Resolve From Mesh, with the basic mesh provided. The file has the Scale Factor set to 1 (default is 0.01), i.e. it has x100 scale during the import stage.

image
image

Expected result (blender view):
image

Actual result:
image

Seems like alembic scene scale is not considered during the UV resolve process.

Hair shader (all values are set to default expect the base color, which is sampled from the texture using rootUV):
image

Sampling works fine with the file scale set to 0.01, but the hair object appears to be incredibly small in the scene + simulation is unstable.
image

I've found a workaround for the texture to be sampled properly - setting the .abc file scale back to 0.01 and increasing the hair object scale with Strand Scale set to Uniform World Max, but that makes the simulation absolutely unstable, so that won't suffice either.

image

Tested on Unity 2023.2.11f1, package version 0.11.0-exp.1, Alembic package version 2.3.4.

Resources:
ReproFiles.zip

Note that the texture was created using the sphere UV.

I'll try to find the solution, but if you know any other way to import a strand color data, please let me know. Any help would be greatly appreciated!

@fuglsang fuglsang added the bug Something isn't working label Apr 16, 2024
@fuglsang
Copy link
Collaborator

Thank you for attaching repro resources. Will look into this when time permits.

@Kleptine
Copy link

Kleptine commented Jul 26, 2024

I've also noticed that having a rotation applied to the Alembic curves messes this up as well. Presumably because the UV reconstruction doesn't know how to de-rotate it correctly.

Another fix could be for Unity's alembic importer to better support Axis Conversion / rotations coming from DCCs.

edit: In this case I solved it by exporting the meshes with the Alembic file and using those as the source for reconstruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants