You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per glTF 2.0 specification signed 32-bit integers are not supported, so a perfect mapping between Blender types and glTF types is not possible for Integer. This case is subjective as to what the exported type should be.
However for 8-Bit Integers this is unexpected, as glTF should export with type 5120 (signed byte).
The text was updated successfully, but these errors were encountered:
Note that glTF attributes must be aligned to four byte boundaries, so an int8 attribute would need to be packed as {byte value; byte padding[3];} and have the appropriate byteStride set.
Note that glTF attributes must be aligned to four byte boundaries, so an int8 attribute would need to be packed as {byte value; byte padding[3];} and have the appropriate byteStride set.
Wasn't aware of this, thanks for the info. Found it in the spec here: "each element of a vertex attribute MUST be aligned to 4-byte boundaries."
The fallback mechanism to export integers as floats does seem justified, but I'd say doesn't follow the Principle of Least Astonishment (i.e. it is potentially surprising). If would be great if it were documented in the Blender manual.
Describe the bug
A custom attribute with Data Type of Integer or 8-Bit Integer exports with componentType of 5126, i.e. 32-bit floating point.
To Reproduce
Expected behavior
Accessor componentType is an integer type rather than floating point
Screenshots
.blend file/ .gltf (mandatory)
gltf-attribute.zip
Version
Additional context
As per glTF 2.0 specification signed 32-bit integers are not supported, so a perfect mapping between Blender types and glTF types is not possible for Integer. This case is subjective as to what the exported type should be.
However for 8-Bit Integers this is unexpected, as glTF should export with type 5120 (signed byte).
The text was updated successfully, but these errors were encountered: