google-ar / sceneform-android-sdk

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

How to set transparency to basecolor (for example leaves on camomile) #299

Closed damiandevil closed 6 years ago

damiandevil commented 6 years ago

Hey everyone,

I've read a lot here and a little bit stuck, since i can't add alphafactor to my basecolor. SOrry that i'm a bit repeating but i'm much more modeller then developer but here my task is to clearly understand if it is possible to have an opacity on the leaves.

let's start from the very beginning. I have a mesh, with base color (leaves) that has a transparency so my leaves will look natural (not like a green leaves on white planes).

I have converted them from maya (PBS Stingray) FBX and then converted it to sfb in Android studio.

What i see is that my camomile is looking good except that all leaves are on white planes (ok transparency is not working).

I tried working with base color opacity but it's not working at all.

What i'm doing wrong here? Since in Scenekit (ios) i have a transparency control.

I have read that i can write my own material but don't understand how it works and what should i write. And even more where. I tried reworking default material settings but don't understand where to add basecolor alphafactor.

Will be happy for any help.

Thanks

damiandevil commented 6 years ago

Well ok,

I've managed to understand how does it works to insert information about mat file (just deleted source with default mat and added my) but everything looks bad. I mean that i don't see that textures are working now. I'm really stuck

romainguy commented 6 years ago

How is your transparency defined? Is it in the alpha channel of your base color texture?

damiandevil commented 6 years ago

Yes it is in alpha channel if my base texture

AdrianAtGoogle commented 6 years ago

Hi @damiandevil, sorry for the difficulties you've been seeing. Is it possible for you to give us access to the asset via GDrive or similar? Transparency based on base color alpha is case we support for FBX files, so you might have uncovered a new corner case on our end.

malik-at-work commented 6 years ago

Closing as inactive.