SceneView / sceneview-android

SceneView is a 3D and AR Android Composable and View with Google Filament and ARCore. This is a Sceneform replacement in Kotlin
Apache License 2.0
756 stars 151 forks source link

Skybox solid color #487

Closed Danwolve98 closed 1 month ago

Danwolve98 commented 1 month ago

Hi there, im actually working with this SceneView library, i have followed the example for show a 3d model in a SceneView and it worked perfect, but, actually i wanna change de default skybox by a solid color, i tried multiple things but was imposible for me, i dont know how it works.

I know that if there is a default environment the skybox color will not change, i tried to destroy the default environment, but nothing happened.

Any help would be nice, thank u all.

Danwolve98 commented 1 month ago

Well i found my error, i dont know exactly how work the class Engine if someone can explain it to me a little. I post my solution there, maybe it helps someone.

Wat i was doing

skybox = Skybox.Builder().color(0.05f,0.05f,0.05f,1f).build(Engine.create())

Solution

skybox = Skybox.Builder().color(0.05f,0.05f,0.05f,1f).build(engine)

where engine is the engine from SceneView in xml.