-
Notifications
You must be signed in to change notification settings - Fork 44
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
AnimationPointerUVs #115
AnimationPointerUVs #115
Conversation
This model tests UV transform animations with `KHR_animation_pointer` for position, scale, and rotation.
"rotate" changed to "rotation"
"target": { | ||
"extensions": { | ||
"KHR_animation_pointer": { | ||
"pointer": "/materials/23/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/rotation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few of these transmissionTexture
pointers that point to properties that don't exist.
/animations/0/channels/38/extensions/KHR_animation_pointer/pointer: Invalid pointer (/materials/23/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/rotation) skipped
/animations/0/channels/40/extensions/KHR_animation_pointer/pointer: Invalid pointer (/materials/22/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/scale) skipped
/animations/0/channels/42/extensions/KHR_animation_pointer/pointer: Invalid pointer (/materials/21/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/offset) skipped
/animations/0/channels/44/extensions/KHR_animation_pointer/pointer: Invalid pointer (/materials/20/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/rotation) skipped
/animations/0/channels/46/extensions/KHR_animation_pointer/pointer: Invalid pointer (/materials/19/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/scale) skipped
/animations/0/channels/48/extensions/KHR_animation_pointer/pointer: Invalid pointer (/materials/18/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/offset) skipped
This looks fancy in Babylon.js. (Some look like they are not animated - probably not all properties are supported there yet?). More out of curiosity: Is the labeling 'U Tiling / V Tiling' intentional, instead of 'U Scale / V Scale'? |
The labels are for the UI labels in the 3ds Max source, to help the developers of the glTF exporter I am using. When this asset is closer to completion, I will probably rename the labels to match glTF conventions. Should I change the meshes into instances? In 3ds Max it’s possible to assign a separate material to each instance, but I’m not sure if this is possible in glTF? |
The geometry data of the spheres is indeed duplicated. So one could probably squeeze out a few bytes with intancing or plainly sharing the |
I have a question about properties sharing UVs. The baseColor texture and the alphaMode texture must use the same texcoord and the same uv transforms (KHR_texture_transform), because they are loaded using a single baseColorTexture Property per material (there can’t be two baseColorTextures in a single material). Similarly, the metallic texture and the roughness texture must use the same texcoord and the same uv transforms, because they are loaded using a single metallicRoughnessTexture property per material (there can’t be two metallicRoughnessTextures in a single material). However… occlusion uses a separate Property from metallicRoughness, and occlusion may use the same bitmap, or it may use a separate bitmap. If the occlusionTexture uses the same index as the metallicRoughnessTexture, does this mean they must only use the same texcoord and the same uv transforms? What about other textures with separate Properties but packed color channels? sheenColorTexture.rgb and Would the general rule be that if two or more Properties share the same Index, then they must specify the same texcoord and transforms? |
There's no rule here. Each texture slot may have its own UV set and transforms. |
Thanks Alexey. What do you mean by texture slot? The texture Index? or the texture Property? |
I would think of it as a material having the following texture "slots" —
These slots ("textureInfo" in spec language) might point to the same or different textures, identified by indices. Each slot may select its UV set and UV transforms independently of the others, even if two slots point to the same texture. Because there is no glTF concept of an alphaTexture slot at all, it cannot be separated from baseColorTexture. Whereas sheenColorTexture and sheenRoughnessTexture are separate slots (even if they could optionally point to the same texture) and so their UVs and UV transforms may be separated. Some engines may be less flexible in supporting all of these permutations, of course. :) |
Animation added for all the available texture slots. New texture set. Normal and Anisotropy textures have been normalized. PNGs for textures with alpha channels or containing vector data, JPGs for the rest. Cameras added.
I can't fix the Errors or Warnings, these seem to be caused by lack of support in glTF Validator for the ratified extension KHR_animation_pointer. |
Added a flat 4x4 pixel normalTexture to the clearcoat materials, to resolve validator Errors. A normalTexture is required to generate the tangent space for the clearcoatNormalTexture if the model does not include the tangents.
The new glTF file is camelCase but the folder name is PascaleCase. I'll try correcting this. |
Wiping out the existing assets, so I can force the case to PascaleCase. GitHub Desktop is not recognizing the changes I've made to the cases.
Renamed all assets and URIs to use PascaleCase, to match the repo folder name, and hopefully resolve build errors.
This model tests UV transform animations with KHR_animation_pointer for position, scale, and rotation.
[edit: updated screenshots]