From 31ca6c26cc47dd312c321c78f2e4dd2ca0d24b64 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 10 Jan 2018 11:11:18 -0500 Subject: [PATCH 01/37] First draft of khr_lights --- extensions/Khronos/KHR_lights/README.md | 179 ++++++++ .../MODEL_ROUNDED_CUBE_PART_1/indices.bin | Bin 0 -> 20688 bytes .../MODEL_ROUNDED_CUBE_PART_1/normals.bin | 385 ++++++++++++++++++ .../MODEL_ROUNDED_CUBE_PART_1/positions.bin | Bin 0 -> 41472 bytes .../KHR_lights/schema/examples/lights.gltf | 258 ++++++++++++ .../schema/glTF.KHR_lights.schema.json | 16 + .../schema/light.ambient.schema.json | 7 + .../schema/light.directional.schema.json | 7 + .../schema/light.hemisphere.schema.json | 25 ++ .../KHR_lights/schema/light.point.schema.json | 7 + .../KHR_lights/schema/light.schema.json | 50 +++ .../KHR_lights/schema/light.spot.schema.json | 19 + .../schema/node.KHR_lights.schema.json | 16 + .../schema/scene.KHR_lights.schema.json | 16 + 14 files changed, 985 insertions(+) create mode 100644 extensions/Khronos/KHR_lights/README.md create mode 100644 extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin create mode 100644 extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin create mode 100644 extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin create mode 100644 extensions/Khronos/KHR_lights/schema/examples/lights.gltf create mode 100644 extensions/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/light.ambient.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/light.directional.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/light.point.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/light.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/light.spot.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/node.KHR_lights.schema.json create mode 100644 extensions/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md new file mode 100644 index 0000000000..db8aeeac15 --- /dev/null +++ b/extensions/Khronos/KHR_lights/README.md @@ -0,0 +1,179 @@ +# KHR\_lights + +## Contributors + +* Norbert Nopper, UX3D, +* Thomas Kress, UX3D, +* Mike Bond, Adobe, + +## Status + +Draft (not ratified yet) + +## Dependencies + +Written against the glTF 2.0 spec. + +## Overview + +This extension defines a set of lights for use with glTF 2.0. + +Many 3D tools and engines support built-in implementations of light types. Using this extension, tools can export and engines can import these lights. + +This extension defines five light types: `ambient`, `directional`, `point`, `hemisphere` and `spot`. + +## Lights + +Lights define light sources within a scene. + +`ambient` and `hemisphere` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the transform of that node. + +A conforming implementation of this extension must be able to load light data defined in the asset and has to render the asset using those lights. + +### Defining Lights + +Lights are defined within an dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights` property with a `lights` array inside it. + +Each light defines a mandatory `type` property that designates the type of light (`ambient`, `hemisphere`, `directional`, `point` or `spot`). The following example defines a white-colored directional light. + +```javascript +"extensions": { + "KHR_lights" : { + "lights": [ + { + "color": [ + 1.0, + 1.0, + 1.0 + ], + "type": "directional" + } + ] + } +} +``` + +### Adding Light Instances to Nodes + +`directional`, `point`, `spot` lights have position and/or orientation, which can be animated. These lights are attached to a node by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. + +```javascript +"nodes" : [ + { + "extensions" : { + "KHR_lights" : { + "light" : 0 + } + } + } +] +``` + +For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. +For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, -1.0)` and the rotation of the node orients the light accordingly. + +### Adding Light Instances to Scenes + +`ambient` and `hemisphere` lights have no position and no orientation. These lights must be attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. + +```javascript +"scenes" : [ + { + "extensions" : { + "KHR_lights" : { + "light" : 0 + } + } + } +] +``` + +### Light Types + +All light types share the common set of properties listed below. + +#### Light Shared Properties + +| Property | Description | Required | +|:-----------------------|:------------------------------------------| :--------------------------| +| `color` | RGB value for light's color. | No, Default: `[1.0, 1.0, 1.0]` | +| `intensity` | Brightness of light in lumens. | No, Default: `1.0` | +| `type` | Declares the type of the light. | :white_check_mark: Yes | + +#### Ambient + +Ambient lights define constant lighting throughout the scene. + +#### Hemisphere + +Hemisphere lights define a global light whose illumination blends linearly between two colours, based on the y-coord of the surface normal in world space. +``` +float interp = world_space_normal.y * 0.5 + 0.5; +color = mix(groundColor, color, interp); +``` + +| Property | Description | Required | +|:-----------------------|:------------------------------------------| :--------------------------| +| `groundColor` | Bottom color of the hemisphere light. | No, Default: `[1.0, 1.0, 1.0]` | + +```javascript +"extensions": { + "KHR_lights" : { + "lights": [ + { + "hemisphere": { + "groundColor": [ + 0.0, + 1.0, + 0.0 + ] + }, + "color": [ + 1.0, + 1.0, + 1.0 + ], + "type": "hemisphere" + } + ] + } +} +``` + +#### Directional + +Directional lights are light sources that emit from infinitely far away in the direction of the -z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. + +#### Point + +Point lights emit light in all directions from a position in space. The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). + +#### Spot + +Spot lights emit light in a cone over a distance. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). + +| Property | Description | Required | +|:-----------------------|:------------------------------------------| :--------------------------| +| `innerConeAngle` | Angle from centre of spotlight where falloff begins. | No, Default: `PI / 4.0` | +| `outerConeAngle` | Angle from centre of spotlight where falloff ends. Must be greater than innerConeAngle. | No, Default: `PI / 2.0` | + +```javascript +"extensions": { + "KHR_lights" : { + "lights": [ + { + "spot": { + "innerConeAngle": 0.785398163397448, + "outerConeAngle": 1.57079632679, + }, + "color": [ + 1.0, + 1.0, + 1.0 + ], + "type": "spot" + } + ] + } +} +``` \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin b/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin new file mode 100644 index 0000000000000000000000000000000000000000..f178d8db9cfdc9163f8e20fe0b639f73b2fed588 GIT binary patch literal 20688 zcmXZk0}mzJ0z~0Ewr$(CZQHhO+qP}nwr$(?%v+ULC;77K7wmLSy7zzo{r6u01cZKS zAOuDb1oc*fAvi)Hq_-Lhp%DgQz146Cj|hn9twus*L_t(^;VN1IZ_~{x0(v6kp^kK)pSUY49MuMWqcH|!z149T zj|rIQtxm#ZOuLWbH z6Fl`+pW!)P;H9_v3a{}7Z@txbc#jYG=&gRjXMDj|Z}l6#;|G3vtH1CYfAH5^{RbWX z0T2+{Y9Itg5CrvBgCRIVAf&e%3ZW4OVZGIG2#*Me=&eRVWJEz!Z#5dCBL-r6tFaIp zaS+#AjfeP1fP~&^A|yr`+P#bkn*ITWJ`e=ZL-fAN>MiVskR-2(YTA-!3+6t}F25r67c4&_d z=;*C>LT7YAS8uf&x}yhrdaJ$A8-38%TkVJb7=VG^>L3ip5DfKJhhaEIV5GM?3ZpRw zW4+aJ7>@~<=&eq|WK6+SZ*>}`V+Lk=tFtg0b1>Iiorn2YfQ8=bA}q!dEcI5GVL4V{ zrMJ2YtFZ=az14MCj}6%9t!~0*Y{6DP9L5nG z^;VDJI8NZCw|WYvaRz6-)pIzH3%Ka5UczNu!Bubd8m{98ZhEV?a2t1U*IT`Z`*?td z-s&Sf#uGgCR-fTHUf`v-`UjSD z>8-{>Y{WraZ#5p`BLNb6tBH^pNs!cAO@`!1ft22ADx^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It00DV+9J&)_W1;k>tc0T*!zm%Y_1xQc7I?ycUyP29q5Z}krD;vVjMs}JxH zkMP)AeS)WWhUebu3%tZDy!KY#;4R+ay|?-SAMpvFz11)Hif{Ptt^UAI{K9W<^$-5y zA9Nv)wi*Bd5eR|3)gTCpU9K=ODZ#6y=AR!WYtBH{WNs-K3O^y^uiB#TdYNSD0r1MtOBLgxbled}~S&$Xk zyw&W;ft<+Yt>#7^E5ltEdP^H$5F0xF`C zw^|uhP!-j@)#|8$nyBTi)ml1Vb^*TOE!O7>QBd z>S&C?Sd8;l$72E}Vv@Hy8B;J7)4bK`n1Pv?<*m-f9L&W$Z*@KvU?CQHtBbJ&OR>yb zU5*u4iB;a}YOKLptn*gaV*@r~lefAVTd)<|yw&a4ft}dpt?tGi?8QEBbw3W^AP#w} zhj9c)am-sijuSYEQ{L)noWWU~^H$H}0xsf`w|W^@a240Q)$6!{o4Dnz-o_o=#XWEJ zJ|5s99(k*e@dQut%v*hq7kG(R-s)?-!CSoZR^Q_TKH`(N`WavF72mwo@A!eA_~ots z#vlB}KW|l+u?0Xt1oBn`BM5>bn70}nArKOwyw%VMgRltat%gSgL_{QSH8P?gDx!I- z(GdeN5zAYRjW~#lc;0G!BtSwW@>UZg36dh2x0)O&kP@l9)znCXv`FWzrbh;3L?&-F zGqNBnvU#i7kpnrA%UjKjJjjcD-fDgnKtUApRtuvDilUgeS{x-%5~aM=(kO$nDCez~ zM+HcsEc~uYJD_7Lp1VM8>0!DqM5ha94*iit-RIN nXoI$B=dHF!2XsUyZ?!YJpewq0tKHE9J<-cs?TtR@i+=bY=X_lu literal 0 HcmV?d00001 diff --git a/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin b/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin new file mode 100644 index 0000000000..bdbda393f8 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/norm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?^|shɾY?==rL?ƯY?==rL?Ư"B?뾋뾒"B?뾋rL?Ư8?W짾-z/?x޾-z/?x޾8?W짾?85짾x?-z/޾x?-z/޾?85짾>rLƯ>"B뾹>rLƯ=>Y=Ư>rL>"B뾋>"BƯ>rLW>8>-z/x>-z/xW>85>8>x-z/>x-z/5>8ǯ>rL>뾒"Bǯ>rL=>=Y>ƯrL>뾒"B>뾒"B>ƯrL?W짾8x?޾-z/x?޾-z/?W짾88?5짾-z/?޾-x-z/?޾-x8?5짾rL?Ư"B?뾋-z/?޾-x"B?뾋-z/?x޾%? + +%? + +-z/?x޾x?-z/޾ +? % +x?-z/޾>"B>-z/x +? % + +? % +>-z/x>x-z/ +? +%>x-z/>뾒"Bx?޾-z/ +? +% +? +%x?޾-z/-z/?޾-x%? + +%? + + +? % + +? +% \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin b/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin new file mode 100644 index 0000000000000000000000000000000000000000..96c2a4e1b9e5fca51bcea8827f274d33230769ef GIT binary patch literal 41472 zcmZ{td+2sqRmZ2A3cJ~8iI!QGDP2s>>;n0|=Trn;F)FAmA`P_2g35F>$fk4#({RjJ zv&joZ{bM&PFHylhl{H$^Mai11L{qxhjV?l&(fX{}-`(dtHG=S+{eI5#+n2T0v)4NN zIp==YzkK}Fw?F3B?|1#nw_m;e)#JMQ--RCa-(iNCSKa51@r_^b(O2N5%?!0~zjx!? z#~*(F9nDLd8EW5dx#`{G&QH8@mCu(pGt|C)-Zx)=JnIeDnwK^+)V^)s^C8ELU-#zb zrOgbrZ;$-4dmo?iEBD;!kF=Sg_U*e~ci-b@-tbw?OPd*L-=6Us_dovfd5>#e+RRY< zcI(4F_ITn8Z*E@N%uxGw-E|*#e9&WG+Pt)x!CJ%Azwc;1zdi%KS>Fva=zsOGd23y3 zW-vcB2hCgSS~G+BuQ_hsTG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B>v)u=BbZaxV zTNvs#n+a literal 0 HcmV?d00001 diff --git a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf new file mode 100644 index 0000000000..722e50a936 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf @@ -0,0 +1,258 @@ +{ + "extensionsUsed": [ + "KHR_lights" + ], + "extensions": { + "KHR_lights": { + "lights": [ + { + "color": [ + 0.5, + 0, + 0 + ], + "name": "Ambient", + "intensity": 0.25, + "type": "ambient" + }, + { + "color": [ + 1.0, + 0.9, + 0.7 + ], + "name": "Directional", + "intensity": 3.0, + "type": "directional" + }, + { + "color": [ + 1.0, + 0.0, + 0.0 + ], + "name": "Point", + "intensity": 20.0, + "type": "point" + }, + { + "color": [ + 0.1, + 0.6, + 1 + ], + "hemisphere": { + "groundColor": [ + 0.0, + 0.3, + 0.0 + ] + }, + "name": "Hemisphere", + "intensity": 0.75, + "type": "hemisphere" + }, + { + "color": [ + 0.3, + 0.7, + 1.0 + ], + "name": "Spot", + "intensity": 40.0, + "type": "spot", + "spot": { + "innerConeAngle": 0.785398163397448, + "outerConeAngle": 1.57079632679 + } + } + ] + } + }, + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 3456, + "max": [ + 10, + 19.949111938476562, + 10 + ], + "min": [ + -10, + -0.050886999815702438, + -10 + ], + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 3456, + "type": "VEC3" + }, + { + "bufferView": 2, + "byteOffset": 0, + "componentType": 5125, + "count": 5172, + "max": [ + 3455 + ], + "min": [ + 0 + ], + "type": "SCALAR" + } + ], + "asset": { + "copyright": "2017 (c) Adobe Corp", + "minVersion": "2.0", + "version": "2.0" + }, + "bufferViews": [ + { + "buffer": 0, + "byteLength": 41472, + "byteOffset": 0 + }, + { + "buffer": 1, + "byteLength": 41472, + "byteOffset": 0 + }, + { + "buffer": 2, + "byteLength": 20688, + "byteOffset": 0, + "target": 34963 + } + ], + "buffers": [ + { + "byteLength": 41472, + "uri": "MODEL_ROUNDED_CUBE_PART_1/positions.bin" + }, + { + "byteLength": 41472, + "uri": "MODEL_ROUNDED_CUBE_PART_1/normals.bin" + }, + { + "byteLength": 20688, + "uri": "MODEL_ROUNDED_CUBE_PART_1/indices.bin" + } + ], + "cameras": [ + { + "name": "render_camera", + "perspective": { + "aspectRatio": 1.3333333730697632, + "yfov": 0.58904862403869629, + "zfar": 100, + "znear": 9.9999997473787516e-05 + }, + "type": "perspective" + }, + { + "name": "render_camera2", + "perspective": { + "aspectRatio": 1.3333333730697632, + "yfov": 0.58904862403869629, + "zfar": 100, + "znear": 9.9999997473787516e-05 + }, + "type": "perspective" + } + ], + "materials": [ + { + "doubleSided": true, + "name": "Rounded Cube Material", + "pbrMetallicRoughness": { + "baseColorFactor": [ + 0.63075679540634155, + 0.63075679540634155, + 0.63075679540634155, + 1 + ], + "metallicFactor": 0, + "roughnessFactor": 0.50300002098083496 + } + } + ], + "meshes": [ + { + "name": "MODEL_ROUNDED_CUBE_PART_1", + "primitives": [ + { + "attributes": { + "NORMAL": 1, + "POSITION": 0 + }, + "indices": 2, + "material": 0, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "extensions": { + "KHR_lights": { + "light": 2 + } + }, + "matrix": [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 22, + 0, + 1 + ], + "name": "point_light" + }, + { + "name": "directional_light", + "extensions": { + "KHR_lights": { + "light": 1 + } + } + }, + { + "mesh": 0, + "name": "MODEL_ROUNDED_CUBE_PART_1model_N3D" + } + ], + "scene": 0, + "scenes": [ + { + "name": "scene", + "nodes": [ + 0, + 1, + 2 + ], + "extensions": { + "KHR_lights": { + "light": 3 + } + } + } + ] +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json b/extensions/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json new file mode 100644 index 0000000000..13ec3ee009 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "KHR_lights glTF extension", + "type": "object", + "properties": { + "lights": { + "type": "array", + "items": { + "type": "object", + "$ref": "light.schema.json" + }, + "default": [] + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.ambient.schema.json b/extensions/Khronos/KHR_lights/schema/light.ambient.schema.json new file mode 100644 index 0000000000..938f883674 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/light.ambient.schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "light/ambient", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.directional.schema.json b/extensions/Khronos/KHR_lights/schema/light.directional.schema.json new file mode 100644 index 0000000000..f03f51f4e3 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/light.directional.schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "light/directional", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json b/extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json new file mode 100644 index 0000000000..5442b10945 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "light/hemisphere", + "type": "object", + "properties": { + "groundColor": { + "type": "array", + "description": "RGB color of the bottom of the hemisphere light.", + "items": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "minItems": 3, + "maxItems": 3, + "default": [ + 1.0, + 1.0, + 1.0 + ], + "gltf_detailedDescription": "RGB color of the bottom of the hemisphere light. Each element is floating-point between 0.0 and 1.0. Element 0 corresponds to R, 1 to G, and 2 to B." + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.point.schema.json b/extensions/Khronos/KHR_lights/schema/light.point.schema.json new file mode 100644 index 0000000000..93a9fc16d4 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/light.point.schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "light/point", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.schema.json b/extensions/Khronos/KHR_lights/schema/light.schema.json new file mode 100644 index 0000000000..7a166762b0 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/light.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "light", + "type": "object", + "description": "An ambient, hemisphere, directional, point, or spot light.", + "allOf" : [ { "$ref" : "../../../../specification/2.0/schema/glTFChildOfRootProperty.schema.json" } ], + "properties": { + + "color": { + "type": "array", + "subtype": "number", + "description": "Color of the light source.", + "default": [1, 1, 1] + }, + "intensity": { + "type": "number", + "description": "Intensity of the light source in lumens.", + "default": 1.0 + }, + "hemisphere": { + "type": "object", + "dependencies": { + "type": ["hemisphere"] + }, + "$ref": "Hemisphere light properties." + }, + "spot": { + "type": "object", + "dependencies": { + "type": ["spot"] + }, + "$ref": "light.spot.schema.json" + }, + "type": { + "type": "string", + "description": "Specifies the light type.", + "enum": [ + "ambient", + "hemisphere", + "directional", + "point", + "spot" + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ] +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.spot.schema.json b/extensions/Khronos/KHR_lights/schema/light.spot.schema.json new file mode 100644 index 0000000000..4cbf3a71a1 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/light.spot.schema.json @@ -0,0 +1,19 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema", + "title" : "light/spot", + "type" : "object", + "allOf" : [ { "$ref" : "light.schema.json" } ], + "properties" : { + "fallOffAngle" : { + "type" : "number", + "description" : "Fall off angle in radians.", + "default" : 3.14159265 + }, + "fallOffExponent" : { + "type" : "number", + "description" : "Fall off exponent.", + "default" : 0.0 + } + }, + "additionalProperties" : false +} diff --git a/extensions/Khronos/KHR_lights/schema/node.KHR_lights.schema.json b/extensions/Khronos/KHR_lights/schema/node.KHR_lights.schema.json new file mode 100644 index 0000000000..e2ed689eee --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/node.KHR_lights.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "KHR_lights node extension", + "type": "object", + "properties": { + "light": { + "allOf": [ + { + "$ref": "glTFid.schema.json" + } + ], + "description": "The id of the light referenced by this node." + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json b/extensions/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json new file mode 100644 index 0000000000..9c90bb4fe1 --- /dev/null +++ b/extensions/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "KHR_lights scene extension", + "type": "object", + "properties": { + "light": { + "allOf": [ + { + "$ref": "glTFid.schema.json" + } + ], + "description": "The id of the light referenced by this node." + } + }, + "additionalProperties": false +} \ No newline at end of file From 524fd6bf5b5608c1f4152f249c840f913f5df399 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 18 Jan 2018 11:24:04 -0800 Subject: [PATCH 02/37] Updates to clarify units --- extensions/Khronos/KHR_lights/README.md | 8 ++++---- .../Khronos/KHR_lights/schema/light.spot.schema.json | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index db8aeeac15..fe6b7b7a34 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -97,7 +97,7 @@ All light types share the common set of properties listed below. | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| | `color` | RGB value for light's color. | No, Default: `[1.0, 1.0, 1.0]` | -| `intensity` | Brightness of light in lumens. | No, Default: `1.0` | +| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | #### Ambient @@ -142,15 +142,15 @@ color = mix(groundColor, color, interp); #### Directional -Directional lights are light sources that emit from infinitely far away in the direction of the -z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. +Directional lights are light sources that emit from infinitely far away in the direction of the -z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). #### Point -Point lights emit light in all directions from a position in space. The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). +Point lights emit light in all directions from a position in space. The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr). #### Spot -Spot lights emit light in a cone over a distance. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). +Spot lights emit light in a cone over a distance. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| diff --git a/extensions/Khronos/KHR_lights/schema/light.spot.schema.json b/extensions/Khronos/KHR_lights/schema/light.spot.schema.json index 4cbf3a71a1..3a60d5b4f3 100644 --- a/extensions/Khronos/KHR_lights/schema/light.spot.schema.json +++ b/extensions/Khronos/KHR_lights/schema/light.spot.schema.json @@ -4,15 +4,15 @@ "type" : "object", "allOf" : [ { "$ref" : "light.schema.json" } ], "properties" : { - "fallOffAngle" : { + "innerConeAngle" : { "type" : "number", - "description" : "Fall off angle in radians.", - "default" : 3.14159265 + "description" : "Angle in radians from centre of spotlight where falloff begins.", + "default" : 0.785398163397448 }, - "fallOffExponent" : { + "outerConeAngle" : { "type" : "number", - "description" : "Fall off exponent.", - "default" : 0.0 + "description" : "Angle in radians from centre of spotlight where falloff ends.", + "default" : 1.570796326794897 } }, "additionalProperties" : false From 8cb0c17ce8af3a4e6e974b330d6bde06f243577b Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 18 Jan 2018 13:36:26 -0800 Subject: [PATCH 03/37] Removing hemisphere light --- extensions/Khronos/KHR_lights/README.md | 46 ++----------------- .../KHR_lights/schema/examples/lights.gltf | 19 +------- .../schema/light.hemisphere.schema.json | 25 ---------- .../KHR_lights/schema/light.schema.json | 7 --- 4 files changed, 6 insertions(+), 91 deletions(-) delete mode 100644 extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index fe6b7b7a34..8109565c33 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -20,13 +20,13 @@ This extension defines a set of lights for use with glTF 2.0. Many 3D tools and engines support built-in implementations of light types. Using this extension, tools can export and engines can import these lights. -This extension defines five light types: `ambient`, `directional`, `point`, `hemisphere` and `spot`. +This extension defines five light types: `ambient`, `directional`, `point` and `spot`. ## Lights Lights define light sources within a scene. -`ambient` and `hemisphere` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the transform of that node. +`ambient` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the transform of that node. A conforming implementation of this extension must be able to load light data defined in the asset and has to render the asset using those lights. @@ -34,7 +34,7 @@ A conforming implementation of this extension must be able to load light data de Lights are defined within an dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights` property with a `lights` array inside it. -Each light defines a mandatory `type` property that designates the type of light (`ambient`, `hemisphere`, `directional`, `point` or `spot`). The following example defines a white-colored directional light. +Each light defines a mandatory `type` property that designates the type of light (`ambient`, `directional`, `point` or `spot`). The following example defines a white-colored directional light. ```javascript "extensions": { @@ -70,11 +70,11 @@ Each light defines a mandatory `type` property that designates the type of light ``` For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. -For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, -1.0)` and the rotation of the node orients the light accordingly. +For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, 1.0)` and the rotation of the node orients the light accordingly. ### Adding Light Instances to Scenes -`ambient` and `hemisphere` lights have no position and no orientation. These lights must be attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. +`ambient` lights have no position and no orientation. These lights must be attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. ```javascript "scenes" : [ @@ -104,42 +104,6 @@ All light types share the common set of properties listed below. Ambient lights define constant lighting throughout the scene. -#### Hemisphere - -Hemisphere lights define a global light whose illumination blends linearly between two colours, based on the y-coord of the surface normal in world space. -``` -float interp = world_space_normal.y * 0.5 + 0.5; -color = mix(groundColor, color, interp); -``` - -| Property | Description | Required | -|:-----------------------|:------------------------------------------| :--------------------------| -| `groundColor` | Bottom color of the hemisphere light. | No, Default: `[1.0, 1.0, 1.0]` | - -```javascript -"extensions": { - "KHR_lights" : { - "lights": [ - { - "hemisphere": { - "groundColor": [ - 0.0, - 1.0, - 0.0 - ] - }, - "color": [ - 1.0, - 1.0, - 1.0 - ], - "type": "hemisphere" - } - ] - } -} -``` - #### Directional Directional lights are light sources that emit from infinitely far away in the direction of the -z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). diff --git a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf index 722e50a936..1c66612dcc 100644 --- a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf +++ b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf @@ -35,23 +35,6 @@ "intensity": 20.0, "type": "point" }, - { - "color": [ - 0.1, - 0.6, - 1 - ], - "hemisphere": { - "groundColor": [ - 0.0, - 0.3, - 0.0 - ] - }, - "name": "Hemisphere", - "intensity": 0.75, - "type": "hemisphere" - }, { "color": [ 0.3, @@ -250,7 +233,7 @@ ], "extensions": { "KHR_lights": { - "light": 3 + "light": 0 } } } diff --git a/extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json b/extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json deleted file mode 100644 index 5442b10945..0000000000 --- a/extensions/Khronos/KHR_lights/schema/light.hemisphere.schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema", - "title": "light/hemisphere", - "type": "object", - "properties": { - "groundColor": { - "type": "array", - "description": "RGB color of the bottom of the hemisphere light.", - "items": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "minItems": 3, - "maxItems": 3, - "default": [ - 1.0, - 1.0, - 1.0 - ], - "gltf_detailedDescription": "RGB color of the bottom of the hemisphere light. Each element is floating-point between 0.0 and 1.0. Element 0 corresponds to R, 1 to G, and 2 to B." - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.schema.json b/extensions/Khronos/KHR_lights/schema/light.schema.json index 7a166762b0..f140f4b1dc 100644 --- a/extensions/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/Khronos/KHR_lights/schema/light.schema.json @@ -17,13 +17,6 @@ "description": "Intensity of the light source in lumens.", "default": 1.0 }, - "hemisphere": { - "type": "object", - "dependencies": { - "type": ["hemisphere"] - }, - "$ref": "Hemisphere light properties." - }, "spot": { "type": "object", "dependencies": { From bd8938ece110226dc604e3f22ebaf6e57ec52f45 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 24 Jan 2018 12:14:28 -0800 Subject: [PATCH 04/37] Update spotlight property description --- extensions/Khronos/KHR_lights/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index 8109565c33..48dd350f69 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -114,11 +114,11 @@ Point lights emit light in all directions from a position in space. The brightne #### Spot -Spot lights emit light in a cone over a distance. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). +Spot lights emit light in a cone over a distance. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| -| `innerConeAngle` | Angle from centre of spotlight where falloff begins. | No, Default: `PI / 4.0` | +| `innerConeAngle` | Angle from centre of spotlight where falloff begins. | No, Default: `0` | | `outerConeAngle` | Angle from centre of spotlight where falloff ends. Must be greater than innerConeAngle. | No, Default: `PI / 2.0` | ```javascript From 07a8fecda19e1868dfe7587ba5da00dfc588df3b Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 25 Jan 2018 15:21:41 -0800 Subject: [PATCH 05/37] Adjustments to light descriptions for directional and spotlights --- extensions/Khronos/KHR_lights/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index 48dd350f69..12d059be1e 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -106,7 +106,7 @@ Ambient lights define constant lighting throughout the scene. #### Directional -Directional lights are light sources that emit from infinitely far away in the direction of the -z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). +Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the +z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). #### Point @@ -118,8 +118,8 @@ Spot lights emit light in a cone over a distance. The angle and falloff of the c | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| -| `innerConeAngle` | Angle from centre of spotlight where falloff begins. | No, Default: `0` | -| `outerConeAngle` | Angle from centre of spotlight where falloff ends. Must be greater than innerConeAngle. | No, Default: `PI / 2.0` | +| `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than `0`, less than `outerConeAngle` and less than `PI / 2.0`. | No, Default: `0` | +| `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `0`, greater than `innerConeAngle` and less than `PI / 2.0`. | No, Default: `PI / 4.0` | ```javascript "extensions": { From 2113228df66f5502e4fc49ac6bd9e5424d09c514 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Mon, 29 Jan 2018 09:57:59 -0800 Subject: [PATCH 06/37] Clarifying usage of ambient lights and colour space of lights --- extensions/Khronos/KHR_lights/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index 12d059be1e..fc87a916a4 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -55,7 +55,7 @@ Each light defines a mandatory `type` property that designates the type of light ### Adding Light Instances to Nodes -`directional`, `point`, `spot` lights have position and/or orientation, which can be animated. These lights are attached to a node by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. +Nodes can have lights attached to them, just like any other objects that have a transform. Only lights of types `directional`, `point`, and `spot` have position and/or orientation so only these light types are allowed. These lights are attached to a node by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. ```javascript "nodes" : [ @@ -74,7 +74,7 @@ For light types that have a direction (`directional` and `spot` lights), the lig ### Adding Light Instances to Scenes -`ambient` lights have no position and no orientation. These lights must be attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. +Lights that have no transform information can be attached to scenes. `ambient` lights have no position, no orientation and no range. They are therefore global and belong to a scene rather than a node. These lights are attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. ```javascript "scenes" : [ @@ -96,13 +96,13 @@ All light types share the common set of properties listed below. | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| -| `color` | RGB value for light's color. | No, Default: `[1.0, 1.0, 1.0]` | +| `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | | `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | #### Ambient -Ambient lights define constant lighting throughout the scene. +Ambient lights define constant lighting throughout the scene. They are referenced only by a scene object and only 1 can be referenced per scene. #### Directional From e7ae552412bc96c8b779a698805088fa96ab3bac Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Mon, 5 Feb 2018 09:21:03 -0800 Subject: [PATCH 07/37] Adding base node properties to lights --- extensions/Khronos/KHR_lights/schema/light.schema.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/Khronos/KHR_lights/schema/light.schema.json b/extensions/Khronos/KHR_lights/schema/light.schema.json index f140f4b1dc..a78d67a74d 100644 --- a/extensions/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/Khronos/KHR_lights/schema/light.schema.json @@ -5,7 +5,6 @@ "description": "An ambient, hemisphere, directional, point, or spot light.", "allOf" : [ { "$ref" : "../../../../specification/2.0/schema/glTFChildOfRootProperty.schema.json" } ], "properties": { - "color": { "type": "array", "subtype": "number", @@ -34,7 +33,10 @@ "point", "spot" ] - } + }, + "name": { }, + "extensions": { }, + "extras": { } }, "additionalProperties": false, "required": [ From 0610717b2878172cbf1367840c59e212177a3268 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Mon, 5 Feb 2018 09:26:35 -0800 Subject: [PATCH 08/37] Removing name properites from lights in KHR_lights example. --- extensions/Khronos/KHR_lights/schema/examples/lights.gltf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf index 1c66612dcc..625fd512fc 100644 --- a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf +++ b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf @@ -11,7 +11,6 @@ 0, 0 ], - "name": "Ambient", "intensity": 0.25, "type": "ambient" }, @@ -21,7 +20,6 @@ 0.9, 0.7 ], - "name": "Directional", "intensity": 3.0, "type": "directional" }, @@ -31,7 +29,6 @@ 0.0, 0.0 ], - "name": "Point", "intensity": 20.0, "type": "point" }, @@ -41,7 +38,6 @@ 0.7, 1.0 ], - "name": "Spot", "intensity": 40.0, "type": "spot", "spot": { From 72096c4aebe0235ffbe5e146947c234983dd5369 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Tue, 6 Feb 2018 10:56:01 -0800 Subject: [PATCH 09/37] Adding light's name property back in for consistency --- extensions/Khronos/KHR_lights/README.md | 1 + extensions/Khronos/KHR_lights/schema/examples/lights.gltf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index fc87a916a4..bbf4bc6109 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -96,6 +96,7 @@ All light types share the common set of properties listed below. | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| +| `name` | Name of the light. | No, Default: `""` | | `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | | `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | diff --git a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf index 625fd512fc..1c66612dcc 100644 --- a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf +++ b/extensions/Khronos/KHR_lights/schema/examples/lights.gltf @@ -11,6 +11,7 @@ 0, 0 ], + "name": "Ambient", "intensity": 0.25, "type": "ambient" }, @@ -20,6 +21,7 @@ 0.9, 0.7 ], + "name": "Directional", "intensity": 3.0, "type": "directional" }, @@ -29,6 +31,7 @@ 0.0, 0.0 ], + "name": "Point", "intensity": 20.0, "type": "point" }, @@ -38,6 +41,7 @@ 0.7, 1.0 ], + "name": "Spot", "intensity": 40.0, "type": "spot", "spot": { From e495b9e0730332e74c20cb64c7ef58699cb61c42 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Tue, 13 Feb 2018 14:48:46 -0800 Subject: [PATCH 10/37] Fix typos in schemas --- extensions/Khronos/KHR_lights/README.md | 2 +- extensions/Khronos/KHR_lights/schema/light.schema.json | 5 ++--- extensions/Khronos/KHR_lights/schema/light.spot.schema.json | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index bbf4bc6109..8d1dcc9e31 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -20,7 +20,7 @@ This extension defines a set of lights for use with glTF 2.0. Many 3D tools and engines support built-in implementations of light types. Using this extension, tools can export and engines can import these lights. -This extension defines five light types: `ambient`, `directional`, `point` and `spot`. +This extension defines four light types: `ambient`, `directional`, `point` and `spot`. ## Lights diff --git a/extensions/Khronos/KHR_lights/schema/light.schema.json b/extensions/Khronos/KHR_lights/schema/light.schema.json index a78d67a74d..917eac5cc2 100644 --- a/extensions/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/Khronos/KHR_lights/schema/light.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-04/schema", "title": "light", "type": "object", - "description": "An ambient, hemisphere, directional, point, or spot light.", + "description": "An ambient, directional, point, or spot light.", "allOf" : [ { "$ref" : "../../../../specification/2.0/schema/glTFChildOfRootProperty.schema.json" } ], "properties": { "color": { @@ -13,7 +13,7 @@ }, "intensity": { "type": "number", - "description": "Intensity of the light source in lumens.", + "description": "Intensity of the light source. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m^2)", "default": 1.0 }, "spot": { @@ -28,7 +28,6 @@ "description": "Specifies the light type.", "enum": [ "ambient", - "hemisphere", "directional", "point", "spot" diff --git a/extensions/Khronos/KHR_lights/schema/light.spot.schema.json b/extensions/Khronos/KHR_lights/schema/light.spot.schema.json index 3a60d5b4f3..c2c7f4a081 100644 --- a/extensions/Khronos/KHR_lights/schema/light.spot.schema.json +++ b/extensions/Khronos/KHR_lights/schema/light.spot.schema.json @@ -7,12 +7,12 @@ "innerConeAngle" : { "type" : "number", "description" : "Angle in radians from centre of spotlight where falloff begins.", - "default" : 0.785398163397448 + "default" : 0.0 }, "outerConeAngle" : { "type" : "number", "description" : "Angle in radians from centre of spotlight where falloff ends.", - "default" : 1.570796326794897 + "default" : 0.785398163397448 } }, "additionalProperties" : false From 625b28ecaa5ee257ca3e1d3ee3a2f10ebc441ca5 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 14 Mar 2018 08:38:32 -0700 Subject: [PATCH 11/37] Remove redundant bounds specification for inner and outer cone angles --- extensions/Khronos/KHR_lights/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index 8d1dcc9e31..732f784047 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -119,8 +119,8 @@ Spot lights emit light in a cone over a distance. The angle and falloff of the c | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| -| `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than `0`, less than `outerConeAngle` and less than `PI / 2.0`. | No, Default: `0` | -| `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `0`, greater than `innerConeAngle` and less than `PI / 2.0`. | No, Default: `PI / 4.0` | +| `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than `0`, less than `outerConeAngle`. | No, Default: `0` | +| `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `innerConeAngle` and less than `PI / 2.0`. | No, Default: `PI / 4.0` | ```javascript "extensions": { From dbc99db155a5802342f9c874a19d7a1a205fe6c0 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 14 Mar 2018 08:46:32 -0700 Subject: [PATCH 12/37] Fix inconsistency in spotlight angle bounds --- extensions/Khronos/KHR_lights/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/Khronos/KHR_lights/README.md index 732f784047..1e3656872e 100644 --- a/extensions/Khronos/KHR_lights/README.md +++ b/extensions/Khronos/KHR_lights/README.md @@ -119,8 +119,8 @@ Spot lights emit light in a cone over a distance. The angle and falloff of the c | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| -| `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than `0`, less than `outerConeAngle`. | No, Default: `0` | -| `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `innerConeAngle` and less than `PI / 2.0`. | No, Default: `PI / 4.0` | +| `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than or equal to `0` and less than `outerConeAngle`. | No, Default: `0` | +| `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `innerConeAngle` and less than or equal to `PI / 2.0`. | No, Default: `PI / 4.0` | ```javascript "extensions": { From 8326130cc712d3772095b2674b75343b25d6a4f0 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 15 Mar 2018 09:08:21 -0700 Subject: [PATCH 13/37] Updates to light schemas --- .../Khronos/KHR_lights/schema/light.ambient.schema.json | 7 ------- .../KHR_lights/schema/light.directional.schema.json | 7 ------- .../Khronos/KHR_lights/schema/light.point.schema.json | 7 ------- extensions/Khronos/KHR_lights/schema/light.schema.json | 8 +++++++- 4 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 extensions/Khronos/KHR_lights/schema/light.ambient.schema.json delete mode 100644 extensions/Khronos/KHR_lights/schema/light.directional.schema.json delete mode 100644 extensions/Khronos/KHR_lights/schema/light.point.schema.json diff --git a/extensions/Khronos/KHR_lights/schema/light.ambient.schema.json b/extensions/Khronos/KHR_lights/schema/light.ambient.schema.json deleted file mode 100644 index 938f883674..0000000000 --- a/extensions/Khronos/KHR_lights/schema/light.ambient.schema.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema", - "title": "light/ambient", - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.directional.schema.json b/extensions/Khronos/KHR_lights/schema/light.directional.schema.json deleted file mode 100644 index f03f51f4e3..0000000000 --- a/extensions/Khronos/KHR_lights/schema/light.directional.schema.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema", - "title": "light/directional", - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.point.schema.json b/extensions/Khronos/KHR_lights/schema/light.point.schema.json deleted file mode 100644 index 93a9fc16d4..0000000000 --- a/extensions/Khronos/KHR_lights/schema/light.point.schema.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema", - "title": "light/point", - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/extensions/Khronos/KHR_lights/schema/light.schema.json b/extensions/Khronos/KHR_lights/schema/light.schema.json index 917eac5cc2..8d60a7f147 100644 --- a/extensions/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/Khronos/KHR_lights/schema/light.schema.json @@ -7,7 +7,13 @@ "properties": { "color": { "type": "array", - "subtype": "number", + "items": { + "type": "number", + "minimum": 0.0, + "maximum": 1.0 + }, + "minItems": 3, + "maxItems": 3, "description": "Color of the light source.", "default": [1, 1, 1] }, From 0a79dc7bd57ff7f03ca1c8ad11b4efb5b3f7a4d8 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Tue, 3 Apr 2018 10:29:11 -0700 Subject: [PATCH 14/37] Move KHR_lights to match new folder structure --- extensions/{ => 2.0}/Khronos/KHR_lights/README.md | 0 .../examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin | Bin .../examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin | 0 .../MODEL_ROUNDED_CUBE_PART_1/positions.bin | Bin .../Khronos/KHR_lights/schema/examples/lights.gltf | 0 .../KHR_lights/schema/glTF.KHR_lights.schema.json | 0 .../Khronos/KHR_lights/schema/light.schema.json | 0 .../KHR_lights/schema/light.spot.schema.json | 0 .../KHR_lights/schema/node.KHR_lights.schema.json | 0 .../KHR_lights/schema/scene.KHR_lights.schema.json | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename extensions/{ => 2.0}/Khronos/KHR_lights/README.md (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/examples/lights.gltf (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/light.schema.json (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/light.spot.schema.json (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/node.KHR_lights.schema.json (100%) rename extensions/{ => 2.0}/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json (100%) diff --git a/extensions/Khronos/KHR_lights/README.md b/extensions/2.0/Khronos/KHR_lights/README.md similarity index 100% rename from extensions/Khronos/KHR_lights/README.md rename to extensions/2.0/Khronos/KHR_lights/README.md diff --git a/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin b/extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin similarity index 100% rename from extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin rename to extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin diff --git a/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin b/extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin similarity index 100% rename from extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin rename to extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin diff --git a/extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin b/extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin similarity index 100% rename from extensions/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin rename to extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin diff --git a/extensions/Khronos/KHR_lights/schema/examples/lights.gltf b/extensions/2.0/Khronos/KHR_lights/schema/examples/lights.gltf similarity index 100% rename from extensions/Khronos/KHR_lights/schema/examples/lights.gltf rename to extensions/2.0/Khronos/KHR_lights/schema/examples/lights.gltf diff --git a/extensions/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json similarity index 100% rename from extensions/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json rename to extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json diff --git a/extensions/Khronos/KHR_lights/schema/light.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json similarity index 100% rename from extensions/Khronos/KHR_lights/schema/light.schema.json rename to extensions/2.0/Khronos/KHR_lights/schema/light.schema.json diff --git a/extensions/Khronos/KHR_lights/schema/light.spot.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/light.spot.schema.json similarity index 100% rename from extensions/Khronos/KHR_lights/schema/light.spot.schema.json rename to extensions/2.0/Khronos/KHR_lights/schema/light.spot.schema.json diff --git a/extensions/Khronos/KHR_lights/schema/node.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json similarity index 100% rename from extensions/Khronos/KHR_lights/schema/node.KHR_lights.schema.json rename to extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json diff --git a/extensions/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json similarity index 100% rename from extensions/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json rename to extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json From 6aff0ccc2bca48c688e7c2b58d19828b07c93087 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 11 Apr 2018 11:35:21 -0700 Subject: [PATCH 15/37] Few tweaks to address comments --- extensions/2.0/Khronos/KHR_lights/README.md | 16 ++++++++-------- .../schema/glTF.KHR_lights.schema.json | 1 + .../Khronos/KHR_lights/schema/light.schema.json | 2 +- .../schema/node.KHR_lights.schema.json | 1 + .../schema/scene.KHR_lights.schema.json | 1 + 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights/README.md b/extensions/2.0/Khronos/KHR_lights/README.md index 1e3656872e..2848746d9e 100644 --- a/extensions/2.0/Khronos/KHR_lights/README.md +++ b/extensions/2.0/Khronos/KHR_lights/README.md @@ -26,13 +26,13 @@ This extension defines four light types: `ambient`, `directional`, `point` and ` Lights define light sources within a scene. -`ambient` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the transform of that node. +`ambient` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the translation and rotation of that node. Note that all lights ignore the scale of a node. A conforming implementation of this extension must be able to load light data defined in the asset and has to render the asset using those lights. ### Defining Lights -Lights are defined within an dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights` property with a `lights` array inside it. +Lights are defined within a dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights` property with a `lights` array inside it. Each light defines a mandatory `type` property that designates the type of light (`ambient`, `directional`, `point` or `spot`). The following example defines a white-colored directional light. @@ -74,7 +74,7 @@ For light types that have a direction (`directional` and `spot` lights), the lig ### Adding Light Instances to Scenes -Lights that have no transform information can be attached to scenes. `ambient` lights have no position, no orientation and no range. They are therefore global and belong to a scene rather than a node. These lights are attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. +Lights that have no transform information can be attached to scenes. `ambient` lights have no position or orientation and are therefore global and belong to a scene rather than a node. These lights are attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. ```javascript "scenes" : [ @@ -98,24 +98,24 @@ All light types share the common set of properties listed below. |:-----------------------|:------------------------------------------| :--------------------------| | `name` | Name of the light. | No, Default: `""` | | `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | -| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | +| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` and `ambient` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | #### Ambient -Ambient lights define constant lighting throughout the scene. They are referenced only by a scene object and only 1 can be referenced per scene. +Ambient lights define constant lighting throughout the scene. They are referenced only by a scene object and only 1 can be referenced per scene. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). #### Directional -Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the +z axis. This light type inherits the orientation of the node that it belongs to. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). +Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to but ignores position and scale. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). #### Point -Point lights emit light in all directions from a position in space. The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr). +Point lights emit light in all directions from its position in space (and ignore rotation and scale). The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr). #### Spot -Spot lights emit light in a cone over a distance. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). +Spot lights emit light in a cone in the direction of the local +z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| diff --git a/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json index 13ec3ee009..38e84d1467 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json +++ b/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-04/schema", "title": "KHR_lights glTF extension", "type": "object", + "allOf" : [ { "$ref" : "../../../../specification/2.0/schema/glTFChildOfRootProperty.schema.json" } ], "properties": { "lights": { "type": "array", diff --git a/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json index 8d60a7f147..32d0fe4bac 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json @@ -3,7 +3,7 @@ "title": "light", "type": "object", "description": "An ambient, directional, point, or spot light.", - "allOf" : [ { "$ref" : "../../../../specification/2.0/schema/glTFChildOfRootProperty.schema.json" } ], + "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { "color": { "type": "array", diff --git a/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json index e2ed689eee..c580216cdf 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json +++ b/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-04/schema", "title": "KHR_lights node extension", "type": "object", + "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { "light": { "allOf": [ diff --git a/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json index 9c90bb4fe1..1351adda82 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json +++ b/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-04/schema", "title": "KHR_lights scene extension", "type": "object", + "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { "light": { "allOf": [ From 6e871f6f8af8961b8f378b2baa88f27ab110e88c Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 24 May 2018 09:11:07 -0700 Subject: [PATCH 16/37] Adding range --- extensions/2.0/Khronos/KHR_lights/README.md | 41 ++++++++++++--------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights/README.md b/extensions/2.0/Khronos/KHR_lights/README.md index 2848746d9e..5c71f68a02 100644 --- a/extensions/2.0/Khronos/KHR_lights/README.md +++ b/extensions/2.0/Khronos/KHR_lights/README.md @@ -16,21 +16,17 @@ Written against the glTF 2.0 spec. ## Overview -This extension defines a set of lights for use with glTF 2.0. +This extension defines a set of lights for use with glTF 2.0. Lights define light sources within a scene. Many 3D tools and engines support built-in implementations of light types. Using this extension, tools can export and engines can import these lights. This extension defines four light types: `ambient`, `directional`, `point` and `spot`. -## Lights - -Lights define light sources within a scene. - `ambient` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the translation and rotation of that node. Note that all lights ignore the scale of a node. A conforming implementation of this extension must be able to load light data defined in the asset and has to render the asset using those lights. -### Defining Lights +## Defining Lights Lights are defined within a dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights` property with a `lights` array inside it. @@ -53,7 +49,7 @@ Each light defines a mandatory `type` property that designates the type of light } ``` -### Adding Light Instances to Nodes +## Adding Light Instances to Nodes Nodes can have lights attached to them, just like any other objects that have a transform. Only lights of types `directional`, `point`, and `spot` have position and/or orientation so only these light types are allowed. These lights are attached to a node by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. @@ -72,9 +68,9 @@ Nodes can have lights attached to them, just like any other objects that have a For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, 1.0)` and the rotation of the node orients the light accordingly. -### Adding Light Instances to Scenes +## Adding Light Instances to Scenes -Lights that have no transform information can be attached to scenes. `ambient` lights have no position or orientation and are therefore global and belong to a scene rather than a node. These lights are attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. +Because scenes have no transform, only lights that also have no transform information can be attached to them. `ambient` lights have no position, no orientation and are, therefore, the only light type that may be attached to scenes (and cannot be attached to any other object type). A scene may have no more than one ambient light. These lights are attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. ```javascript "scenes" : [ @@ -88,11 +84,11 @@ Lights that have no transform information can be attached to scenes. `ambient` l ] ``` -### Light Types +## Light Types All light types share the common set of properties listed below. -#### Light Shared Properties +### Light Shared Properties | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| @@ -100,20 +96,21 @@ All light types share the common set of properties listed below. | `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | | `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` and `ambient` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | +| `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. | No, Default: `0.0` | -#### Ambient +### Ambient Ambient lights define constant lighting throughout the scene. They are referenced only by a scene object and only 1 can be referenced per scene. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). -#### Directional +### Directional -Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to but ignores position and scale. Because it is at an infinite distance, the light is not attenuated. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). +Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to but ignores position and scale. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m^2). -#### Point +### Point Point lights emit light in all directions from its position in space (and ignore rotation and scale). The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr). -#### Spot +### Spot Spot lights emit light in a cone in the direction of the local +z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). @@ -141,4 +138,14 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl ] } } -``` \ No newline at end of file +``` + +## Range Property + +The range property (allowed only on point and spot lights) suggests a distance cutoff at which the light's intensity may be considered zero, meaning the light no longer affects the surrounding area. It is recommended — but are not required — that engines ignore the light beyond this range. The range may be defined for asthetic or performance reasons. + +Within the range of the light, attenuation should follow the inverse square law as closely as possible, although some non-quadratic falloff near the edge of the range may be used to avoid a hard cutoff. A range of 0 implies that no cutoff should be used, attenuating only according to inverse square law. + +A recommended implementation for this attenuation with a cutoff range is as follows: + +**attenuation = max( min( 1.0 - ( current_distance / range )^4^, 1 ), 0 ) / current_distance^2^** \ No newline at end of file From c605724da103eb152eb9e58b4c388d4f569f9db7 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 24 May 2018 09:18:53 -0700 Subject: [PATCH 17/37] Add range property to schema --- .../2.0/Khronos/KHR_lights/schema/light.schema.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json b/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json index 32d0fe4bac..f66950e89f 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json @@ -39,6 +39,15 @@ "spot" ] }, + "range": { + "type": "number", + "description": "A distance cutoff at which the light's intensity may be considered to have reached zero.", + "minimum": 0, + "dependencies": { + "type": ["spot", "point"] + }, + "default": 0.0 + }, "name": { }, "extensions": { }, "extras": { } From 766ba658ed11d8c2192d1a167744cf1cf0dd2239 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 30 May 2018 14:21:23 -0700 Subject: [PATCH 18/37] Remove reference to aesthetic reasons for using light range. --- extensions/2.0/Khronos/KHR_lights/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Khronos/KHR_lights/README.md b/extensions/2.0/Khronos/KHR_lights/README.md index 5c71f68a02..3442e4de6b 100644 --- a/extensions/2.0/Khronos/KHR_lights/README.md +++ b/extensions/2.0/Khronos/KHR_lights/README.md @@ -142,7 +142,7 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl ## Range Property -The range property (allowed only on point and spot lights) suggests a distance cutoff at which the light's intensity may be considered zero, meaning the light no longer affects the surrounding area. It is recommended — but are not required — that engines ignore the light beyond this range. The range may be defined for asthetic or performance reasons. +The range property (allowed only on point and spot lights) suggests a distance cutoff at which the light's intensity may be considered zero, meaning the light no longer affects the surrounding area. This can be useful to cull geometry that a light may not visibly affect, potentially having a significant positive impact on rendering performance. It is recommended — but are not required — that rendering engines ignore the light beyond this range. Within the range of the light, attenuation should follow the inverse square law as closely as possible, although some non-quadratic falloff near the edge of the range may be used to avoid a hard cutoff. A range of 0 implies that no cutoff should be used, attenuating only according to inverse square law. From 8ae54ee9c39b030b782ef6b1e9a2fc6ca4e50c43 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 27 Jun 2018 15:45:28 -0700 Subject: [PATCH 19/37] Rename extension and remove ambient lights --- .../README.md | 54 ++++++------------ .../MODEL_ROUNDED_CUBE_PART_1/indices.bin | Bin .../MODEL_ROUNDED_CUBE_PART_1/normals.bin | 0 .../MODEL_ROUNDED_CUBE_PART_1/positions.bin | Bin .../schema/examples/lights.gltf | 29 +++------- .../glTF. KHR_lights_punctual.schema.json} | 2 +- .../schema/light.schema.json | 1 - .../schema/light.spot.schema.json | 0 .../node. KHR_lights_punctual.schema.json} | 2 +- .../scene. KHR_lights_punctual.schema.json} | 2 +- 10 files changed, 29 insertions(+), 61 deletions(-) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/README.md (68%) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin (100%) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin (100%) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin (100%) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/schema/examples/lights.gltf (91%) rename extensions/2.0/Khronos/{KHR_lights/schema/glTF.KHR_lights.schema.json => KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json} (89%) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/schema/light.schema.json (98%) rename extensions/2.0/Khronos/{KHR_lights => KHR_lights_punctual}/schema/light.spot.schema.json (100%) rename extensions/2.0/Khronos/{KHR_lights/schema/node.KHR_lights.schema.json => KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json} (89%) rename extensions/2.0/Khronos/{KHR_lights/schema/scene.KHR_lights.schema.json => KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json} (89%) diff --git a/extensions/2.0/Khronos/KHR_lights/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md similarity index 68% rename from extensions/2.0/Khronos/KHR_lights/README.md rename to extensions/2.0/Khronos/KHR_lights_punctual/README.md index 3442e4de6b..9ebe46416f 100644 --- a/extensions/2.0/Khronos/KHR_lights/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -20,21 +20,21 @@ This extension defines a set of lights for use with glTF 2.0. Lights define ligh Many 3D tools and engines support built-in implementations of light types. Using this extension, tools can export and engines can import these lights. -This extension defines four light types: `ambient`, `directional`, `point` and `spot`. +This extension defines three "punctual" light types: `directional`, `point` and `spot`. Punctual lights are defined as parameterized, infinitely small points that emit light in well-defined directions and intensities. -`ambient` lights are not transformable and, thus, can only be defined on the scene. All other lights are contained in nodes and inherit the translation and rotation of that node. Note that all lights ignore the scale of a node. +These lights are referenced by nodes and inherit the transform of that node. A conforming implementation of this extension must be able to load light data defined in the asset and has to render the asset using those lights. ## Defining Lights -Lights are defined within a dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights` property with a `lights` array inside it. +Lights are defined within a dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights_punctual` property with a `lights` array inside it. -Each light defines a mandatory `type` property that designates the type of light (`ambient`, `directional`, `point` or `spot`). The following example defines a white-colored directional light. +Each light defines a mandatory `type` property that designates the type of light (`directional`, `point` or `spot`). The following example defines a white-colored directional light. ```javascript "extensions": { - "KHR_lights" : { + "KHR_lights_punctual" : { "lights": [ { "color": [ @@ -51,13 +51,13 @@ Each light defines a mandatory `type` property that designates the type of light ## Adding Light Instances to Nodes -Nodes can have lights attached to them, just like any other objects that have a transform. Only lights of types `directional`, `point`, and `spot` have position and/or orientation so only these light types are allowed. These lights are attached to a node by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. +Lights must be attached to a node by defining the `extensions.KHR_lights_punctual` property and, within that, an index into the `lights` array using the `light` property. ```javascript "nodes" : [ { "extensions" : { - "KHR_lights" : { + "KHR_lights_punctual" : { "light" : 0 } } @@ -65,25 +65,9 @@ Nodes can have lights attached to them, just like any other objects that have a ] ``` -For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. +The light will inherit the transform of the node. For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, 1.0)` and the rotation of the node orients the light accordingly. -## Adding Light Instances to Scenes - -Because scenes have no transform, only lights that also have no transform information can be attached to them. `ambient` lights have no position, no orientation and are, therefore, the only light type that may be attached to scenes (and cannot be attached to any other object type). A scene may have no more than one ambient light. These lights are attached to the scene by defining the `extensions.KHR_lights` property and, within that, an index into the `lights` array using the `light` property. - -```javascript -"scenes" : [ - { - "extensions" : { - "KHR_lights" : { - "light" : 0 - } - } - } -] -``` - ## Light Types All light types share the common set of properties listed below. @@ -98,9 +82,15 @@ All light types share the common set of properties listed below. | `type` | Declares the type of the light. | :white_check_mark: Yes | | `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. | No, Default: `0.0` | -### Ambient +## Range Property + +The range property (allowed only on point and spot lights) defines a distance cutoff at which the light's intensity must be considered zero, meaning the light no longer affects the surrounding area. This can be useful to cull geometry that a light may not visibly affect, potentially having a significant positive impact on rendering performance. It is required that, when given a non-zero value, rendering engines ignore the light beyond this range. + +Within the range of the light, attenuation should follow the inverse square law as closely as possible, although some non-quadratic falloff near the edge of the range may be used to avoid a hard cutoff. A `range` of 0 implies that no cutoff should be used, attenuating only according to inverse square law. + +A recommended implementation for this attenuation with a cutoff range is as follows: -Ambient lights define constant lighting throughout the scene. They are referenced only by a scene object and only 1 can be referenced per scene. It's intensity is defined in lumens per metre squared, or lux (lm/m^2). +**attenuation = max( min( 1.0 - ( current_distance / range )^4^, 1 ), 0 ) / current_distance^2^** ### Directional @@ -121,7 +111,7 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl ```javascript "extensions": { - "KHR_lights" : { + "KHR_lights_punctual" : { "lights": [ { "spot": { @@ -140,12 +130,6 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl } ``` -## Range Property - -The range property (allowed only on point and spot lights) suggests a distance cutoff at which the light's intensity may be considered zero, meaning the light no longer affects the surrounding area. This can be useful to cull geometry that a light may not visibly affect, potentially having a significant positive impact on rendering performance. It is recommended — but are not required — that rendering engines ignore the light beyond this range. - -Within the range of the light, attenuation should follow the inverse square law as closely as possible, although some non-quadratic falloff near the edge of the range may be used to avoid a hard cutoff. A range of 0 implies that no cutoff should be used, attenuating only according to inverse square law. - -A recommended implementation for this attenuation with a cutoff range is as follows: +## Inner and Outer Cone Angles -**attenuation = max( min( 1.0 - ( current_distance / range )^4^, 1 ), 0 ) / current_distance^2^** \ No newline at end of file +The attenuation between the `innerConeAngle` and `outerConeAngle` should roughly follow a parabolic decline. i.e. `intensity = -pow2(x) + 1` where x is a 0-1 value representing the percentage of the way between `innerConeAngle` and `outerConeAngle`. This is not physically correct but is an efficient approximation that provides decent results. Runtimes are free to implement their own function. \ No newline at end of file diff --git a/extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin b/extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin similarity index 100% rename from extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/MODEL_ROUNDED_CUBE_PART_1/indices.bin diff --git a/extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin b/extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin similarity index 100% rename from extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/MODEL_ROUNDED_CUBE_PART_1/normals.bin diff --git a/extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin b/extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin similarity index 100% rename from extensions/2.0/Khronos/KHR_lights/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/MODEL_ROUNDED_CUBE_PART_1/positions.bin diff --git a/extensions/2.0/Khronos/KHR_lights/schema/examples/lights.gltf b/extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/lights.gltf similarity index 91% rename from extensions/2.0/Khronos/KHR_lights/schema/examples/lights.gltf rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/lights.gltf index 1c66612dcc..1fb7ee2ba8 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/examples/lights.gltf +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/examples/lights.gltf @@ -1,20 +1,10 @@ { "extensionsUsed": [ - "KHR_lights" + "KHR_lights_punctual" ], "extensions": { - "KHR_lights": { + "KHR_lights_punctual": { "lights": [ - { - "color": [ - 0.5, - 0, - 0 - ], - "name": "Ambient", - "intensity": 0.25, - "type": "ambient" - }, { "color": [ 1.0, @@ -185,8 +175,8 @@ "nodes": [ { "extensions": { - "KHR_lights": { - "light": 2 + "KHR_lights_punctual": { + "light": 1 } }, "matrix": [ @@ -212,8 +202,8 @@ { "name": "directional_light", "extensions": { - "KHR_lights": { - "light": 1 + "KHR_lights_punctual": { + "light": 0 } } }, @@ -230,12 +220,7 @@ 0, 1, 2 - ], - "extensions": { - "KHR_lights": { - "light": 0 - } - } + ] } ] } \ No newline at end of file diff --git a/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json similarity index 89% rename from extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json index 38e84d1467..b4cc36158d 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/glTF.KHR_lights.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema", - "title": "KHR_lights glTF extension", + "title": "KHR_lights_punctual glTF extension", "type": "object", "allOf" : [ { "$ref" : "../../../../specification/2.0/schema/glTFChildOfRootProperty.schema.json" } ], "properties": { diff --git a/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json similarity index 98% rename from extensions/2.0/Khronos/KHR_lights/schema/light.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json index f66950e89f..5fadb8ee74 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/light.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json @@ -33,7 +33,6 @@ "type": "string", "description": "Specifies the light type.", "enum": [ - "ambient", "directional", "point", "spot" diff --git a/extensions/2.0/Khronos/KHR_lights/schema/light.spot.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.spot.schema.json similarity index 100% rename from extensions/2.0/Khronos/KHR_lights/schema/light.spot.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/light.spot.schema.json diff --git a/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json similarity index 89% rename from extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json index c580216cdf..716ad65302 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/node.KHR_lights.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema", - "title": "KHR_lights node extension", + "title": "KHR_lights_punctual node extension", "type": "object", "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { diff --git a/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json similarity index 89% rename from extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json index 1351adda82..333447b61f 100644 --- a/extensions/2.0/Khronos/KHR_lights/schema/scene.KHR_lights.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema", - "title": "KHR_lights scene extension", + "title": "KHR_lights_punctual scene extension", "type": "object", "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { From 3dcdfb0e81ee9e3e908fdb028cc47bd491097435 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 2 Jul 2018 07:26:25 -0700 Subject: [PATCH 20/37] Format exponents. --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 9ebe46416f..227adc977e 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -78,7 +78,7 @@ All light types share the common set of properties listed below. |:-----------------------|:------------------------------------------| :--------------------------| | `name` | Name of the light. | No, Default: `""` | | `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | -| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` and `ambient` lights use illuminance in lux (lm/m^2) | No, Default: `1.0` | +| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` and `ambient` lights use illuminance in lux (lm/m2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | | `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. | No, Default: `0.0` | @@ -90,11 +90,11 @@ Within the range of the light, attenuation should follow the inverse square law A recommended implementation for this attenuation with a cutoff range is as follows: -**attenuation = max( min( 1.0 - ( current_distance / range )^4^, 1 ), 0 ) / current_distance^2^** +**attenuation = max( min( 1.0 - ( current_distance / range )4, 1 ), 0 ) / current_distance2** ### Directional -Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to but ignores position and scale. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m^2). +Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to but ignores position and scale. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2). ### Point @@ -132,4 +132,4 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl ## Inner and Outer Cone Angles -The attenuation between the `innerConeAngle` and `outerConeAngle` should roughly follow a parabolic decline. i.e. `intensity = -pow2(x) + 1` where x is a 0-1 value representing the percentage of the way between `innerConeAngle` and `outerConeAngle`. This is not physically correct but is an efficient approximation that provides decent results. Runtimes are free to implement their own function. \ No newline at end of file +The attenuation between the `innerConeAngle` and `outerConeAngle` should roughly follow a parabolic decline. i.e. `intensity = -pow2(x) + 1` where x is a 0-1 value representing the percentage of the way between `innerConeAngle` and `outerConeAngle`. This is not physically correct but is an efficient approximation that provides decent results. Runtimes are free to implement their own function. From bd047d43b0f23dd062a27abb01b5bae747615ac8 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 3 Jul 2018 09:37:38 -0700 Subject: [PATCH 21/37] Update readme title. --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 227adc977e..89ec20aa83 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -1,4 +1,4 @@ -# KHR\_lights +# KHR\_lights\_punctual ## Contributors From 34ae110fbf8266430198a8807a10f941542aa563 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Fri, 6 Jul 2018 13:22:08 -0700 Subject: [PATCH 22/37] Update inner and outer angle description for spotlights --- .../2.0/Khronos/KHR_lights_punctual/README.md | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 9ebe46416f..ef544e6988 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -132,4 +132,23 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl ## Inner and Outer Cone Angles -The attenuation between the `innerConeAngle` and `outerConeAngle` should roughly follow a parabolic decline. i.e. `intensity = -pow2(x) + 1` where x is a 0-1 value representing the percentage of the way between `innerConeAngle` and `outerConeAngle`. This is not physically correct but is an efficient approximation that provides decent results. Runtimes are free to implement their own function. \ No newline at end of file +There should be a smooth attenuation of brightness between the `innerConeAngle` and `outerConeAngle` angles. In reality, this attenuation is very complex as it depends on the physical size of the spotlight and the shape of the sheath around the bulb. + +Conforming implementations are not required to implement a specific falloff equation but the attenuation should generally follow a steeper decline in brightness before leveling off when moving from the inner to the outer angle. + +It is common to model this falloff by interpolating between the cosine of each angle. This is an efficient approximation that provides decent results. + +Both Frostbite and Unreal 4 use the following code: + +```c++ +// These two values can be calculated on the CPU and passed into the shader +float lightAngleScale = 1.0f / max(0.001f, cos(innerConeAngle) - cos(outerConeAngle)); +float lightAngleOffset = -cos(outerConeAngle) * lightAngleScale; + +// Then, in the shader: +float cd = dot(spotlightDir, normalizedLightVector); +float attenuation = saturate(cd * lightAngleScale + lightAngleOffset); +attenuation *= attenuation; +``` + +It is recommended, but not required, that conforming implementations should use this same attenuation logic. \ No newline at end of file From 2945499e60323a1eab5cebbd4cb89588fba6b3ea Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Fri, 6 Jul 2018 16:42:52 -0700 Subject: [PATCH 23/37] Remove reference to UE4 and Frostbite --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index ba0af09134..b880e6c3f3 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -134,11 +134,11 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl There should be a smooth attenuation of brightness between the `innerConeAngle` and `outerConeAngle` angles. In reality, this attenuation is very complex as it depends on the physical size of the spotlight and the shape of the sheath around the bulb. -Conforming implementations are not required to implement a specific falloff equation but the attenuation should generally follow a steeper decline in brightness before leveling off when moving from the inner to the outer angle. +Conforming implementations will model this attenuation with a curve that follows a steeper decline in brightness before leveling off when moving from the inner to the outer angle. It is common to model this falloff by interpolating between the cosine of each angle. This is an efficient approximation that provides decent results. -Both Frostbite and Unreal 4 use the following code: +Reference code: ```c++ // These two values can be calculated on the CPU and passed into the shader @@ -151,4 +151,3 @@ float attenuation = saturate(cd * lightAngleScale + lightAngleOffset); attenuation *= attenuation; ``` -It is recommended, but not required, that conforming implementations should use this same attenuation logic. From 08bc3c7ec0bb588b8521822acec89f5e79dcd66d Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 12 Jul 2018 14:58:19 -0700 Subject: [PATCH 24/37] Remove more references to ambient lights --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 2 +- .../2.0/Khronos/KHR_lights_punctual/schema/light.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index b880e6c3f3..c579894ad0 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -78,7 +78,7 @@ All light types share the common set of properties listed below. |:-----------------------|:------------------------------------------| :--------------------------| | `name` | Name of the light. | No, Default: `""` | | `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | -| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` and `ambient` lights use illuminance in lux (lm/m2) | No, Default: `1.0` | +| `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | | `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. | No, Default: `0.0` | diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json index 5fadb8ee74..8ced9ea6ab 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-04/schema", "title": "light", "type": "object", - "description": "An ambient, directional, point, or spot light.", + "description": "A directional, point, or spot light.", "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { "color": { From 28d2bacc0871080b2e8d94c223d3d510d0bd9509 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 12 Jul 2018 15:04:08 -0700 Subject: [PATCH 25/37] Make it clearer that the spotlight code is for the attenuation between inner/outerConeAngle and not for distance --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index c579894ad0..8a23c6496e 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -102,7 +102,7 @@ Point lights emit light in all directions from its position in space (and ignore ### Spot -Spot lights emit light in a cone in the direction of the local +z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). +Spot lights emit light in a cone in the direction of the local +z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` (and at the location of the light) and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| @@ -132,9 +132,9 @@ Spot lights emit light in a cone in the direction of the local +z axis. The angl ## Inner and Outer Cone Angles -There should be a smooth attenuation of brightness between the `innerConeAngle` and `outerConeAngle` angles. In reality, this attenuation is very complex as it depends on the physical size of the spotlight and the shape of the sheath around the bulb. +There should be a smooth attenuation of brightness between the `innerConeAngle` and `outerConeAngle` angles. In reality, this "angular" attenuation is very complex as it depends on the physical size of the spotlight and the shape of the sheath around the bulb. -Conforming implementations will model this attenuation with a curve that follows a steeper decline in brightness before leveling off when moving from the inner to the outer angle. +Conforming implementations will model this angular attenuation with a curve that follows a steeper decline in brightness before leveling off when moving from the inner to the outer angle. It is common to model this falloff by interpolating between the cosine of each angle. This is an efficient approximation that provides decent results. @@ -147,7 +147,7 @@ float lightAngleOffset = -cos(outerConeAngle) * lightAngleScale; // Then, in the shader: float cd = dot(spotlightDir, normalizedLightVector); -float attenuation = saturate(cd * lightAngleScale + lightAngleOffset); -attenuation *= attenuation; +float angularAttenuation = saturate(cd * lightAngleScale + lightAngleOffset); +angularAttenuation *= angularAttenuation; ``` From 78a93ae589478d6e3165b97f6c955c213260efb7 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 9 Aug 2018 09:59:10 -0400 Subject: [PATCH 26/37] Updating the list of contributors --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 8a23c6496e..58e3e02fff 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -3,8 +3,9 @@ ## Contributors * Norbert Nopper, UX3D, -* Thomas Kress, UX3D, -* Mike Bond, Adobe, +* Don McCurdy, Google, [@donrmccurdy](https://twitter.com/donrmccurdy) +* Gary Hsu, Microsoft, [@bghgary](https://twitter.com/bghgary) +* Mike Bond, Adobe, [@MiiBond](https://twitter.com/MiiBond) ## Status From d9a6811d7278abc832c0ee0c37815c7627c4be0b Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Thu, 9 Aug 2018 15:22:57 -0400 Subject: [PATCH 27/37] Updating the description for range --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 4 ++-- .../2.0/Khronos/KHR_lights_punctual/schema/light.schema.json | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 58e3e02fff..41266750f1 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -81,13 +81,13 @@ All light types share the common set of properties listed below. | `color` | RGB value for light's color in linear space. | No, Default: `[1.0, 1.0, 1.0]` | | `intensity` | Brightness of light in. The units that this is defined in depend on the type of light. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m2) | No, Default: `1.0` | | `type` | Declares the type of the light. | :white_check_mark: Yes | -| `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. | No, Default: `0.0` | +| `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. Must be > 0. When undefined, range is assumed to be infinite. | No | ## Range Property The range property (allowed only on point and spot lights) defines a distance cutoff at which the light's intensity must be considered zero, meaning the light no longer affects the surrounding area. This can be useful to cull geometry that a light may not visibly affect, potentially having a significant positive impact on rendering performance. It is required that, when given a non-zero value, rendering engines ignore the light beyond this range. -Within the range of the light, attenuation should follow the inverse square law as closely as possible, although some non-quadratic falloff near the edge of the range may be used to avoid a hard cutoff. A `range` of 0 implies that no cutoff should be used, attenuating only according to inverse square law. +Within the range of the light, attenuation should follow the inverse square law as closely as possible, although some non-quadratic falloff near the edge of the range may be used to avoid a hard cutoff. When undefined, `range` is assumed to be infinite and the light should attenuate according to inverse square law. A recommended implementation for this attenuation with a cutoff range is as follows: diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json index 8ced9ea6ab..eeb8b9f475 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/light.schema.json @@ -44,8 +44,7 @@ "minimum": 0, "dependencies": { "type": ["spot", "point"] - }, - "default": 0.0 + } }, "name": { }, "extensions": { }, From 66dfb385675bab8c5708d2afaf674277ad2b3d32 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Fri, 24 Aug 2018 11:20:18 -0700 Subject: [PATCH 28/37] Change default light direction from pointing down +Z to pointing down -Z --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 41266750f1..da3c44f475 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -67,7 +67,7 @@ Lights must be attached to a node by defining the `extensions.KHR_lights_punctua ``` The light will inherit the transform of the node. For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. -For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, 1.0)` and the rotation of the node orients the light accordingly. +For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, -1.0)` and the rotation of the node orients the light accordingly. That is, an untransformed light points down the -Z axis. ## Light Types From 1048d162a44dbcb05aefc1874bfd423cf60135a6 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Wed, 5 Sep 2018 10:50:05 -0700 Subject: [PATCH 29/37] Address several comments --- .../2.0/Khronos/KHR_lights_punctual/README.md | 2 +- .../glTF. KHR_lights_punctual.schema.json | 2 +- .../scene. KHR_lights_punctual.schema.json | 17 ----------------- 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index da3c44f475..5e082d82b7 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -29,7 +29,7 @@ A conforming implementation of this extension must be able to load light data de ## Defining Lights -Lights are defined within a dictionary property in the glTF manifest file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights_punctual` property with a `lights` array inside it. +Lights are defined within a dictionary property in the glTF scene description file, by adding an `extensions` property to the top-level glTF 2.0 object and defining a `KHR_lights_punctual` property with a `lights` array inside it. Each light defines a mandatory `type` property that designates the type of light (`directional`, `point` or `spot`). The following example defines a white-colored directional light. diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json index b4cc36158d..06e7b57a3a 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json @@ -10,7 +10,7 @@ "type": "object", "$ref": "light.schema.json" }, - "default": [] + "minItems": 1 } }, "additionalProperties": false diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json deleted file mode 100644 index 333447b61f..0000000000 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/scene. KHR_lights_punctual.schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema", - "title": "KHR_lights_punctual scene extension", - "type": "object", - "allOf": [ { "$ref": "glTFProperty.schema.json" } ], - "properties": { - "light": { - "allOf": [ - { - "$ref": "glTFid.schema.json" - } - ], - "description": "The id of the light referenced by this node." - } - }, - "additionalProperties": false -} \ No newline at end of file From 10ed0c617212a074492f84aea0cd4b33492163f7 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 2 Oct 2018 09:52:54 -0700 Subject: [PATCH 30/37] Scale affects light orientation, not properties. --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 5e082d82b7..ae41d4f3ec 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -67,7 +67,7 @@ Lights must be attached to a node by defining the `extensions.KHR_lights_punctua ``` The light will inherit the transform of the node. For light types that have a position (`point` and `spot` lights), the light's position is defined as the node's world location. -For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, -1.0)` and the rotation of the node orients the light accordingly. That is, an untransformed light points down the -Z axis. +For light types that have a direction (`directional` and `spot` lights), the light's direction is defined as the 3-vector `(0.0, 0.0, -1.0)` and the rotation of the node orients the light accordingly. That is, an untransformed light points down the -Z axis. The light's transform is affected by the node's world scale, but all properties of the light (such as `range` and `intensity`) are unaffected. ## Light Types @@ -83,6 +83,8 @@ All light types share the common set of properties listed below. | `type` | Declares the type of the light. | :white_check_mark: Yes | | `range` | Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for `point` and `spot` lights. Must be > 0. When undefined, range is assumed to be infinite. | No | +Light properties are unaffected by node transforms — for example, `range` and `intensity` do not change with scale. + ## Range Property The range property (allowed only on point and spot lights) defines a distance cutoff at which the light's intensity must be considered zero, meaning the light no longer affects the surrounding area. This can be useful to cull geometry that a light may not visibly affect, potentially having a significant positive impact on rendering performance. It is required that, when given a non-zero value, rendering engines ignore the light beyond this range. @@ -95,16 +97,18 @@ A recommended implementation for this attenuation with a cutoff range is as foll ### Directional -Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to but ignores position and scale. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2). +Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to; position and scale are ignored except for their effect on the inherited node orientation. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2). ### Point -Point lights emit light in all directions from its position in space (and ignore rotation and scale). The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr). +Point lights emit light in all directions from their position in space; rotation and scale are ignored except for their effect on the inherited node position. The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr). ### Spot Spot lights emit light in a cone in the direction of the local +z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` (and at the location of the light) and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). +A spot light's position and orientation are inherited from its node transform. Inherited scale does not affect cone shape, and is ignored except for its effect on position and orientation. + | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| | `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than or equal to `0` and less than `outerConeAngle`. | No, Default: `0` | From d9313cf686f9de303cda9e1c6b6e1995bd68f4d3 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Wed, 3 Oct 2018 08:47:23 -0700 Subject: [PATCH 31/37] Remove space in filename. --- ...unctual.schema.json => glTF.KHR_lights_punctual.schema.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename extensions/2.0/Khronos/KHR_lights_punctual/schema/{glTF. KHR_lights_punctual.schema.json => glTF.KHR_lights_punctual.schema.json} (99%) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json similarity index 99% rename from extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json index 06e7b57a3a..334da4302f 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF. KHR_lights_punctual.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json @@ -14,4 +14,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +} From fa6d985eacc1401ab548f47f50b1b4d9696139fe Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Wed, 3 Oct 2018 08:47:54 -0700 Subject: [PATCH 32/37] Remove space in filename. --- ...unctual.schema.json => node.KHR_lights_punctual.schema.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename extensions/2.0/Khronos/KHR_lights_punctual/schema/{node. KHR_lights_punctual.schema.json => node.KHR_lights_punctual.schema.json} (99%) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json similarity index 99% rename from extensions/2.0/Khronos/KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json rename to extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json index 716ad65302..e110f170ed 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/node. KHR_lights_punctual.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json @@ -14,4 +14,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +} From 2d240ec7daaba2c2e1969a2a4a15243d264c8fda Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Wed, 3 Oct 2018 09:52:32 -0700 Subject: [PATCH 33/37] +z -> -z --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index ae41d4f3ec..4a782c5eec 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -97,7 +97,7 @@ A recommended implementation for this attenuation with a cutoff range is as foll ### Directional -Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local +z axis. This light type inherits the orientation of the node that it belongs to; position and scale are ignored except for their effect on the inherited node orientation. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2). +Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local -z axis. This light type inherits the orientation of the node that it belongs to; position and scale are ignored except for their effect on the inherited node orientation. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2). ### Point @@ -105,7 +105,7 @@ Point lights emit light in all directions from their position in space; rotation ### Spot -Spot lights emit light in a cone in the direction of the local +z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` (and at the location of the light) and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). +Spot lights emit light in a cone in the direction of the local -z axis. The angle and falloff of the cone is defined using two numbers, the `innerConeAngle` and `outerConeAngle`. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the `innerConeAngle` (and at the location of the light) and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use `outerConeAngle` as the spotlight angle (leaving `innerConeAngle` to implicitly be `0`). A spot light's position and orientation are inherited from its node transform. Inherited scale does not affect cone shape, and is ignored except for its effect on position and orientation. From 93ae7dff5b1b96f89970be24d41a12a492552d1d Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 15 Oct 2018 07:31:38 -0700 Subject: [PATCH 34/37] Make 'light' required on node. --- .../schema/node.KHR_lights_punctual.schema.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json index e110f170ed..cf07cbca09 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/node.KHR_lights_punctual.schema.json @@ -13,5 +13,8 @@ "description": "The id of the light referenced by this node." } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "light" + ] } From e4989c1ac2d2489d9bcec46b75c32c998cecbc20 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 15 Oct 2018 07:33:23 -0700 Subject: [PATCH 35/37] Make 'lights' required on top-level extension. --- .../schema/glTF.KHR_lights_punctual.schema.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json index 334da4302f..4aad41f6f6 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json +++ b/extensions/2.0/Khronos/KHR_lights_punctual/schema/glTF.KHR_lights_punctual.schema.json @@ -13,5 +13,8 @@ "minItems": 1 } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "lights" + ] } From 03f63e0625c765221376b4ce640cd0e3bd739a7a Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 15 Oct 2018 07:38:19 -0700 Subject: [PATCH 36/37] Use default values when 'spot' property is omitted. --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index 4a782c5eec..eb08fda29b 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -114,6 +114,8 @@ A spot light's position and orientation are inherited from its node transform. I | `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than or equal to `0` and less than `outerConeAngle`. | No, Default: `0` | | `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `innerConeAngle` and less than or equal to `PI / 2.0`. | No, Default: `PI / 4.0` | +When the `spot` property is omitted, a spot light must use default values for `innerConeAngle` and `outerConeAngle`. + ```javascript "extensions": { "KHR_lights_punctual" : { From f49c51e8d1a2230ff1db91d1adf79ba48eaab3c5 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 23 Oct 2018 08:51:37 -0700 Subject: [PATCH 37/37] Make spot property required when type is 'spot'. --- extensions/2.0/Khronos/KHR_lights_punctual/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Khronos/KHR_lights_punctual/README.md b/extensions/2.0/Khronos/KHR_lights_punctual/README.md index eb08fda29b..cfb9c4e8e5 100644 --- a/extensions/2.0/Khronos/KHR_lights_punctual/README.md +++ b/extensions/2.0/Khronos/KHR_lights_punctual/README.md @@ -109,13 +109,13 @@ Spot lights emit light in a cone in the direction of the local -z axis. The angl A spot light's position and orientation are inherited from its node transform. Inherited scale does not affect cone shape, and is ignored except for its effect on position and orientation. +When a light's `type` is `spot`, the `spot` property on the light is required. Its properties (below) are optional. + | Property | Description | Required | |:-----------------------|:------------------------------------------| :--------------------------| | `innerConeAngle` | Angle, in radians, from centre of spotlight where falloff begins. Must be greater than or equal to `0` and less than `outerConeAngle`. | No, Default: `0` | | `outerConeAngle` | Angle, in radians, from centre of spotlight where falloff ends. Must be greater than `innerConeAngle` and less than or equal to `PI / 2.0`. | No, Default: `PI / 4.0` | -When the `spot` property is omitted, a spot light must use default values for `innerConeAngle` and `outerConeAngle`. - ```javascript "extensions": { "KHR_lights_punctual" : {