Comments (8)
Could give it a test run? Thanks
from rajawali.
Great, the mipmapping works now! :)
I think I misreported the object disappearance, its quite hard to understand exactly what happens so I made 2 videos showing some odd behaviour and uploaded the example project the videos shows.
Video #1 shows a live wallpaper with 2 obj imported objects, one a clone of the other, when the opengl context is recreated we see both objects.
http://www.youtube.com/watch?v=dX1eYUhFhMA
Video #2 is the same scene but I load another obj object (which is not shown) before loading the object that gets cloned. Now when recreating the opengl context the cloned object disappears.
http://www.youtube.com/watch?v=eHBbnX5y0e8&feature=youtu.be
The project from the videos can be found here: http://www.2shared.com/file/3SgnI5xy/CloneTest.html
Its a very small project with 2 source files and an obj file.
from rajawali.
Thanks for the elaborate error report :-) Please try the latest fix.
from rajawali.
Thanks! Appears to work now, wish I could have fixed it myself instead of being a bother but I had no idea what I was doing :)
Closing issue.
from rajawali.
Hm, I found a strange behavior here. It appears that clones have a separate position but they share the scale with the original copy. That is, if you change the scale of the copy then the original scales as well. Is this a bug?
Edit - I submitted a fix for this.
from rajawali.
I have found another way in which the disappearing object bug via clone happens, if you load an obj file (but do not add the obj file via addChild) and then clone it and then do addChild with it then at first the clone will be visible but after opengl reload it will dissappear.
So, in my previous code example this code will produce the bug: (notice the commented out addChild on the object)
// When this code is commented this is what happens: http://www.youtube.com/watch?v=dX1eYUhFhMA
// When it is uncommented this happens: http://www.youtube.com/watch?v=eHBbnX5y0e8&feature=youtu.be
//Uncomment the following 3 lines to get a bug where the cloned object (object 2 below) disappears when recreating the opengl context
ObjParser parser2 = new ObjParser(this.getContext().getResources(), this.getTextureManager(), R.raw.turn_right);
parser2.parse();
BaseObject3D objectNotUsed = parser2.getParsedObject();
ObjParser parser = new ObjParser(this.getContext().getResources(), this.getTextureManager(), R.raw.turn_right);
parser.parse();
AMaterial mat = new SimpleMaterial();
mat.setUseColor(true);
BaseObject3D object = parser.getParsedObject();
object.setMaterial(mat);
object.setZ(5.0f);
object.setDoubleSided(true);
object.setColor(0xff0000);
//addChild(object);
BaseObject3D object2 = object.clone();
object2.setMaterial(mat);
object2.setX(-1.0f);
object2.setZ(5.0f);
object2.setScaleY(-1.0f);
object2.setDoubleSided(true);
object2.setColor(0x00ff00);
addChild(object2);
from rajawali.
Ah yeah, so it only reloads the resources when it's added to the scene because it iterates through the display list.
You could addChild() and then setVisible(false).
from rajawali.
Oh sorry, I see what you mean. I'll investigate.
from rajawali.
Related Issues (20)
- jcenter repository has been depracated
- Seeking Luminance based desaturation
- 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
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.