URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       Mobile AR Framework Support Forum
  HTML https://mobilear.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Outdoor AR Library
       *****************************************************
       #Post#: 43--------------------------------------------------
       Loaded models look very dark
   DIR By: Robot007
       Date: March 31, 2015, 2:17 am
       ---------------------------------------------------------
       Hello,
       Models, that are loaded in Mobile AR Framework are very dark -
       is there a way to control lightning in your framework?
       Thanks for answer!
       #Post#: 44--------------------------------------------------
       Re: Loaded models look very dark
   DIR By: hitlabnz
       Date: April 1, 2015, 10:48 pm
       ---------------------------------------------------------
       0. Normally, the model should appear with not much trouble with
       the default light.
       Most of the case with lighting is because of the model not
       having proper normal vectors.
       In this case, tweaking lighting won't help.
       So the very first thing I would like to recommend trying is
       to check and make sure if your model has proper normal vectors.
       1. One way to work around with lighting is not using lighting,
       but just rely on the texture.
       This will make models appear brighter (i.e. in raw color of
       the texture), but will look flat as it is not lighted.
       To do this use the method:
       scene.setSceneLighting(false);
       where scene is an instance of OAScene.
       2. If you still want more control over lighting, disable the
       default light by
       overriding setupOptions() method in OAARComponentBase class
       and returning OAARComponentBase.OPTION_DISABLE_DEFAULT_LIGHT
       Then you can add your own light with:
       // setup light, since we disabled the default light
       Light light = new Light(0, 1.0f, 0, 0, // directional light
       new Vector4f(0.2f, 0.2f, 0.2f, 1.0f), // Ambient
       new Vector4f(0.2f, 0.2f, 0.2f, 1.0f), // Specular
       new Vector4f(1.0f, 1.0f, 1.0f, 1.0f)); // Diffuse
       getSceneView().getSceneGraph().addLight(light);
       You can put this code in your OnCreate method after calling
       super.OnCreate();
       Hope this helps.
       *****************************************************
       Page 1 of 1