<div><div dir="auto">"""<span style="word-spacing:1px;color:rgb(49,49,49)">For example, shapes with a PhysicalMaterial</span></div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">could use a linear color space, while other shapes could use a srgb</span><br style="color:rgb(212,212,213);font-family:-apple-system,HelveticaNeue;word-spacing:1px"><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">space.""" --- and this is exactly what Castle Game Engine is doing by default now:)</span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)"><br></span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">It makes nice backward compatibility, so we didn't break how the existing assets look like suddenly. But indeed it is more complicated than just "apply gamma always" like X3DOM.</span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)"><br></span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">I agree that choice whether to use gamma or not should be possible inside X3D file, so it warrants additional node. The scene author knows how the assets were prepared.</span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)"><br></span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">So I'm all after Environment node like X3DOM. I think the only difficult decision here is "what should be default" :)</span></div><div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)"><br></span></div><div style="background-color:rgba(0,0,0,0)!important;border-color:rgb(255,255,255)!important"><font style="border-color:rgb(49,49,49);color:rgb(49,49,49)"><span style="word-spacing:1px">Regards,</span></font></div><div style="background-color:rgba(0,0,0,0);border-color:rgb(255,255,255)"><font style="border-color:rgb(49,49,49);color:rgb(49,49,49)"><span style="word-spacing:1px">Michalis</span></font></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">W dniu śr., 2.09.2020 o 18:05 Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">One, I think important, reason to allow a scene author to choose gamma<br><br>correction for a scene with a node such as Environment or field value<br><br>is that only the author knows how colors and textures in the scene are<br><br>supposed to be used. Only the author knows if colors provided in the<br><br>scene are defined for a linear color space or a srgb color space.<br><br><br><br>Another, unrelated, question is if it should be possible to allow<br><br>mixed use of color spaces. For example, shapes with a PhysicalMaterial<br><br>could use a linear color space, while other shapes could use a srgb<br><br>space. That means, instead of a global gamma correction field, there<br><br>could be a field with a more local scope. This is a larger change and<br><br>perhaps too complex.<br><br><br><br>-Andreas<br><br><br><br>On Wed, Sep 2, 2020 at 11:25 AM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br><br>><br><br>> Thanks Michalis and everyone for renewed scrutiny on gamma and SRGB.<br><br>><br><br>> Meanwhile a small point: we don't need to worry about the potential burden of adding another node (i.e. Environment).<br><br>><br><br>> There is already a modest number of global capabilities that are defined in Scene Access Interface (SAI).  So gamma correction options can be hung in there somewhere.  If ever needed by an author (likely rare) they might nevertheless access the property via Script node.<br><br>><br><br>> ==============================<br><br>> Extensible 3D (X3D) Part 2: Scene access interface (SAI)<br><br>> 6.3 Browser services<br><br>><br><br>> <a href="https://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#BrowserServices" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#BrowserServices</a><br><br>><br><br>> 6.3 Browser services<br><br>> 6.3.1 Introduction<br><br>> 6.3.2 getName<br><br>> 6.3.3 getVersion<br><br>> 6.3.4 getCurrentSpeed<br><br>> 6.3.5 getCurrentFrameRate<br><br>> 6.3.6 getSupportedProfiles<br><br>> 6.3.7 getProfile<br><br>> 6.3.8 getSupportedComponents<br><br>> 6.3.9 getComponent<br><br>> 6.3.10 getExecutionContext<br><br>> 6.3.11 createScene<br><br>> 6.3.12 replaceWorld<br><br>> 6.3.13 importDocument<br><br>> 6.3.14 loadURL<br><br>> 6.3.15 setDescription<br><br>> 6.3.16 createX3DFromString<br><br>> 6.3.17 createX3DFromStream<br><br>> 6.3.18 createX3DFromURL<br><br>> 6.3.19 updateControl<br><br>> 6.3.20 registerBrowserInterest<br><br>> 6.3.21 getRenderingProperties<br><br>> 6.3.22 getBrowserProperties<br><br>> 6.3.23 changeViewpoint<br><br>> 6.3.24 print/println<br><br>> 6.3.25 dispose<br><br>> 6.3.26 setBrowserOption<br><br>><br><br>> ==============================<br><br>> Extensible 3D (X3D) Part 2: Scene access interface (SAI)<br><br>> 6 Services reference, 6.3.26 setBrowserOption<br><br>><br><br>> <a href="https://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#setBrowserOption" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#setBrowserOption</a><br><br>><br><br>> parameters:     SAIBrowserRef, SAIString, SAIObject<br><br>> returns:        SAIBoolean<br><br>> errors: SAI_INVALID_OPERATION_TIMING<br><br>> events: None<br><br>> buffered:       No<br><br>> external:       Yes<br><br>><br><br>> The setBrowserOption service allows setting options defined in 9.2.4 Browser options in ISO/IEC 19775-1. The name field shall be one of the defined names in Table 9.2 in ISO/IEC 19775-1. This service shall return an SAIBoolean value indicating whether the change request was successful. A browser is not required to support dynamic changes to any options. If a browser option is not supported, a value of FALSE shall be returned.<br><br>><br><br>> ==============================<br><br>> Extensible 3D (X3D) Part 2: Scene access interface (SAI)<br><br>> 6.4 Execution context services<br><br>><br><br>> <a href="https://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ExecutionContextServices" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ExecutionContextServices</a><br><br>><br><br>> 6.4 Execution context services<br><br>> 6.4.1 getSpecificationVersion<br><br>> 6.4.2 getEncoding<br><br>> 6.4.3 getProfile<br><br>> 6.4.4 getComponents<br><br>> 6.4.5 getUnits<br><br>> 6.4.6 getWorldURL<br><br>> 6.4.7 getNode<br><br>> 6.4.8 createNode<br><br>> 6.4.9 createProto<br><br>> 6.4.10 namedNodeHandling<br><br>> 6.4.11 getProtoDeclaration<br><br>> 6.4.12 protoDeclarationHandling<br><br>> 6.4.13 getExternProtoDeclaration<br><br>> 6.4.14 externprotoDeclarationHandling<br><br>> 6.4.15 getRootNodes<br><br>> 6.4.16 getRoutes<br><br>> 6.4.17 dynamicRouteHandling<br><br>> 6.4.18 dispose<br><br>><br><br>> ==============================<br><br>><br><br>> On 9/1/2020 12:42 PM, Michalis Kamburelis wrote:<br><br>> > 9. [...] We need to talk and figure out what is best. Opinion from other browser implementors is necessary to make a proper decision here, IMHO. I'm leaning toward<br><br>> ><br><br>> >    Environment {<br><br>> >      SFString gammaCorrectionDefault "DEFAULT" # ["DEFAULT", "NONE", "LINEAR"]<br><br>> >    }<br><br>> ><br><br>> >    Where "DEFAULT" == browser-specific behaviour.<br><br>> ><br><br>> >     So it is not a perfect solution (because we avoid specifying the default), but it allows authors to force/disable gamma correction if desired.<br><br>> [...]<br><br>><br><br>> all the best, Don<br><br>> --<br><br>> Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br><br>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br><br>> X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br><br><br><br><br><br><br><br>-- <br><br>Andreas Plesch<br><br>Waltham, MA 02453<br><br></blockquote></div></div>