Closed skustra closed 2 years ago
Could I miss some lighting settings maybe?
Can you please install AR Environment Lights? And give the light estimations values you have.
@ThomasGorisse
Values seems correct. Please add a model to the screenshot.
So the app is working well on your phone. I think I know where your issue is coming from. Are you using the ArSceneView directly (not the ArFragment)?
I have Fragment A with has ArFragment inside XML FragmentContainerView with extends BaseArFragment
After I set the:
this.arSceneView.lightEstimationConfig = LightEstimationConfig(Config.LightEstimationMode.DISABLED)
I'm able to see textures but without a camera preview :D
ArSceneViewKt.setLightEstimationConfig(arSceneView, LightEstimationConfig.REALISTIC);
arSceneView.lightEstimationConfig = LightEstimationConfig.REALISTIC
/**
* ### ARCore light estimation configuration
*
* ARCore estimate lighting to provide directional light, ambient spherical harmonics,
* and reflection cubemap estimation
*
* Light bounces off of surfaces differently depending on whether the surface has specular
* (highly reflective) or diffuse (not reflective) properties.
* For example, a metallic ball will be highly specular and reflect its environment, while
* another ball painted a dull matte gray will be diffuse. Most real-world objects have a
* combination of these properties — think of a scuffed-up bowling ball or a well-used credit
* card.
*
* Reflective surfaces also pick up colors from the ambient environment. The coloring of an
* object can be directly affected by the coloring of its environment. For example, a white ball
* in a blue room will take on a bluish hue.
*
* The main directional light API calculates the direction and intensity of the scene's
* main light source. This information allows virtual objects in your scene to show reasonably
* positioned specular highlights, and to cast shadows in a direction consistent with other
* visible real objects.
*
* @see LightEstimationConfig.REALISTIC
* @see LightEstimationConfig.SPECTACULAR
* @see LightEstimationConfig.AMBIENT_INTENSITY
*/
Added doc : https://github.com/SceneView/sceneform-android#environment-lights
@ThomasGorisse I made a video. The first one is the default one. After that, I'm changing the light every 5 seconds :D
It's working! Thanks for your help and for your work!
<3
That's because the default value is applied on the ArFragment not BaseArFragment.
Thanks for the nice Video shots.
@skustra What tool are you using to make your screen record and to make it less then 10Mb?
Thanks for the nice Video shots.
@skustra What tool are you using to make your screen record and to make it less than 10Mb?
I used a native Samsung s21 screen recorder then sent it to the Telegram app (Telegram has optimized it I believe so)
Im using:
implementation("com.gorisse.thomas.sceneform:sceneform:1.20.2")
building .glb model:
waiting for the result:
placing model on on the scene:
I have the same results with dragon.glb, cube.glb, etc. Your sample working just fine. I have no idea whats the problem is really, could You please take a look at this one? Some of the texture are visible, but rest of them not.
Thank you!
The code is based on
**ar-model-viewer**