Skip to content

Commit 4ea2784

Browse files
authored
update commerce to neutral (#4760)
1 parent 9fa1fa2 commit 4ea2784

File tree

10 files changed

+32
-30
lines changed

10 files changed

+32
-30
lines changed

packages/modelviewer.dev/data/docs.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
"name": "a11y",
8080
"htmlName": "a11y",
8181
"description": "Add unique translations for the model wcag compliance. Use this attribute, you must provide a JSON object with the following keys: front, back, left, right, upper-front, upper-back, upper-left, upper-right, lower-front, lower-back, lower-left, lower-right, interaction-prompt. The values of these keys should be the translations for the model's orientation. This attribute is useful for screen readers and other assistive technologies.",
82-
"links": ["<a href=\"../examples/loading/#useA11y\">Related examples</a>"],
82+
"links": [
83+
"<a href=\"../examples/loading/#useA11y\">Related examples</a>"
84+
],
8385
"default": {
8486
"default": "null",
8587
"options": "{&quot;front&quot;: &quot;Front of 3D model&quot;,&quot;back&quot;: &quot;Back of 3D model&quot;,&quot;left&quot;: &quot;Left of 3D model&quot;,&quot;right&quot;: &quot;Right of 3D model&quot;,&quot;upper-front&quot;: &quot;Upper front of 3D model&quot;,&quot;upper-back&quot;: &quot;Upper back of 3D model&quot;,&quot;upper-left&quot;: &quot;Upper left of 3D model&quot;,&quot;upper-right&quot;: &quot;Upper right of 3D model&quot;,&quot;lower-front&quot;: &quot;Lower front of 3D model&quot;,&quot;lower-back&quot;: &quot;Lower back of 3D model&quot;,&quot;lower-left&quot;: &quot;Lower left of 3D model&quot;,&quot;lower-right&quot;: &quot;Lower right of 3D model&quot;,&quot;interaction-prompt&quot;: &quot;'Use mouse, touch or arrow keys to move&quot;}"
@@ -895,13 +897,13 @@
895897
{
896898
"name": "tone-mapping",
897899
"htmlName": "toneMapping",
898-
"description": "Selects the function that compresses the HDR rendering to an SDR image on your screen. ACES is a film industry standard that is commonly used, though it has serious color-accuracy problems. AgX is a new and improved tone mapper seeing broad adoption in film and games.Commerce is a function designed specifically for accurate color reproduction in e-commerce. Our current default is and has been ACES, but in v4.0 this default will change to Commerce.",
900+
"description": "Selects the function that compresses the HDR rendering to an SDR image on your screen. ACES is a film industry standard that is commonly used, though it has serious color-accuracy problems. AgX is a new and improved tone mapper seeing broad adoption in film and games. Khronos PBR Neutral ('neutral') is a standard function designed specifically for accurate color reproduction in e-commerce. Our current default is and has been ACES, but in v4.0 this default will change to neutral. The deprecated name commerce is an alias for neutral.",
899901
"links": [
900902
"<a href=\"../examples/lightingandenv/#toneMapping\"><span class='attribute'>tone-mapping</span> example</a>"
901903
],
902904
"default": {
903905
"default": "aces",
904-
"options": "aces, agx, commerce"
906+
"options": "aces, agx, neutral"
905907
}
906908
},
907909
{

packages/modelviewer.dev/examples/annotations/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ <h4><span class="font-medium">Show Dimensions. </span></h4>
289289
</p>
290290
<example-snippet stamp-to="dimensions" highlight-as="html">
291291
<template>
292-
<model-viewer id="dimension-demo" ar ar-modes="webxr" ar-scale="fixed" camera-orbit="-30deg auto auto" max-camera-orbit="auto 100deg auto" shadow-intensity="1" camera-controls touch-action="pan-y" src="../../assets/ShopifyModels/Chair.glb" tone-mapping="commerce" alt="A 3D model of an armchair.">
292+
<model-viewer id="dimension-demo" ar ar-modes="webxr" ar-scale="fixed" camera-orbit="-30deg auto auto" max-camera-orbit="auto 100deg auto" shadow-intensity="1" camera-controls touch-action="pan-y" src="../../assets/ShopifyModels/Chair.glb" tone-mapping="neutral" alt="A 3D model of an armchair.">
293293
<button slot="hotspot-dot+X-Y+Z" class="dot" data-position="1 -1 1" data-normal="1 0 0"></button>
294294
<button slot="hotspot-dim+X-Y" class="dim" data-position="1 -1 0" data-normal="1 0 0"></button>
295295
<button slot="hotspot-dot+X-Y-Z" class="dot" data-position="1 -1 -1" data-normal="1 0 0"></button>

packages/modelviewer.dev/examples/augmentedreality/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h4>Customize a WebXR Augmented Reality session with HTML, CSS, and JS in Chrome
8080
</div>
8181
<example-snippet stamp-to="webXR" highlight-as="html">
8282
<template>
83-
<model-viewer src="../../assets/ShopifyModels/Chair.glb" poster="../../assets/ShopifyModels/Chair.webp" tone-mapping="commerce" shadow-intensity="1" ar camera-controls touch-action="pan-y" alt="A 3D model carousel">
83+
<model-viewer src="../../assets/ShopifyModels/Chair.glb" poster="../../assets/ShopifyModels/Chair.webp" tone-mapping="neutral" shadow-intensity="1" ar camera-controls touch-action="pan-y" alt="A 3D model carousel">
8484

8585
<button slot="ar-button" id="ar-button">
8686
View in your space
@@ -412,7 +412,7 @@ <h4></h4>
412412
<template>
413413
<div class="demo" style="background: linear-gradient(#ffffff, #ada996); overflow-x: hidden;">
414414
<span style="position: absolute; text-align: center; font-size: 100px; line-height: 100px; left: 50%; transform: translateX(-50%);">Background<br>is visible<br>through<br>transparent<br>objects.</span>
415-
<model-viewer camera-controls touch-action="pan-y" src="../../shared-assets/models/glTF-Sample-Assets/Models/ToyCar/glTF-Binary/ToyCar.glb" tone-mapping="commerce" ar alt="A 3D transparency test" style="background-color: unset;"></model-viewer>
415+
<model-viewer camera-controls touch-action="pan-y" src="../../shared-assets/models/glTF-Sample-Assets/Models/ToyCar/glTF-Binary/ToyCar.glb" tone-mapping="neutral" ar alt="A 3D transparency test" style="background-color: unset;"></model-viewer>
416416
</div>
417417
</template>
418418
</example-snippet>

packages/modelviewer.dev/examples/color.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ <h2>Achieving Color-Accurate Presentation with glTF</h2>
144144
<model-viewer
145145
src="../assets/ShopifyModels/GeoPlanter.glb"
146146
poster="../assets/ShopifyModels/GeoPlanter.webp"
147-
tone-mapping="commerce"
147+
tone-mapping="neutral"
148148
shadow-intensity="1"
149149
camera-controls
150150
alt="3D model of a cactus"
@@ -392,10 +392,10 @@ <h3 id="photography">How does rendering compare to photography?</h3>
392392
<p>Tone mapping comes at the difficult intersection between art and science.
393393
We have found through painful experience that the existing tone mapping
394394
functions do not meet the needs of e-commerce for color-accuracy, and so we
395-
have developed a Commerce tone mapper for exactly this purpose. If you have
395+
have developed the Khronos PBR Neutral tone mapper for exactly this purpose. If you have
396396
precise sRGB color swatches that you have used to create your glTF materials
397397
and want them to come through as unaltered as possible, we strongly
398-
recommend using our "commerce" tone-mapping function and our default
398+
recommend using our "neutral" tone-mapping function and our default
399399
lighting or another suitable grayscale lighting environment.</p>
400400

401401
<p>Below is an example where you can see first-hand how much difference tone
@@ -412,13 +412,13 @@ <h3 id="photography">How does rendering compare to photography?</h3>
412412
<model-viewer
413413
id="tone-mapping"
414414
src="../assets/ShopifyModels/Mixer.glb"
415-
tone-mapping="commerce"
415+
tone-mapping="neutral"
416416
camera-controls
417417
alt="Tone mapping comparisons for different 3D models"
418418
>
419419
<p>Tone Mapping:
420420
<select id="tone">
421-
<option value="commerce">Commerce</option>
421+
<option value="neutral">PBR Neutral</option>
422422
<option value="aces">ACES</option>
423423
<option value="agx">AgX</option>
424424
</select><br/>
@@ -579,30 +579,30 @@ <h3 id="takeaway">What's the takeaway?</h3>
579579

580580
<p>Still, for most e-commerce vendors that are likely managing separate
581581
contracts for 3D model creation and interactive website design, simplicity
582-
is key to cost-effectiveness. My recommendation is to use our Commerce tone
582+
is key to cost-effectiveness. My recommendation is to use our PBR Neutral tone
583583
mapping and if you already have approved marketing colors for your products,
584584
then tell your artists to use those for the baseColor. Use a grayscale
585585
lighting environment (like our default), adjusting if necessary to place
586586
highlights and change exposure.</p>
587587

588588
<p>If the color is not known, but being matched by eye, then ensure the
589-
artist's tools also use the Commerce tone mapper and a lighting environment
589+
artist's tools also use the Khronos PBR Neutral tone mapper and a lighting environment
590590
that is as close as possible to the production grayscale lighting
591-
environment. Since our Commerce tone mapper is relatively new, it may not be
591+
environment. Since our PBR Neutral tone mapper is relatively new, it may not be
592592
available in tools; in this case the next best thing is to turn off tone
593593
mapping entirely. Make sure to educate your artists on the differences they
594594
can expect - blown out highlights with hue skews, and saturation loss for
595595
dark colors. Ensure they also frequently test their output in a
596596
near-production environment, hopefully using &lt;model-viewer&gt; with
597-
<code>tone-mapping="commerce"</code>. This way they can calibrate and ensure
597+
<code>tone-mapping="neutral"</code>. This way they can calibrate and ensure
598598
the end user will see realistic colors.</p>
599599

600600
<figure>
601601
<model-viewer
602602
id="environments"
603603
src="../assets/ShopifyModels/Mixer.glb"
604604
skybox-image="../../shared-assets/environments/neutral.hdr"
605-
tone-mapping="commerce"
605+
tone-mapping="neutral"
606606
camera-controls
607607
alt="3D model of a blender"
608608
>

packages/modelviewer.dev/examples/lightingandenv/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h2 class="demo-title">Showing the difference between our two baked-in lighting
139139
</div>
140140
<example-snippet stamp-to="neutralLighting" highlight-as="html">
141141
<template>
142-
<model-viewer id="neutral-demo" tone-mapping="commerce" camera-controls touch-action="pan-y" auto-rotate alt="A 3D model of a kitchen mixer" src="../../assets/ShopifyModels/GeoPlanter.glb">
142+
<model-viewer id="neutral-demo" tone-mapping="neutral" camera-controls touch-action="pan-y" auto-rotate alt="A 3D model of a kitchen mixer" src="../../assets/ShopifyModels/GeoPlanter.glb">
143143
<label for="neutral">Neutral Lighting: </label>
144144
<input id="neutral" type="checkbox" checked="true">
145145
</model-viewer>
@@ -166,17 +166,17 @@ <h2 class="demo-title">Showing the difference between our two baked-in lighting
166166
<div class="heading">
167167
<h2 class="demo-title">Comparing tone mapping</h2>
168168
<p>Tone mapping is the critical last stage of the rendering pipeline that controls the final look of your model. It is necessary because the reflections are often much brighter than a screen can reproduce, so they must be smoothly mapped into the sRGB range, ideally while avoiding clipping artifacts or hue shifts. The image sensor and processing on a digital camera performs a similar step. </p>
169-
<p>Commerce in our new tone mapper, designed specifically for the color accuracy needs of e-commerce. It is guaranteed to avoid all hue shifts, has a relatively sharp rolloff in intensity, and a slower progression to white. This is designed to pass the widest range of base color values through unchanged to the screen, while preserving enough headroom for highlights to show well. Commerce will become our default in our next major release, v4.0.</p>
169+
<p>Khronos PBR Neutral is our new tone mapper, designed specifically for the color accuracy needs of e-commerce. It is guaranteed to avoid all hue shifts, has a relatively sharp rolloff in intensity, and a slower progression to white. This is designed to pass the widest range of base color values through unchanged to the screen, while preserving enough headroom for highlights to show well. Neutral will become our default in our next major release, v4.0.</p>
170170
<p>ACES is a film industry standard that is widely used in graphics and is and has been our default tone mapper. However, it produces serious hue shifts and extreme desaturation, making bright yellow and cyan unattainable under any lighting. See for yourself in this example.</p>
171171
<p>AgX is a relatively new tone mapper that is getting a lot of adoption in graphics. It has less hue shifting than ACES and may be a good option for matching existing artist workflows, but has the same drawback of significant desaturation. However, in more artistic scenes this can be beneficial since it allows for a slower intensity rolloff.</p>
172-
<p>For an apples-to-apples comparison of ACES to Commerce with custom lighting, set the Commerce exposure to 1 and the ACES exposure to 0.77 to account for ACES being artificially bright. This compensation is automatic for our built-in lighting.</p>
172+
<p>For an apples-to-apples comparison of ACES to Neutral with custom lighting, set the Neutral exposure to 1 and the ACES exposure to 0.77 to account for ACES being artificially bright. This compensation is automatic for our built-in lighting.</p>
173173
</div>
174174
<example-snippet stamp-to="toneMapping" highlight-as="html">
175175
<template>
176-
<model-viewer id="tone-demo" tone-mapping="commerce" camera-controls touch-action="pan-y" auto-rotate alt="A 3D model of a kitchen mixer" src="../../assets/ShopifyModels/Mixer.glb">
176+
<model-viewer id="tone-demo" tone-mapping="neutral" camera-controls touch-action="pan-y" auto-rotate alt="A 3D model of a kitchen mixer" src="../../assets/ShopifyModels/Mixer.glb">
177177
<p>Tone Mapping:</p>
178178
<select id="tone">
179-
<option value="commerce">Commerce</option>
179+
<option value="neutral">Neutral</option>
180180
<option value="aces">ACES</option>
181181
<option value="agx">AgX</option>
182182
</select>

packages/modelviewer.dev/examples/loading/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ <h4>
230230
</div>
231231
<example-snippet stamp-to="dracoSupport" highlight-as="html">
232232
<template>
233-
<model-viewer camera-controls touch-action="pan-y" alt="A 3D model of a boom box" src="../../shared-assets/models/glTF-Sample-Assets/Models/BoomBox/glTF-Draco/BoomBox.gltf" tone-mapping="commerce">
233+
<model-viewer camera-controls touch-action="pan-y" alt="A 3D model of a boom box" src="../../shared-assets/models/glTF-Sample-Assets/Models/BoomBox/glTF-Draco/BoomBox.gltf" tone-mapping="neutral">
234234
</model-viewer>
235235
</template>
236236
</example-snippet>
@@ -306,7 +306,7 @@ <h4>
306306
</div>
307307
<example-snippet stamp-to="ktx2Support" highlight-as="html">
308308
<template>
309-
<model-viewer camera-controls touch-action="pan-y" alt="A 3D model of a fish" src="../../shared-assets/models/BarramundiFish.mixed.glb" tone-mapping="commerce">
309+
<model-viewer camera-controls touch-action="pan-y" alt="A 3D model of a fish" src="../../shared-assets/models/BarramundiFish.mixed.glb" tone-mapping="neutral">
310310
</model-viewer>
311311
</template>
312312
</example-snippet>
@@ -332,7 +332,7 @@ <h4>
332332
</div>
333333
<example-snippet stamp-to="meshoptSupport" highlight-as="html">
334334
<template>
335-
<model-viewer camera-controls touch-action="pan-y" alt="A 3D model of a mechanical coffee mug contraption" src="../../shared-assets/models/coffeemat.glb" tone-mapping="commerce">
335+
<model-viewer camera-controls touch-action="pan-y" alt="A 3D model of a mechanical coffee mug contraption" src="../../shared-assets/models/coffeemat.glb" tone-mapping="neutral">
336336
</model-viewer>
337337
</template>
338338
</example-snippet>
@@ -394,7 +394,7 @@ <h4>Our renderer tries to keep the frame rate between 38 and 60 frames per secon
394394
</div>
395395
<example-snippet stamp-to="renderScale" highlight-as="html">
396396
<template>
397-
<model-viewer id="scale" alt="A 3D model of a toy car" camera-controls touch-action="pan-y" auto-rotate src="../../shared-assets/models/glTF-Sample-Assets/Models/ToyCar/glTF-Binary/ToyCar.glb" tone-mapping="commerce" ar>
397+
<model-viewer id="scale" alt="A 3D model of a toy car" camera-controls touch-action="pan-y" auto-rotate src="../../shared-assets/models/glTF-Sample-Assets/Models/ToyCar/glTF-Binary/ToyCar.glb" tone-mapping="neutral" ar>
398398
Reported DPR: <span id="reportedDpr"></span><br/>
399399
Rendered DPR: <span id="renderedDpr"></span><br/>
400400
Minimum DPR: <span id="minimumDpr"></span><br/>

packages/modelviewer.dev/examples/scenegraph/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ <h2 class="demo-title">Swap Model Variants</h2>
9494
</div>
9595
<example-snippet stamp-to="variants" highlight-as="html">
9696
<template>
97-
<model-viewer id="shoe" camera-controls touch-action="pan-y" src="../../shared-assets/models/glTF-Sample-Assets/Models/MaterialsVariantsShoe/glTF-Binary/MaterialsVariantsShoe.glb" tone-mapping="commerce" ar alt="A 3D model of a Shoe">
97+
<model-viewer id="shoe" camera-controls touch-action="pan-y" src="../../shared-assets/models/glTF-Sample-Assets/Models/MaterialsVariantsShoe/glTF-Binary/MaterialsVariantsShoe.glb" tone-mapping="neutral" ar alt="A 3D model of a Shoe">
9898
<div class="controls">
9999
<div>Variant: <select id="variant"></select></div>
100100
</div>

packages/modelviewer.dev/examples/tone-mapping.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ <h3 id="commerce">Khronos PBR Neutral tone mapper</h3>
483483
<model-viewer
484484
id="demo"
485485
src="../../shared-assets/models/MacbethBalls.glb"
486-
tone-mapping="commerce"
486+
tone-mapping="neutral"
487487
ar
488488
camera-controls
489489
shadow-intensity="1"
@@ -534,7 +534,7 @@ <h3 id="validation">Validation</h3>
534534
id="demo"
535535
src="../../shared-assets/models/MacbethBalls.glb"
536536
skybox-image="../../shared-assets/environments/white_furnace.hdr"
537-
tone-mapping="commerce"
537+
tone-mapping="neutral"
538538
ar
539539
camera-controls
540540
shadow-intensity="1"

packages/space-opera/src/components/ibl_selector/ibl_selector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export class IblSelector extends ConnectedLitElement {
208208
<me-dropdown
209209
style="align-self: center; width: 70%;"
210210
@select=${this.onSelectToneMapping}>
211-
<paper-item value="commerce">Commerce</paper-item>
211+
<paper-item value="neutral">Neutral</paper-item>
212212
<paper-item>ACES</paper-item>
213213
<paper-item value="agx">AgX</paper-item>
214214
</me-dropdown>

packages/space-opera/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const INITIAL_STATE: State = {
126126
arConfig: {ar: true, arModes: 'webxr scene-viewer quick-look'},
127127
bestPractices: {progressBar: true, arButton: true, arPrompt: true},
128128
config:
129-
{cameraControls: true, shadowIntensity: 1, toneMapping: 'commerce'},
129+
{cameraControls: true, shadowIntensity: 1, toneMapping: 'neutral'},
130130
poster: {height: 512, mimeType: 'image/webp'},
131131
hotspots: [],
132132
relativeFilePaths: {posterName: 'poster.webp'},

0 commit comments

Comments
 (0)