Version updates!

Started by EgonOlsen, March 28, 2010, 09:47:50 PM

Previous topic - Next topic

dl.zerocool

Really happy to see all this updates :)

raft

built-in mesh animations are much faster now, compared to bones. do they make calculations as ints ?

EgonOlsen

No, nothing has changed in the animation code.

raft

oops. bones is quite expensive for Android in that case. i've made a test, animated ninja with bones but didnt apply the animation with IVertexController. results are 19, 11, 7 fps for 1,2,3 ninjas on G1. when animation applied fps's were 17, 10, 6

great job for increasing vertex upload performance  ;D

bones definetely need a JIT ::)

EgonOlsen

Another update! This one increases performance for lighting and/or more complex scenes with different objects up to 10%. My demo scene runs @31fps instead of 28fps now on my phone. In addition, it contains some minor tweaks for Matrix and SimpleVector math (but nothing to get crazy about...you'll hardly notice it).

dl.zerocool

#20
Great, I don't see much difference since I'm working at 30 or 60fps depending if I'm using the camera or not. (With the Nexus One)

But it's always nice to see such improvement.
But it does improve the fps on the Samsung Spica, the latest update made the fps go from 5 to 20~ so it's really great :)

I just wanted to ask if it's possible to next release to add in front of functions that throw any exception
the code throws Exception or Better throws SpecificException .

This really would help to Dev/Debug and avoid exceptions randomly uncaught that make the program FC.

EgonOlsen

#21
Wow...what an improvement on the Spica. How comes that? Must have done something that its renderer really likes...

About the exceptions: There are basically two groups...one that thinks that checked exceptions are a good thing and one that doesn't. I belong to the second, which is why i'm using unchecked exceptions for almost everything. For a brief discussion about pros and cons, just search for Bruce Eckel's view on this.
As far as AE is concerned, wrapping the resource loading and maybe the actual rendering into a try-catch should catch most of the common problems. Things like matrix math and similar doesn't throw any exceptions on its own.

dl.zerocool

This low end phones are definitely built with no standard.

About exception, I'll take a look when I'll have time at what you told me, but at moment I can't.
I understand and respect your point of view, so I'll continue using without throws.

Another question is, are you sure that TextureManager flush works correctly ? Because sometimes I got the error :
04-14 14:26:52.923: ERROR/AndroidRuntime(4318): java.lang.RuntimeException: [ Wed Apr 14 14:26:52 Europe/Zurich 2010 ] - ERROR: A texture with the name 'grassy' has been declared twice!

Here is how I do things:

gameModels.add(new GameModels(Primitives.getPlane(20, 30), new Texture(
resources.openRawResource(R.raw.planetex))));
textureManager.addTexture("grassy", gameModels.get(0).modelTexture);
gameModels.get(0).model.setTexture("grassy");



private class GameModels
{
public GameModels(Object3D model, Texture modelTexture)
{
this.model = model;
this.modelTexture = modelTexture;
}

public Texture modelTexture;
public Object3D model;
}

Is there something wrong ?

EgonOlsen

I'll look into that TextureManager-thing...

EgonOlsen

flush() should work fine. It discards all internal structures of the TextureManager. There's no chance that some texture remains in the manager after calling flush. Maybe you are adding the texture twice without calling flush() in between?

EgonOlsen

Another small update with some additional micro optimizations. On my phone, the demo scene increases by 3%, the MD2 animation by 5%.

dl.zerocool

#26
Yeah another update :P

About the Textures : Certainly, anyway I'm no more using textures so it's not the problem, thank you for the check :)
I'm using materials instead. It's enough for what I'm doing at moment.

dl.zerocool

#27
Hello,

I didn't find a way to check if all the models are build and ready to draw.
Is it possible to implement this feature ? So we will be able to do a loading screen (while the resources are being loaded).

Thank you.

Best Regards

"A returned value would be great for example"

I don't know if you threaded your buildObject that's why I'm asking for it.

EgonOlsen

I'm not sure how this should work. The only that knows if all resources have been loaded is the application that loads them, isn't it?

dl.zerocool

So your functions aren't threaded.
That's what I was asking :).

I found a solution so, just start the loading screen before starting loading the models, then after all loads and builds stop it.

;)

I do that in a thread and the animation screen is a thread too.


Thank you.

ps: sorry lately I've not been answering quite fast, but I'm overloaded at school with projects and tests, it's the end of my 2nd year of engineer in 7weeks...
So I've been very busy.