immersive-web/model-element

Means of controlling the shadow

Opened this issue · 4 comments

There are cases where it may not be desirable to have a shadow being cast, because the shadow can be larger than the viewport in which an object is being show. Also, as the "camera" rotates, the shadow can end up looking weird and exposing the boundary of the <model> element.

For example:

Screen Shot 2022-08-09 at 2 25 31 pm

It might be good to disable the shadow entirely? Or some other means for developers to express where the light source should be to cast the shadow where they might want.

A boolean operation of show or hide would be great. I do wonder if there should be a method to adjust the "intensity" of the shadow. In css I believe users often pass in a rgba value where a adjusts the "intensity" but this in a 3D scenario would produce unrealistic shadows in some cases. I also wonder as technology/performance/techniques of 3D rendering improves whether having the ability to adjust the intensity of a shadow becomes moot anyway.

As a start, it might be nice to just disable the shadow... we can start getting into fancier shadow casting/light(s) position/control down the line.

As a start, it might be nice to just disable the shadow... we can start getting into fancier shadow casting/light(s) position/control down the line.

The UA can decide if they want to render shadows or not, or how they are rendered.
A UA that actually draws models in 3D is going to want to control the light source and shadow.