google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 603 forks source link

MaterialBuilder public constructor #393

Open bobekos opened 5 years ago

bobekos commented 5 years ago

Hi,

is there a specific reason why MaterialBuilder does not have a public constructor? What if I want to load a custom material at runtime and MaterialFactory doesn't offer anything suitable? In my example (see screenshot) , I would like to load a material (only at runtime) with "fade" as blending attribute. As you can see the Material from MaterialFactory.makeTransparentWithTexture is not applied to specular lighting.

romainguy commented 5 years ago

A workaround is to bundle your custom material in a .sfb with a simple model (1 triangle) and use getMaterial() after loading the .sfb.

bobekos commented 5 years ago

@romainguy Hi, thank you for the suggestion. I think I have no other alternative. Nevertheless, it would be nice if it could be possible in the future.

romainguy commented 5 years ago

We should definitely improve this API. I'll reopen the issue so we can track this feature.

stewe93 commented 5 years ago

Looking for this feature too!

chnouman commented 4 years ago

@any update on this?