Author Topic: Ipad2 Issue  (Read 176 times)

Jason Huang   «   on: April 16, 2012, 02:16:02 PM »

Hi, Ivan,
I am so sorry for mixing forums:( I didn't realize how bad that was....
Here is the new thread. I think I just need a proper configuration of FD for Ipad2, though currently it seems good for running low ploy models. Lets see if the problem is the configurations.
Cheers

Ivan Vodopiviz   «   Reply #1 on: April 16, 2012, 06:44:16 PM »
It's ok, don't worry, it's just that it's easier to answer this way :)

There isn't much configuration on the project side besides setting the renderMode to direct and enabling depth & stencil buffers. Unfortunately, there are many reasons why your project might have performance issues on mobile. Mobile optimization isn't a trivial topic and can be hard to track where the problem actually is.

One thing that I discovered while porting YellowPlanet to the iPad was that raycasting functions would slow down execution to a crawl, specially when using mouse picking on complex meshes. Examining your demo, it seems to make heavy use of mouse picking and unfortunately, our current picking routines aren't yet optimized for mobile usage (we have plans to fix this, though).

So, one thing you can try is to simplify mouse picking by using invisible, simpler meshes (like cubic prisms, for example) instead of the actual car mesh. That way Flare will have to check fewer collisions, reducing CPU usage considerably.

Another idea is to avoid using 2d displaylist content along stage3d content because that really hurts performance. This might not be easily solved, though.

Also, besides the polygon count, you seem to be using quite a few complex materials and lights. Reducing the complexity of the materials and reducing the amount of dynamic lights might give you some performance gains. Try something like scene.lights.techniqueName = LightFilter.NO_LIGHTS; for example, and see what happens.

As a first step, I'd remove all mouse events and updates just to see what kind of performance we get. That should give you an idea of how the actual GPU performance is, and tune that to get maximum performance. Then, re-enable the input features trying to minimize the performance impact as much as possible.

Keep me updated and I'll try to help you, good luck :D


Jason Huang   «   Reply #2 on: April 17, 2012, 03:17:30 AM »

Thanks Ivan,
I did the exactly thing what you told me to. Just a pure model without any materials and any lights. It works:) But the antialias whatever I set it to, just dose not work....
And one more thing, If I use a simple meshes, how can I pass a correct vector to switchColor shader.... 
Cheers

Jason Huang   «   Reply #3 on: April 17, 2012, 03:25:21 AM »

still it takes about 1 munite for the first rendering.... I think the majoy issue is to solve the antialias...

Ivan Vodopiviz   «   Reply #4 on: April 17, 2012, 11:36:59 AM »
From our tests, the first time the app runs it takes a long time to load. If you close it and then run it again, then it will load faster. This might be AIR-related, but we'll be looking into it anyway.

With regards to anti-alias, we didn't test it ourselves but it might not be implemented by mobile Stage3D yet, we'll look into it.

And the simple meshes are for mouse input, not for display, that's why I said they should be invisible. You'll still be rendering the car and applying the switchColor shader :)

Jason Huang   «   Reply #5 on: April 17, 2012, 04:08:04 PM »

Thank you Ivan,
I will be glad to wait the new version comes out and give it another try.
For the SwitchColor shader, I have to use mouse collisions for the real mesh. So that, I can get the  vector point of mouse collide with. Thank you anyway:)