Skip to content

How to set background of scene view ? #508

Answered by jaswant-iotric
dinkar1708 asked this question in Q&A
Discussion options

You must be logged in to vote

There you go!

`private fun setupTransparentSceneView() {
sceneView = findViewById(R.id.mSceneView)
sceneView.lifecycle = this.lifecycle

    sceneView.setZOrderOnTop(true)
    sceneView.setBackgroundColor(android.graphics.Color.TRANSPARENT)
    sceneView.holder.setFormat(PixelFormat.TRANSLUCENT)
    sceneView.uiHelper.isOpaque = false
    sceneView.view.blendMode = com.google.android.filament.View.BlendMode.TRANSLUCENT
    sceneView.scene.skybox = null

    val options = sceneView.renderer.clearOptions
    options.clear = true
    sceneView.renderer.clearOptions = options


    sceneView.view.dynamicResolutionOptions =
        View.DynamicResolutionOptions().apply {
            enabled = t…

Replies: 13 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@momintahir
Comment options

Answer selected by ThomasGorisse
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
6 participants
Converted from issue

This discussion was converted from issue #306 on May 27, 2024 10:14.