<div dir="ltr">What can we learn from "The Rendering Equation"--Kajiya Is that still the most up-to-date?<div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 20, 2020 at 8:19 PM Richard F. Puk <<a href="mailto:puk@igraphics.com">puk@igraphics.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, Michelis --<br>
<br>
My worry is if multiple light sources are casting shadows from different directions with each light source having a different color. The effect on shadows when shadows from one light source are partially illuminated by a different light with a different light color should be described. The shadows cast by a particular light source with one color may be overlayed by shadows form another light source with a different color. How do we describe how the shadow effect is colored? For example, a shadow cast by a white light may be partially illuminated by a shadow cast from a different direction from a, say, green light. Since X3D is required to support at least eight light sources each of which can be a different color and emanating from a different direction, the interaction of their various shadows needs to be described. What does physics say?<br>
<br>
  -- Dick<br>
<br>
/******************************************<br>
| Richard F. Puk, Ph.D., President<br>
| Intelligraphics Incorporated<br>
| 7644 Cortina Court<br>
| Carlsbad, CA  92009-8206<br>
| Tel: +1-760-753-9027  Mobile:  +1-760-809-9027<br>
| Email:  <a href="mailto:puk@igraphics.com" target="_blank">puk@igraphics.com</a><br>
\****************************************** <br>
<br>
<br>
<br>
-----Original Message-----<br>
From: x3d-public [mailto:<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>] On Behalf Of Michalis Kamburelis<br>
Sent: Tuesday, October 20, 2020 3:04 PM<br>
To: Don Brutzman<br>
Cc: Andreas Plesch; Holger Seelig; doug sanden; X3D Graphics public mailing list<br>
Subject: Re: [x3d-public] X3D Working Group minutes, endgame review: do we include shadows?<br>
<br>
Your prose:<br>
<br>
"""<br>
Lights can cast shadows that reduce the intensity of light behind<br>
occluding shapes.<br>
<br>
Shadows from multiple lights interact in a cumulative fashion.<br>
<br>
Secondary Shape geometry that is occluded behind an intervening Shape<br>
already casting a shadow does not cast a secondary shadow.<br>
"""<br>
<br>
This sounds convoluted, because it follows the idea that shadows<br>
"produce something (darkness), that may be cummulated" :) It is more<br>
straightforward (and true) to follow the thinking that shadows mean<br>
that lighting is obscured, which e.g. makes it obvious without any<br>
extra explanation that there's no such thing as "secondary shadow".<br>
Here's my proposal instead:<br>
<br>
"""<br>
Lights can cast shadows, which means that the amount of lighting<br>
reaching the surface is decreased if the light source is obscured at<br>
the given point.<br>
<br>
Multiple light sources can have shadows enabled. Contribution of each<br>
light source is scaled down independently.<br>
"""<br>
<br>
The modification to lighting equations is quite simple. Where there's<br>
"on_i" right now, it should be changed to "on_i * shadowTest_i" with<br>
the following definition:<br>
<br>
"""<br>
shadowTest_i scales down the light contribution depending on shadow:<br>
<br>
- shadowTest_i is 1.0 if the light source i has "shadow" = FALSE<br>
<br>
- otherwise, shadowTest_i is 1.0 if the light source i has "shadow" =<br>
TRUE but nothing obscures the light, i.e. there is no Shape (that has<br>
visible and castShadow = TRUE) between the light source position and<br>
the given point. The DirectionalLight is treated like a "point in<br>
infinity", which means that shadow rays are all parallel to the light<br>
direction.<br>
<br>
- otherwise, shadowTest_i is "1.0 - shadowIntensity". This occurs when<br>
"shadow" = TRUE and the light is obscured. For example,<br>
"shadowIntensity" equal 1.0 (the default) means that light<br>
contribution drops to zero when the light is obscured by the shadow<br>
caster.<br>
'"""<br>
<br>
Note that it means that *all* light contribution is scaled down,<br>
including ambient term in case of Phong lighting model. And I say this<br>
is deliberate, otherwise Phong and physical lighting models would<br>
require a bit different treatment for shadows, which causes more<br>
problems than it solves IMHO. In physical lighting model there's no<br>
notion of "ambient" anyway.<br>
<br>
BTW, note that future EnvironmentLight will require a bit different<br>
treatment. But we'll cross that bridge in the future, not to worry now<br>
:) (My proposal will be that """It is optional for EnvironmentLight to<br>
support shadows. If it does, it means that at each point, shadow is<br>
applied, estimating how much of the sphere area around the given point<br>
is obscured, assuming that light is cast from a sphere centered in the<br>
middle of the Shape. Some implementations may limit this to<br>
self-shadowing (i.e. only taking into account the same Shape).""" This<br>
is implementable using e.g. radiance transfer.)<br>
<br>
Regards,<br>
Michalis<br>
<br>
wt., 20 paź 2020 o 20:45 Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> napisał(a):<br>
><br>
> Close inspection shows that ShadedVolumeStyle includes field "shadows" so we should keep this one the same.<br>
><br>
> * X3D4 Tooltips ShadedVolumeStyle shadows<br>
>    <a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ShadedVolumeStyle.shadows" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#ShadedVolumeStyle.shadows</a><br>
><br>
> * X3D4 Volume rendering component, 41.4.10 ShadedVolumeStyle<br>
>    <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/volume.html#ShadedVolumeStyle" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/volume.html#ShadedVolumeStyle</a><br>
><br>
> Keeping X3DLightNode shadowIntensity and X3DShapeNode castShadow singular seems OK still.<br>
><br>
> On 10/20/2020 10:20 AM, Don Brutzman wrote:<br>
> ><br>
> > Yes to Andreas on singular use of "shadow*" throughout which also facilitates search.  Was striving for consistency, this helps.<br>
> ><br>
> > Will apply shadows* -> shadow* change to DOCTYPE/Schema later.<br>
><br>
> all the best, Don<br>
> --<br>
> Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<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>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>