jPCT-AE - a 3d engine for Android > Support

Performance Issues

(1/1)

Dinin:
Hi !

I'm rendering objects with 450 faces and textures (64x64 pix).
The objects are serialized with reduced = true but without texture assigned because textures are set dynamical in runtime.
Now when amount of objects > 60 im running into performance problems (Galaxy SII).
So i looked with traceview and there i see that much cpu time goes to:
- com/threed/jpct/CompiledInstance.fill (25%)
        - com/threed/jpct/GenericContainer.add (31%)
        - java/nio/ShortToByteBufferAdapter.put (20%)

Do you have any idea what i can do to make this faster ?

thx and greets
Dinin

EgonOlsen:
Are you sure that you haven't benchmarked the setup of your objects here?

com/threed/jpct/CompiledInstance.fill will be called only once for static object but multiple times for animated ones. If your objects are animated, this might explain it. The huge amount that com/threed/jpct/GenericContainer.add takes indicates that you either (as mentioned above) have benchmarked the actual setup code or that you are using animated objects that have been compiled using compile(true, false);, i.e. without static uv coordinates. Are you? If so, do you have to?

Dinin:
yes, this objects are animated.
how to i set static uv coordinates ?
And what is the diffenenz (sorry i'm a newbie in this sector)?

EgonOlsen:
The difference is that with static uv-coordinates, you can't change how the texture will be applied on the mesh at runtime. However, you can still change the texture itself. I don't know what you are currently doing, but is assume that (as already posted) you are doing something like compile(true, false); somewhere!? If so, change it to compile(true, true);. If you don't use that line, you'll see me confused about your profiling...

Dinin:
yes, compile (true,true) did it.
Now it run's much,much faster.

mthx for your help!

Navigation

[0] Message Index

Go to full version