Wednesday, June 20, 2012

Various Lighting in Gladius

‹prev | My Chain | next›

I finally got lighting more or less working in Gladius last night. I am curious if it is actually "more" or "less".

I ended with a light definition of:
    var lightDefinition = new cubicvr.LightDefinition({
      intensity: 20,
      distance: 20,
      light_type: cubicvr.LightDefinition.LightTypes.POINT,
      method: cubicvr.LightDefinition.LightingMethods.DYNAMIC
    })
Which produced a decently lit scene:



I wonder if a different light type might produce different / better results. So I switch from POINT to DIRECTIONAL:
    var lightDefinition = new cubicvr.LightDefinition({
      light_type: cubicvr.LightDefinition.LightTypes.DIRECTIONAL,
      method: cubicvr.LightDefinition.LightingMethods.DYNAMIC,
      intensity: 20,
      distance: 30
    })
But end up with:



Not ideal by any imagination. I try several variation of intensity, distance and even direction without any change in this dimly lit scene.

Unfortunately it is better than others. AREA, for instance results in:
Uncaught Error: already completed 
It seems best to stay on the lighting happy path of POINT. At least for now.

Day #424

No comments:

Post a Comment