Code Monkey home page Code Monkey logo

Comments (8)

ThomasGorisse avatar ThomasGorisse commented on August 17, 2024

Hi,
Thanks for this report. You are right.
Blame it on me, I made one mistake during the material fixes commits.
We are currently merging a great improvement from @RGregat and I then add the fix to this issue.

from sceneform-android.

Venthorus avatar Venthorus commented on August 17, 2024

No worries, thanks for the fix. I really appreciate the effort.

I actually saw the commented line in setMaterial when I was browsing RenderableInstance while trying to understand how things connect with Filament and I was wondering if that looked right. Funny that indeed it was part of the problem.

from sceneform-android.

ThomasGorisse avatar ThomasGorisse commented on August 17, 2024

That was it.
If you want to contribute, it will be awesome to have a VideoNode which includes all the boilerplate code of the video-texture sample. Specially the material part which should be common to most video textures.
Interested ?

from sceneform-android.

Venthorus avatar Venthorus commented on August 17, 2024

I would gladly help with that. I did something similar with the original Sceneform and this time too so I should be able to contribute.
I already have several ideas on how the API may look like. In the easiest case someone just adds a VideoNode with a raw resource ID and calls it a day.

I will get back to you in the next few days.

from sceneform-android.

ThomasGorisse avatar ThomasGorisse commented on August 17, 2024

Cool. I gave you contributor access. You can make the PR directly on a branch of this repo. It's quite easy from GitHub or Android Studio directly.

For the VideoNode, I really think that it will be more accurate to pass the MediaPlayer to the constructor instead of a res id since it let the ability for the user to manage the playing state and other things.

Thanks

from sceneform-android.

ThomasGorisse avatar ThomasGorisse commented on August 17, 2024

After asking to the Filament team here, we should use matc compiled .filamat for the external video material instead of writing the shader directly in the code.
If you need help for this, even if I am not an expert on coding shaders, I can generate the plain and chroma key .filamat ones.
You'll just have to call the Material.builder().setSource(Context context, Uri sourceUri) in place of the actual material configuration.

from sceneform-android.

Venthorus avatar Venthorus commented on August 17, 2024

I tried it out myself and I was able to run the matc tool (from Filament 1.9.25, because there actually is a material breakage in 1.10.0) and compile the chroma key mat file (the one that is in the repository) to a filamat file (for mobile). When building the material with the file it doesn't throw an error, however I don't see the video. The model is there as I can't click behind it and the video is running because I can hear it.

I'm also not into shaders, but in this case I don't understand why it is not showing up. The parameters match up (and yes, in the file it is called "keyColor" instead of "chromaKeyColor") and the code part is the same as the one that was generated directly in code. If I switch to the material written in code it works again. Am I missing something?

from sceneform-android.

Venthorus avatar Venthorus commented on August 17, 2024

Nevermind, I was able to get it to work. I created a pull request with the new VideoNode.

from sceneform-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.