-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Environment map #77
Comments
By default, the environment cube map comes from a standard resource image. It is still not in stable (confirmed full working) state but you can try this
With this, the environment will be the ARCore returned one. You can have a look at this discussion for more infos: IndirectLight in an AR context |
@ThomasGorisse I am sorry but I dont get it from your post. Is it possible to change default HDR map? I can see that the default is used for building light probe here . Is there anyway how to change it? |
You can override in your app the .hdr file here: https://github.com/ThomasGorisse/sceneform-android-sdk/tree/master/core%2Fassets-sources%2Flights%2Fsceneform_default_light_probe |
@ThomasGorisse Thank you. Unfortunately this does not work. It looks like this file is actually not used. It is somehow baked into this. Because if I added new HDR file and change DEFAULT_LIGHTPROBE_ASSET_NAME it ended with this error
If I dont change name and just replace HDR file it does not change reflection image (so I assume that it is not changed and it is loaded from that SFB file). I am not sure if I can rewrite it to KTXLoader and made pull request but I will try it. |
You are very probably right about the fact that the environment is inside the sfb. For the rest of the actual sfb content you can just add a breakpoint at the Filament Indirect Light creation to see what values are used. If you can do it, it would be awesome for this Sceneform repo since it's the last SFB usage and so we could remove a lot of unused code. For exemples of KTX loading, you can have a look at https://github.com/zirman/arcore-filament-example-app and https://github.com/ThomasGorisse/realitycore and directly on the Filament repo https://github.com/google/filament |
@ThomasGorisse Thank you again for your advice. I am struggling with this because I am not Android developer. I cannot find any usage of KTXLoader in that repos you mentiond. Right now I am just exploring LightProbe class and trying to modify it only to load KTX file. I tried to change loadInBackground method to load IndirectLight instead of LightingDef (if I could manage to do that it will be good starting point to figure out how to rewrite LightingProbe class to use KTX instead of SFB. But I am stuck on that KTXLoader. Maybe I am using it wrong. In this code:
On that KTXLoader I always get error:
It looks like it is incompatible types directly in com.google.android.filament because nCreateIndirectLight expects Long (as wrapper object for primitive data type long) but Engine returns long as primitive data type. I cannot find any KTXLoader usage so I dont know if I am doing something wrong or if it is really bug inside Filament. |
You can go with Kotlin if you are more confortable with this language. For a recent and accurate sample of KTX loading, the Filament ModelViewer is updated frequently here: |
Environment Lights are now available since this release: Environment Lights + Augmented Faces + Kotlin Begins + Green Flickering Fix + Performances |
When I create a reflective material, I see a room in it - default environment map.
An example can be seen here
Is it possible to change the environment map now?
The text was updated successfully, but these errors were encountered: