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

USDZExporter: Modulate diffuse map #21872

Merged
merged 10 commits into from
May 27, 2021
Merged

Conversation

kolodi
Copy link
Contributor

@kolodi kolodi commented May 21, 2021

Related issue: #21871

A material can have a color different from white. Color is rendered on top of existing map (diffuse).
Initially I was thinking to use the bias input for Texture Reader, but unfortunately it does not worl, at least not in QuickLook.

Current solutions is more like a workaround and may be revisited some day.

build/three.js Outdated Show resolved Hide resolved
@mrdoob mrdoob added this to the r129 milestone May 25, 2021
@mrdoob mrdoob changed the title Usdz material color USDZExporter: Modulate diffuse map May 27, 2021
@mrdoob mrdoob merged commit ec14f78 into mrdoob:dev May 27, 2021
@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

Ended up refactoring the code quite a bit: afb032b

@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

This commit may shows better the implementation: 2ceaad9

@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

Also, turns out I had broken USDZExporter here: 14fab09
Took me quite a few hours to figure out the fix: a09a704?w=1

@kolodi kolodi deleted the usdz-material-color branch May 27, 2021 18:12
@kolodi
Copy link
Contributor Author

kolodi commented May 27, 2021

Very good. Next step - fix broken ao map ;-)

@kolodi
Copy link
Contributor Author

kolodi commented May 27, 2021

See my other comments in 2ceaad9

@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

Very good. Next step - fix broken ao map ;-)

Yeah. Not sure how to fix that. As far as I understand USDZ only supports 1 uv channel.

@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

By the way, there are a lot of tricks here:

https://github.com/google/usd_from_gltf#emulated-functionality-for-ar-quick-look

@kolodi
Copy link
Contributor Author

kolodi commented May 27, 2021

By the way, there are a lot of tricks here:

https://github.com/google/usd_from_gltf#emulated-functionality-for-ar-quick-look

Quite dated. For example, they ended up scaling textures to "simulate" tiling...

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.

3 participants