Comments (10)
I'll try to get a Xoom to see what's going on. Have to figure out where to get it though :-) Will keep you posted.
from rajawali.
One more detail on the Xoom. On startup with the sepiafilter applied there appears to be 1 frame rendered with black artifacts similar to the Wildfire (but fullscreen instead of half screen). But since it is only 1 frame the next frames are 100% black.
An alternative to you buying stuff could perhaps be for me to learn more about whats going on and fixing it myself, is there any documentation I can read that will make me understand a bit more about this kind of post process rendering?
from rajawali.
I can borrow a Xoom from one of my colleagues. He's going to bring it in tomorrow :-)
from rajawali.
Oh, cool :)
from rajawali.
Yes, maybe you can look at it in the meantime. Post processing basically works like this:
The whole scene is rendered into a texture. A frame buffer object (FBO) is used for this. (see src/rajawali/renderer/PostProcessingRenderer.java)
When the whole scene is rendered into this texture it will be displayed on a screen quad using your Camera2D class.
The last fix I did was setting the size of the framebuffer to the nearest power of two size. For performance reasons, I set it to the power of two size that's smaller than the current screen size. You might want to check if something is going wrong there.
Let me know if you need more info.
from rajawali.
Thanks :).
Looking at it a bit now, one interesting thing is that the Rajawali Example app (that I got from from google play) with the swirling monkey example works on the xoom. But when I use this.addPostProcessingFilter(new SwirlFilter(mViewportWidth, mViewportHeight, 10, 1f)); in my app (at the end of initScene) I get the previously mentioned black screen. So perhaps this might just be me doing something very wrong. Anyways, looking into it.
from rajawali.
A small update:
I have tried creating a very tiny example project (just a simple sphere with a texture) as a normal app and a live wallpaper and applied the sepia filter and it works just fine on the Xoom. The problem I am describing here apparently has something to do with something I am doing in the project that can be seen in the above screenshot from my wildfire so I shall need to do some more bug hunting :)
from rajawali.
Aha! Found a bug here!
Transparency is apparently not compatible with post processing.
public void initScene() {
SimpleMaterial mat = new SimpleMaterial();
Bitmap bg = BitmapFactory.decodeResource(mContext.getResources(), R.raw.clouds512);
Sphere sphere = new Sphere(1, 12, 12);
sphere.addTexture(mTextureManager.addTexture(bg));
sphere.setMaterial(mat);
addChild(sphere);
BaseObject3D sphere2 = sphere.clone();
sphere2.setX(1.0f);
//sphere2.setTransparent(true); <------ evil!!!!!!!!!!!!!!!!!!!!!!
addChild(sphere2);
SepiaFilter sepiaFilter = new SepiaFilter();
this.addPostProcessingFilter(sepiaFilter);
mCamera.setZ(-4.2f);
startRendering();
}
uncomment the sphere2.setTransparent(true); line and the Xoom shows a black screen, comment it and it shows two spheres in sepia color.
from rajawali.
Good find! I'll see if I can fix this tomorrow.
from rajawali.
Yay, it works now, both on my wildfire and my xoom. Thanks :)
from rajawali.
Related Issues (20)
- Seeking Lighten and Darken Blend Modes
- Seeking point texture plugin
- improving SpriteSheetMaterialPlugin efficiency HOT 1
- Seeking Flexible Sprite Sheet Animation
- Seeking runtime adjustment of AlphaMask threshold
- Please restore AnimatedSpritesFragment to example app
- Stencil Buffer is not initializing corrrectly,
- Some `ScreenQuad` materials spew error messages at frame rate
- Objects starts to render with delay when camera if far from them HOT 1
- How to translate object with touch screen?
- anyway to implement ray in the library?
- Create Sphere with phiStart, phiLength, thetaStart, thetaLength HOT 1
- LoaderFBX.java:347 ArrayIndexOutOfBoundsException
- display obj model in AR
- Examples are broken
- When will the new version be released?
- load obj file fail,NumberFormatException: For input string: "nan"
- Caused by: org.rajawali3d.loader.ParsingException: Couldn't find texture ingrid HOT 1
- Why is my line3d truncated?
- How do I rotate multiple views around
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 rajawali.