sceneform-android-sdk
sceneform-android-sdk copied to clipboard
Setting environment lighting
Hi,
Is it possible to define a uniform environment lighting?
When adding a ModelRenderable
to the scene graph, one side of the model is darker than the other, according to the Sun
position.
I don't want to show shadows at all, so I'm looking for a uniform lighting.
I tried the following, but it just made the scene darker:
arFragment.getArSceneView().getScene().getSunlight().setEnabled(false);
Thanks!
The sun light is not the only light enabled by default. Sceneform adds an environment light based on an image (IBL/image-based lighting). This environment light cannot be customized currently, hopefully in a future version.
Do you want a uniform environment light or simply to turn off lighting for your object? If the latter you should simply used an unlit
material.
@romainguy can you please explain the difference between "uniform environment light" to "turn off lighting for your object"?
@itanbp With a uniform environment we will compute per-pixel lighting on your object, it's just that it will look the same from all angles at a rather large cost. The appearance of the object will depend on the color of the light, its intensity, etc. With an unlit
material, we won't perform any lighting computations at all. Your object will also look the same from all angles, but it will be very, very cheap.
Do you have more information about what you're trying to accomplish? Models or screenshots would be helpful to find a solution to your problem.
Thanks!
@romainguy look how at the first image the sphere looks white, while in the second more off-white. This are the opposites angles of the same sphere.
Yes that's because of the default environment light.
So @romainguy , is there a way to disable, or customize the environment lighting ? I'm trying to create a dark room lit with just a few candles. I'm using point-lights to do so but the default environment makes the whole thing off.
The public API is still unavailable unfortunately. @dsternfeld7 might be able to talk more about this.
Another use case is using SceneView
for non-AR purposes - when using SceneView
, it should be possible to disable the IBL completely.
The sun light is not the only light enabled by default. Sceneform adds an environment light based on an image (IBL/image-based lighting). This environment light cannot be customized currently, hopefully in a future version.
Do you want a uniform environment light or simply to turn off lighting for your object? If the latter you should simply used an
unlit
material.
any progress on this? how to change sun's position? a want to put the sun just right above some node, because shadows produced by my nodes do not look realistic very often
Second this....need to use sceneform for non AR...just as a 3D environment and the IBL needs to be disabled 😔
Any news about this one? I'm trying to display signs (Cubes constructed by the SHapeFactory) the user supposed to read, and the lightning in some cases completely washes away the colors and the sign becomes almost unreadable (white).