From 9b1b390c73baa214b60784068d75d9a6941b7ae4 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 2 Jan 2025 10:48:54 -0800 Subject: [PATCH] [WIP] OMI_materials_blend --- extensions/2.0/OMI_audio_ogg_vorbis/README.md | 6 +- extensions/2.0/OMI_audio_opus/README.md | 6 +- extensions/2.0/OMI_materials_blend/README.md | 126 ++++++ .../examples/cubes/omi_mat_blend.gltf | 399 ++++++++++++++++++ .../examples/cubes/omi_mat_blend.gltf.import | 36 ++ .../examples/cubes/omi_mat_blend0.bin | Bin 0 -> 6120 bytes .../material.OMI_materials_blend.schema.json | 32 ++ 7 files changed, 595 insertions(+), 10 deletions(-) create mode 100644 extensions/2.0/OMI_materials_blend/README.md create mode 100644 extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf create mode 100644 extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf.import create mode 100644 extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend0.bin create mode 100644 extensions/2.0/OMI_materials_blend/schema/material.OMI_materials_blend.schema.json diff --git a/extensions/2.0/OMI_audio_ogg_vorbis/README.md b/extensions/2.0/OMI_audio_ogg_vorbis/README.md index ed395d5..c572fe9 100644 --- a/extensions/2.0/OMI_audio_ogg_vorbis/README.md +++ b/extensions/2.0/OMI_audio_ogg_vorbis/README.md @@ -76,11 +76,7 @@ Audio data can also be stored in a buffer, such as in the glTF Binary (.glb) for } ``` -### JSON Schema - -[KHR_audio_emitter.source.OMI_audio_ogg_vorbis.schema.json](schema/KHR_audio_emitter.source.OMI_audio_ogg_vorbis.schema.json) - -## Best Practices +### Best Practices Ogg Vorbis has similar use cases to MP3. Both are lossy audio compression formats that are widely supported. Ogg Vorbis should be preferred to MP3 when delivering audio data to clients that support loading Ogg Vorbis audio data from `OMI_audio_ogg_vorbis`. diff --git a/extensions/2.0/OMI_audio_opus/README.md b/extensions/2.0/OMI_audio_opus/README.md index 6b2b039..31ac4fc 100644 --- a/extensions/2.0/OMI_audio_opus/README.md +++ b/extensions/2.0/OMI_audio_opus/README.md @@ -78,11 +78,7 @@ Audio data can also be stored in a buffer, such as in the glTF Binary (.glb) for } ``` -### JSON Schema - -[KHR_audio_emitter.source.OMI_audio_opus.schema.json](schema/KHR_audio_emitter.source.OMI_audio_opus.schema.json) - -## Best Practices +### Best Practices Opus codec audio is a superior format to MP3 and Ogg Vorbis for their intended use cases, and it is suitable for many use cases traditionally suitable to WAV audio. Opus is a lossy audio codec that is more efficient than MP3 and Ogg Vorbis, with a higher quality for the same file size, or a smaller file size for the same quality. diff --git a/extensions/2.0/OMI_materials_blend/README.md b/extensions/2.0/OMI_materials_blend/README.md new file mode 100644 index 0000000..a651c1c --- /dev/null +++ b/extensions/2.0/OMI_materials_blend/README.md @@ -0,0 +1,126 @@ +# OMI_materials_blend + +## Contributors + +- Aaron Franke, Godot Engine. +- Andy Baker, Icosa Foundation. + +## Status + +Open Metaverse Interoperability Group Draft Proposal + +## Dependencies + +Written against the glTF 2.0 spec. + +## Overview + +This extension allows glTF materials to have more alpha blending modes, which can control the transparency and background composability of the material. The `OMI_materials_blend` extension may be used alongside the base glTF PBR materials, or materials defined in glTF extensions. When combined with other materials and techniques, blending may be used to achieve effects like fire, steam, or holograms. + +A client that does not implement this extension can ignore the provided material blending settings and use the base glTF material blending settings. When the base glTF alpha blend mode is an acceptable fallback, this extension should not be present in `extensionsRequired`. This will allow clients that do not `OMI_materials_blend` to display the model with the base glTF transparency settings. + +## glTF Schema Updates + +The `OMI_materials_blend` extension can be added to the extensions of an object in the glTF document-level `"materials"` array. + +The following example defines a fire material using the `"ADD"` alpha blend mode. It has a fallback of `"MASK"` so that clients without support for `OMI_materials_blend` will see a cutout instead. + +```json +{ + "materials": [ + { + "alphaMode": "MASK", + "alphaCutoff": 0.25, + "doubleSided": true, + "extensions": { + "OMI_materials_blend": { + "alphaMode": "ADD" + } + }, + "name": "Fire" + } + ] +} +``` + +### Property Summary + +| | Type | Description | Default value | +| ------------------- | --------- | ---------------------------------------------------------------------- | ------------------------------- | +| **alphaMode** | `string` | The alpha blend mode to use. Override for the base glTF `"alphaMode"`. | Use glTF material `"alphaMode"` | +| **alwaysUseCutoff** | `boolean` | If true, always use the glTF `"alphaCutoff"` as a clip mask. | false | + +### Alpha Mode + +The `"alphaMode"` property is a lowercase string that defines how the material should be blended with the background. This value must be specified, there is no default value. This overrides the base glTF material's `"alphaMode"` property. + +The following values are allowed: `"BLEND"`, `"HASH"`, `"PREMULT"`, `"MULTIPLY"`, `"ADD"`, `"SUBTRACT"`, `"REV_SUBTRACT"`, `"MAX"`, `"MIN"`. + +- The `"BLEND"` mode is the same as the base glTF `"BLEND"` mode, which exists to allow for using the `"alwaysUseCutoff"` property with `"BLEND"`. Meaning, if this extension is supported, `"BLEND"` with `"alwaysUseCutoff": true` will have the behavior of base glTF `"BLEND"` and `"MASK"`, both at the same time. +- The other modes are new and are not present in the base glTF specification. + +The following table lists the alpha blend modes added by this extension along with the base glTF alpha blend modes and the corresponding modes in various engines. + +| glTF | Unity | Unreal | Godot | Blender | OpenGL | Three.JS | WebGPU | +| ------------------------ | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------ | ----------------------- | ------------------ | +| Base glTF "OPAQUE" | Opaque | Opaque | DISABLED | Dithered without socket | | | | +| Base glTF "MASK" | Alpha Clipping | Masked | ALPHA_SCISSOR | Dithered with socket | | | | +| Base glTF "BLEND" | Alpha Blend | Translucent | ALPHA_DEPTH_PRE_PASS | Blended | | | | +| Extension "HASH" | Not supported | Not supported | ALPHA_HASH | | | | | +| Extension "PREMULT" | Premultiplied Alpha | Alpha Composite | BLEND_MODE_PREMULT_ALPHA | | | | | +| Extension "MULTIPLY" | Multiplicative | Modulate | BLEND_MODE_MUL | Multiplicative Setup | | | | +| Extension "ADD" | Additive | Additive | BLEND_MODE_ADD | Additive Setup | GL_FUNC_ADD | AddEquation | "add" | +| Extension "SUBTRACT" | | | BLEND_MODE_SUB | | GL_FUNC_SUBTRACT | SubtractEquation | "subtract" | +| Extension "REV_SUBTRACT" | | | Not supported | | GL_FUNC_REVERSE_SUBTRACT | ReverseSubtractEquation | "reverse-subtract" | +| Extension "MAX" | | | Not supported | | GL_MAX | MaxEquation | "max" | +| Extension "MIN" | | | Not supported | | GL_MIN | MinEquation | "min" | + +The behavior of each mode is as follows: + +| Name | Description | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| "OPAQUE" | Fully opaque, not transparent. The alpha value is ignored. Default and fastest to render. | +| "MASK" | The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value. | +| "BLEND" | The rendered output is combined with the background using the "over" operator as described by the base glTF specification. | +| "HASH" | Useful for hair rendering. Cuts off all values below a spatially-deterministic threshold, the rest will remain opaque. | +| "PREMULT" | Similar to "BLEND" expect the source fragment is assumed to have already been multiplied by the source alpha value. | +| "MULTIPLY" | The color of the object is multiplied by the background. | +| "ADD" | The color of the object is added to the background. | +| "SUBTRACT" | The color of the object is subtracted from the background. | +| "REV_SUBTRACT" | The color of the background is subtracted from the object. | +| "MAX" | The maximum of the object color and the background color is used. | +| "MIN" | The minimum of the object color and the background color is used. | + +The most common and important new mode added by this extension, not including ones in the base glTF specification, is the `"ADD"` alpha blend mode. This mode is used for many effects, and is highly recommended to be supported by implementations, or else most `OMI_materials_blend` materials will not render correctly. + +### Always Use Cutoff + +The `"alwaysUseCutoff"` property is a boolean that defines whether the glTF `"alphaCutoff"` should always be used as a clip mask. This property is optional and defaults to `false`. + +The base glTF specification uses the `"alphaCutoff"` property only when the `"alphaMode"` is set to `"MASK"`. However, there is no way to use both `"BLEND"` and a clip mask at the same time. This extension allows for using both at the same time, by setting `"alphaMode"` to `"BLEND"` and `"alwaysUseCutoff"` to `true`. The `"alwaysUseCutoff"` property MUST NOT be set when this extension's `"alphaMode"` is not set and the base glTF specification's `"alphaMode"` is `"OPAQUE"` or `"MASK"` to avoid redundancy with the way the base glTF specification handles these modes. + +When `"alwaysUseCutoff"` is true, alpha values below the `"alphaCutoff"` value will be treated as fully transparent, and alpha values above the `"alphaCutoff"` value will be treated as the selected alpha mode (ex: `"BLEND"`, `"ADD"`, etc). + +### glTF Object Model + +This extension defines no properties that can be read or manipulated by the glTF Object Model. + +### JSON Schema + +See [schema/material.OMI_materials_blend.schema.json](schema/material.OMI_materials_blend.schema.json) for the schema. + +## Known Implementations + +None + +## Resources + +- Khronos glTF Alpha Coverage https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#alpha-coverage +- Khronos OpenGL blend equations https://www.khronos.org/opengl/wiki/Blending#Blend_Equations +- ICOSA UnityGLTF transparency discussion https://github.com/icosa-mirror/UnityGLTF/issues/1 +- Unity blend shader command https://docs.unity3d.com/Manual/SL-Blend.html +- Unreal material blend modes https://dev.epicgames.com/documentation/en-us/unreal-engine/material-blend-modes-in-unreal-engine#alphaholdout +- Godot BaseMaterial3D transparency https://docs.godotengine.org/en/stable/classes/class_basematerial3d.html#enum-basematerial3d-transparency +- Godot BaseMaterial3D blend mode https://docs.godotengine.org/en/stable/classes/class_basematerial3d.html#enum-basematerial3d-blendmode +- Three.JS blending equations https://threejs.org/docs/#api/en/constants/CustomBlendingEquations +- Visual glBlendEquation tool https://www.andersriggelsen.dk/glblendfunc.php diff --git a/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf b/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf new file mode 100644 index 0000000..2b3f3b7 --- /dev/null +++ b/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf @@ -0,0 +1,399 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525925472, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 2, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 3, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 4, + "byteOffset": 0, + "componentType": 5123, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 5, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 6, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525925472, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 7, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 8, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 9, + "byteOffset": 0, + "componentType": 5123, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 10, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 11, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525925472, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 12, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 13, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 14, + "byteOffset": 0, + "componentType": 5123, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 15, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 16, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525925472, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 17, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 18, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 19, + "byteOffset": 0, + "componentType": 5123, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 20, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 21, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525925472, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 22, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 23, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 24, + "byteOffset": 0, + "componentType": 5123, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + } + ], + "asset": { + "generator": "Godot Engine v4.3.stable.official@77dcf97d82cbfe4e4615475fa52ca03da645dbd8", + "version": "2.0" + }, + "bufferViews": [ + { "buffer": 0, "byteLength": 288, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 288, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 960, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 1152, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 1224, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 1512, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 1896, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 2184, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 2376, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 2448, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 2736, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 3120, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 3408, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 3600, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 3672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 3960, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 4344, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 4632, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 4824, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 4896, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 5184, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 5568, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 5856, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 6048, "target": 34963 } + ], + "buffers": [{ "byteLength": 6120, "uri": "omi_mat_blend0.bin" }], + "extensionsUsed": ["OMI_materials_blend"], + "materials": [ + { + "alphaMode": "BLEND", + "extensions": { "OMI_materials_blend": { "alphaMode": "HASH" } }, + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "extensions": { "OMI_materials_blend": { "alphaMode": "ADD" } }, + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "alphaCutoff": 0.25, + "alphaMode": "MASK", + "extensions": { "OMI_materials_blend": { "alphaMode": "ADD", "alwaysUseCutoff": true } }, + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "extensions": { "OMI_materials_blend": { "alphaMode": "SUBTRACT" } }, + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "extensions": { "OMI_materials_blend": { "alphaMode": "MULTIPLY" } }, + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + } + ], + "meshes": [ + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, + "indices": 4, + "material": 0, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, + "indices": 9, + "material": 1, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, + "indices": 14, + "material": 2, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 17, "POSITION": 15, "TANGENT": 16, "TEXCOORD_0": 18 }, + "indices": 19, + "material": 3, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 22, "POSITION": 20, "TANGENT": 21, "TEXCOORD_0": 23 }, + "indices": 24, + "material": 4, + "mode": 4 + } + ] + } + ], + "nodes": [ + { "children": [1, 2, 3, 4, 5], "name": "OMIMaterialsBlend" }, + { "mesh": 0, "name": "Hash", "translation": [-3, 0, 0] }, + { "mesh": 1, "name": "Add", "translation": [-1.5, 0, 0] }, + { "mesh": 2, "name": "AddAndScissorClipMask" }, + { "mesh": 3, "name": "Subtract", "translation": [1.5, 0, 0] }, + { "mesh": 4, "name": "Multiply", "translation": [3, 0, 0] } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf.import b/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf.import new file mode 100644 index 0000000..4a311e3 --- /dev/null +++ b/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend.gltf.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bli0exbvummt3" +path="res://.godot/imported/omi_mat_blend.gltf-1efa9f950d20e3c92cd7852a1c1328c3.scn" + +[deps] + +source_file="res://examples/omi_materials_blend/gltf/omi_mat_blend.gltf" +dest_files=["res://.godot/imported/omi_mat_blend.gltf-1efa9f950d20e3c92cd7852a1c1328c3.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend0.bin b/extensions/2.0/OMI_materials_blend/examples/cubes/omi_mat_blend0.bin new file mode 100644 index 0000000000000000000000000000000000000000..ca8ac8b16b73ebd5288edfaed320c0c6c9c0f9da GIT binary patch literal 6120 zcmeH~TXNJe5Jfu>2yc=AVGk?We@m=rBjrW6S{px+&*T437(|k|k?IUe-u@#@!H?6IIsjvG5yscg7?X-Le`9|FA z`Shpl!{^iK@7NEm9y3;k@7jF#+B~ZskC~qH_WE;DwK=y_^}gO)b#9;M=--QWzm{8j z<4xb%d)IgN)^7ZM=laDy*$2OWbNyo5CZ4}Smc>eu4Im}6w7 z8da3>POQn{Vya={QI#*lrxugq5xEwFD`4W%=qX3>bBIgbujJa#o>ym6y|d5PxcIL3 zW%~Q=ecRW+_IT5LPvh+)ZF8{|pVv37?Yhnv@V0gvomcftJI6WZv&1OL;t{zPgDYU- z(&#Bi@pFhv-LK@wId+_5VGpeP!S~0S$9)obd*V39j{hs!69oH2xfB*7a`NouTF*=I z$)%oG^00?1eyn%)`5G7B^}bBMD|+Ad^{+kNG~d&B`$*edY{lpGO>4WZ^98)E-EofX He2)DG*S<=v literal 0 HcmV?d00001 diff --git a/extensions/2.0/OMI_materials_blend/schema/material.OMI_materials_blend.schema.json b/extensions/2.0/OMI_materials_blend/schema/material.OMI_materials_blend.schema.json new file mode 100644 index 0000000..d2b88da --- /dev/null +++ b/extensions/2.0/OMI_materials_blend/schema/material.OMI_materials_blend.schema.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "material.OMI_materials_blend.schema.json", + "title": "OMI_materials_blend glTF Material Extension", + "type": "object", + "description": "glTF extension to specify the transparency alpha blending mode of a material.", + "allOf": [{ "$ref": "glTFProperty.schema.json" }], + "properties": { + "alphaMode": { + "type": "string", + "description": "The alpha blend mode to use. Override for the base glTF `alphaMode`.", + "enum": [ + "BLEND", + "HASH", + "PREMULT", + "MULTIPLY", + "ADD", + "SUBTRACT", + "REV_SUBTRACT", + "MAX", + "MIN" + ] + }, + "alwaysUseCutoff": { + "type": "boolean", + "description": "If true, always use the glTF `alphaCutoff` as a clip mask. When true, alpha values below the cutoff will be treated as fully transparent, and alpha values above the cutoff will be treated as the selected alpha mode.", + "default": false + }, + "extensions": {}, + "extras": {} + } +}