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

Support multiple UV coords #1

Closed
dlannan opened this issue Feb 2, 2022 · 2 comments
Closed

Support multiple UV coords #1

dlannan opened this issue Feb 2, 2022 · 2 comments

Comments

@dlannan
Copy link
Owner

dlannan commented Feb 2, 2022

Based on discussion here with Ivan_Lytkin:
https://forum.defold.com/t/building-a-sync-tool-for-blender-to-defold/69920

Potentially add a new stream for texcoord1 in the buffer files.
This could allow multiple coord access in the material.

To be tested.

@dlannan
Copy link
Owner Author

dlannan commented Feb 5, 2022

Did some tests and have added some code for handling extra uv's.
Currently its quite unstable - determining the uvs for the second channel is a little tricky.

May need to have specific requirements for Blender to be able to use multi-layer uvs. Ie: Only two material layers, and they need to be specifically mapped to channel 1 and 2. Or something like that.

@dlannan
Copy link
Owner Author

dlannan commented Feb 26, 2022

I have added a single combined texture as per Khronos gltf pbr material spec:
https://www.khronos.org/blog/art-pipeline-for-gltf
The simple pbr material provided now has a combined AO + metallic + roughness texture that should allow applying shadowmaps individually to objects (per object shadow maps) and with modifications in Defold using the new second stream, global shadow maps as well.
This is not an ideal setup, and I expect there will be many different ways to solve this.
The method provided here is to minimise changes needed on the Defold user side, to have an "instant" working solution, rather than a fully featured solution.

@dlannan dlannan closed this as completed Feb 26, 2022
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

1 participant