From 79f7d0ba45093b8cfc6ab7a7a0ab1d56487e766f Mon Sep 17 00:00:00 2001 From: Sylvain Lelievre Date: Wed, 23 Apr 2025 14:31:11 +0200 Subject: [PATCH 1/2] Clarifications and fixes for light extensions --- MPEG_lighting/README.md | 4 +- .../MPEG_lights_punctual.light.schema.json | 34 ++++++++++++++++ .../schema/MPEG_lights_punctual.schema.json | 40 ++++--------------- .../MPEG_lights_texture_based.schema.json | 18 +++++++++ 4 files changed, 62 insertions(+), 34 deletions(-) create mode 100644 MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json diff --git a/MPEG_lighting/README.md b/MPEG_lighting/README.md index 838cf17..ec9e8ce 100644 --- a/MPEG_lighting/README.md +++ b/MPEG_lighting/README.md @@ -59,9 +59,9 @@ Table 3: Definitions of objects at the scene level of MPEG_lights_texture_based ### Semantics of the MPEG_lights_punctual extension When present, the MPEG_lights_punctual extension shall be included as a glTF file level extension. -The definition of all objects within MPEG_lights_punctual extension is provided in Table 4. +The definition of all objects in the array within MPEG_lights_punctual extension is provided in Table 4. -Table 4 – Definition of glTF file objects of MPEG_lights_punctual extension +Table 4 – Definition of glTF file objects of the array in the MPEG_lights_punctual extension | Name | Type | Usage | Default | Description | |--|--|--|--|--| | light | integer | M | | Index of the item in the array of the lights parameter of the KHR_lights_punctual extension | diff --git a/MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json b/MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json new file mode 100644 index 0000000..59de8fb --- /dev/null +++ b/MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["light", "nature"], + "properties": { + "light": { + "type": "integer", + "description": "Index of the item in the array of the lights parameter of the KHR_lights_punctual extension" + }, + "nature": { + "type": "string", + "enum": ["PHYSICAL", "VIRTUAL", "PHYSICAL_VIRTUAL", "UNSPECIFIED"], + "description": "Indicates whether the lighting information corresponds to physical, virtual, both, or unspecified light", + "enumDescriptions": { + "PHYSICAL": "A physical light", + "VIRTUAL": "A virtual light", + "PHYSICAL_VIRTUAL": "Both physical and virtual", + "UNSPECIFIED": "Unknown" + } + }, + "color_accessor": { + "type": "integer", + "description": "Reference to the accessor giving a sequence of color value. If absent, the value in the referenced light is considered constant." + }, + "intensity_accessor": { + "type": "integer", + "description": "Reference to the accessor giving a sequence of intensity value. If absent, the value in the referenced light is considered constant." + }, + "range_accessor": { + "type": "integer", + "description": "Reference to the accessor giving a sequence of range value. If absent, the value in the referenced light is considered constant." + } + } + } \ No newline at end of file diff --git a/MPEG_lighting/schema/MPEG_lights_punctual.schema.json b/MPEG_lighting/schema/MPEG_lights_punctual.schema.json index 372f0a5..0de060c 100644 --- a/MPEG_lighting/schema/MPEG_lights_punctual.schema.json +++ b/MPEG_lighting/schema/MPEG_lights_punctual.schema.json @@ -1,34 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": ["light", "nature"], - "properties": { - "light": { - "type": "integer", - "description": "Index of the item in the array of the lights parameter of the KHR_lights_punctual extension" - }, - "nature": { - "type": "string", - "enum": ["PHYSICAL", "VIRTUAL", "PHYSICAL_VIRTUAL", "UNSPECIFIED"], - "description": "Indicates whether the lighting information corresponds to physical, virtual, both, or unspecified light", - "enumDescriptions": { - "PHYSICAL": "A physical light", - "VIRTUAL": "A virtual light", - "PHYSICAL_VIRTUAL": "Both physical and virtual", - "UNSPECIFIED": "Unknown" - } - }, - "color_accessor": { - "type": "integer", - "description": "Reference to the accessor giving a sequence of color value. If absent, the value in the referenced light is considered constant." - }, - "intensity_accessor": { - "type": "integer", - "description": "Reference to the accessor giving a sequence of intensity value. If absent, the value in the referenced light is considered constant." - }, - "range_accessor": { - "type": "integer", - "description": "Reference to the accessor giving a sequence of range value. If absent, the value in the referenced light is considered constant." - } + "$schema" : "http://json-schema.org/draft-07/schema", + "title": "glTF_MPEG_lights_punctual_extension", + "type": "array", + "description": "Provides a list of punctual light objects.", + "items": { + "type": "object", + "$ref": "MPEG_lights_punctual.light.schema.json" } - } \ No newline at end of file +} \ No newline at end of file diff --git a/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json b/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json index e69de29..d9e7982 100644 --- a/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json +++ b/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json @@ -0,0 +1,18 @@ +{ + "$schema" : "http://json-schema.org/draft-07/schema", + "title": "glTF_MPEG_lights_texture_based_extension", + "type": "object", + "description": "Provides a list of texture based light objects.", + "properties": { + "lights": { + "type": "array", + "description": "Provides a list of texture based light objects.", + "items": { + "type": "object", + "$ref": "MPEG_lights_texture_based.light.schema.json" + }, + "minItems": 1 + } + }, + "required": ["lights"] +} \ No newline at end of file From d90d31abbc6d52c1d3053c62bc34b4843d4a91af Mon Sep 17 00:00:00 2001 From: Emmanuel Thomas Date: Wed, 29 Apr 2026 23:41:14 +0200 Subject: [PATCH 2/2] Update to add the lights property for punctual lights --- MPEG_lighting/README.md | 9 +++++++-- .../schema/MPEG_lights_punctual.schema.json | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/MPEG_lighting/README.md b/MPEG_lighting/README.md index ec9e8ce..b8a7b14 100644 --- a/MPEG_lighting/README.md +++ b/MPEG_lighting/README.md @@ -59,9 +59,14 @@ Table 3: Definitions of objects at the scene level of MPEG_lights_texture_based ### Semantics of the MPEG_lights_punctual extension When present, the MPEG_lights_punctual extension shall be included as a glTF file level extension. -The definition of all objects in the array within MPEG_lights_punctual extension is provided in Table 4. +The definition of all objects within MPEG_lights_punctual extension is provided in Table 4. -Table 4 – Definition of glTF file objects of the array in the MPEG_lights_punctual extension +Table 4: Definitions of glTF file level objects of MPEG_lights_punctual extension +| Name | Type | Usage | Default | Description | +|--|--|--|--|--| +| lights | array | M | | An array of items that describe the punctual light sources, referenced in this scene description document. | + +Table 5: Definitions of item in the lights array of MPEG_lights_punctual extension | Name | Type | Usage | Default | Description | |--|--|--|--|--| | light | integer | M | | Index of the item in the array of the lights parameter of the KHR_lights_punctual extension | diff --git a/MPEG_lighting/schema/MPEG_lights_punctual.schema.json b/MPEG_lighting/schema/MPEG_lights_punctual.schema.json index 0de060c..6ae1fe4 100644 --- a/MPEG_lighting/schema/MPEG_lights_punctual.schema.json +++ b/MPEG_lighting/schema/MPEG_lights_punctual.schema.json @@ -1,10 +1,18 @@ { "$schema" : "http://json-schema.org/draft-07/schema", "title": "glTF_MPEG_lights_punctual_extension", - "type": "array", + "type": "object", "description": "Provides a list of punctual light objects.", - "items": { - "type": "object", - "$ref": "MPEG_lights_punctual.light.schema.json" - } + "properties": { + "lights": { + "type": "array", + "description": "An array of items that describe the punctual light sources, referenced in this scene description document.", + "items": { + "type": "object", + "$ref": "MPEG_lights_punctual.light.schema.json" + }, + "minItems": 1 + } + }, + "required": ["lights"] } \ No newline at end of file