zirman / arcore-filament-example-app

ARCore Filament Example App
MIT License
97 stars 15 forks source link

Materials and Reflections #1

Closed anacoimbrag closed 4 years ago

anacoimbrag commented 4 years ago

Hi @zirman! First of all, thanks for this amazing project! I've been looking for something like this for months. I'm studying so I can build my own AR framework.

Second, I'm sorry if this is a dumb question, but I would like to know where or how did you get those Materials and Reflections files. Were them from filament repo? I didn't find them there (with specific names). Do you care to explain a little bit more about these resources?

Again, thank you a lot!

zirman commented 4 years ago

Hi @anacoimbrag The filamat files are generated using matc and the reflection files are generated using cmgen. Those are command line tools you can download from the Filament release page or you can build it on your machine if you wish.

https://github.com/google/filament/releases

I have a script called build-materials.sh in the project that runs on every mat file in a specific directory.

Does that answer your question?

anacoimbrag commented 4 years ago

Thanks for the quick answer @zirman! It helped for sure! I just still didn't get where those source .mat files came from. Did you created them yourself?

zirman commented 4 years ago

I wrote the .mat files in the project. Filament compiles them to run on the backend, OpenGL/Vulkan for Android.

You can learn more about how to write Filament shader code here https://google.github.io/filament/Materials.html

If you're new to graphics programming I recommend doing so tutorials on WebGL to better understand the linear algebra and how shaders work.

https://webglfundamentals.org/

anacoimbrag commented 4 years ago

Nice! Great job! Thank you so much for the resources, I will look into it.

MarxMc commented 2 years ago

@zirman I'm trying to get BoundingBox on 3d object , here im passing to RenderManager.boundingBox(Box(1,1,1,1) and geometry(). Why we not able to get proper output