Make 3D model transparent by setting alpha values, change blending mode at runtime. #200
MukeshBlippar
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Hi. node.modelInstance?.materialInstance?.setParameter(
"baseColorFactor",
// Red
0.09f,
// Green
0.44f,
// Blue
0.95f,
// Alpha
0.75f
) |
Beta Was this translation helpful? Give feedback.
3 replies
-
And change your model |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm using your library and it's wonderful. I have requirement to set Fade in / out animation on 3D models. And also to change the opacity of any model at run time to make it transparent. So far from all the issues in sceneform and filament, I learnt that it's only possible if the blending mode of model is set 'Transparent' or 'Fade'. But the default blending mode is 'Opaque' which is not allowing to set the alpha values. And Filament API also doesn't allow to change the blending mode at run time.
I managed to set opacity for the model by creating my own custom material and applying the on renderable. But this over rides the existing material. So the question is how can we achieve to set the alpha value in existing material. Any plan to add this feature in future? Here is my code which is working to create material with alpha value.
Beta Was this translation helpful? Give feedback.
All reactions