Comments (8)
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.
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.
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.
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.
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.
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.
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.
Nevermind, I was able to get it to work. I created a pull request with the new VideoNode.
from sceneform-android.
Related Issues (20)
- Shadow position is not correct, shadow appears at the middle of the object. HOT 2
- VideoNode Size Problem HOT 3
- Unauthorized Access Error for Sceneform Dependency Version 1.22.0 HOT 2
- What is Engine and how to use it? HOT 1
- How To Change Texture Images HOT 2
- Color of model on scene doesn't match color of texture (warm white instead of white) HOT 2
- Failed to create arsession HOT 4
- How to combine multiple node into one HOT 2
- java.lang.IllegalStateException: Calling method on destroyed View when i have scene inside horizontalpager
- Camera doesn't open and crashes when Proguard is enabled (R8) in Sceneform. HOT 1
- measure with camera HOT 2
- Scan Qr code using sceneform HOT 2
- Crash on App Start: NoSuchMethodError for acquireEnvironmentalHdrCubeMap HOT 3
- sceneform AugmentedFaceNode performance HOT 2
- Scan Human Skin HOT 2
- how to get a image in portrait mode HOT 1
- Support for Compose Multiplatform HOT 2
- Support for Android 14 devices HOT 6
- How to remove hand motion animation?
- (Java) App crashes on device HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sceneform-android.