[x3d-public] COBWEB IMPLEMENTS DYNAMIC SHADOWS

Holger Seelig holger.seelig at yahoo.de
Sat Sep 17 05:42:26 PDT 2016


 > We look forward to learning more about how you have accomplished this
 > capability, how it might utilize WebGL or other renderers, and how it
 > might be similarly implemented in other players.

Current ligthing calculation taken from
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html:

Irgb = IFrgb × (1 -f0)
         + f0 × (OE rgb + SUM( oni × attenuationi × spoti × ILrgb
                              × (ambienti + diffusei + specular i)))


Cobweb shadow color calculation just linear interpolates the light color 
and the shadow color with the shadow intensity for the current fragment. 
This means shadow is just a dark light:


SLrgb = shadow color
SIi   = shadow intensity for current fragment, with shadow diffussion.


Irgb = IFrgb × (1 -f0)
         + f0 × (OE rgb + SUM( oni × attenuationi × spoti × mix (ILrgb, 
SLrgb, SIi)
                              × (ambienti + diffusei + specular i)))


Am 16.09.2016 um 22:56 schrieb Don Brutzman:
> Holger, congratulations on such wonderful progress!   8)
>
> The X3D Working Group indeed lists shadows on the set of capabilities
> desired for X3D v4.
>
>     X3D version 4.0 Development
>     http://www.web3d.org/wiki/index.php/X3D_version_4.0_Development
>
> We look forward to learning more about how you have accomplished this
> capability, how it might utilize WebGL or other renderers, and how it
> might be similarly implemented in other players.
>
> Good to see that your default shadowIntensity  is 0, keeping the
> rendering of legacy content the same by default.
>
> Wondering if shadowMapSize is essentially a player setting that perhaps
> doesn't need to be exposed to model authors?
>
>
> On 9/16/2016 11:10 AM, Holger Seelig wrote:
>> *** COBWEB IMPLEMENTS DYNAMIC SHADOWS ***
>>
>> With its new and up to date version 1.28, Cobweb implements dynamic
>> shadows now.
>>
>> THIS IS AN EXPERIMENTAL FEATURE!
>>
>> For a live demonstration have a look at:
>> http://titania.create3000.de/cobweb/dynamic-shadows/
>>
>> Cobweb adds four important fields to every light node.
>>
>> X3DLightNode : X3DChildNode {
>>  ...
>>  SFColor [in,out] shadowColor      0 0 0  [0,1]
>>  SFFloat [in,out] shadowIntensity  0      [0,1]
>>  SFFloat [in,out] shadowDiffusion  0      [0,inf)
>>  SFInt32 []       shadowMapSize    1024   (-inf,inf)
>> }
>>
>> All light sources contain an shadowIntensity, a shadowColor, a
>> shadowDiffusion, and a shadowMapSize field.  The shadowIntensity field
>> specifies the darkness of the shadow.  Shadow intensity may range from
>> 0.0 (no shadow) to 1.0 (full intensity).  The shadowColor field
>> specifies the spectral colour properties of the shadow as an RGB
>> value. The shadowDiffusion field specifies an blur over the shadow.
>> Shadow diffusion may range from 0.0 length units (no blur) to
>> infinity.  For every light there must be rendered an image of the
>> shadow, the shadow map.  The shadowMapSize field specifies the size of
>> this image in pixels.
>>
>> For a live demonstration have a look at:
>> http://titania.create3000.de/cobweb/dynamic-shadows/
>>
>> Best regards,
>> Holger
>>
>> *** COBWEB IMPLEMENTS DYNAMIC SHADOWS ***
>
> all the best, Don


-- 
Holger Seelig
Mediengestalter Digital – Digital Media Designer

Scheffelstraße 31a
04277 Leipzig
Germany

Cellular: +49 1577 147 26 11
E-Mail:   holger.seelig at create3000.de
Web:      http://titania.create3000.de

Future to the fantasy ★ ★



More information about the x3d-public mailing list