Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha Value Not Working Properly In Scenefrom GLB file #5736

Closed
arun4fms opened this issue Jun 25, 2022 · 3 comments
Closed

Alpha Value Not Working Properly In Scenefrom GLB file #5736

arun4fms opened this issue Jun 25, 2022 · 3 comments

Comments

@arun4fms
Copy link

am using sceneform with modelrenderable where GLB is loaded from an external URL. I tried to change the opacity of the GLB with the given below method, but there is no change in alpha or opacity.

private void addHighlightToNode(Node node, ModelRenderable andyRenderablee) {
MaterialInstance[] materialInstances = filamentAsset.getMaterialInstances();

    TextureSampler textureSampler = new TextureSampler();
    for(MaterialInstance materialInstance: materialInstances){
                materialInstance.setParameter("baseColorFactor", Colors.RgbaType.SRGB, 0.0f,0.0f,0.0f,0.0f);
   }
@arun4fms
Copy link
Author

@romainguy Please do have a look into this. I just saw your few comments regarding blending mode but for materialInstances I haven't seen any option to set Bleningmode

@romainguy
Copy link
Collaborator

You need your gltf material to be defined as alpha blended. You can't override this at runtime after loading the gltf. You can however provide an override during loading.

@arun4fms
Copy link
Author

@romainguy how can i provide an override during loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants