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

fixing material pipeline builder failure caused by relative texture references #17139

Conversation

gadams3
Copy link
Contributor

@gadams3 gadams3 commented Nov 29, 2023

What does this PR do?

Discovered material type builder issue while testing material canvas transparency support with models and textures provided by user.

Created a material graph, with a textured 2D node that reference a texture in the same folder as the model and material graph. Material canvas generated a material type with a texture reference in the same folder. The material builder processed the abstract material type and created the final material type in the intermediate asset folder with the same relative texture reference. The texture does not exist in the intermediate asset folder and caused the builder to fail because it could not resolve the file.

This change forces the material type builder to convert the texture reference paths into alias paths before saving the final material type so that they can be properly resolved.

How was this PR tested?

Followed same steps as described above, creating a material graph with a texture node that referenced a texture in the same folder as itself and the generated material type.

Before the change material type failed to build in the AP.
After the change, material type successfully built in the AP and displayed the correct texture when loaded.

@gadams3 gadams3 requested review from moudgils, VickyAtAZ, lsemp3d and a team November 29, 2023 19:12
…erence paths to aliases so they can be resolved with the final material type.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
@gadams3 gadams3 force-pushed the gadams3/fix_material_pipeline_texture_references branch from 4ce009f to 8fbcfd6 Compare November 30, 2023 21:08
@gadams3 gadams3 merged commit d9be8d0 into o3de:point-release/23101 Dec 1, 2023
3 checks passed
@gadams3 gadams3 deleted the gadams3/fix_material_pipeline_texture_references branch December 1, 2023 02:11
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

Successfully merging this pull request may close these issues.

None yet

3 participants