|
MacShrike, Newbie
Posted: 25 August 2015 12:05 PM Total Posts: 12
Ls,
Starting out with Away3d 4.x
Made a simple test to see what performance I could get on some “older” devices.
Although I feel i’ m asking for the tips of the trade I did read Up a lot but just cant believe FPS would be this low.
Any help is much appreciated
The test is this;
- Init
A simple plane, very large geomitry to make it a horizon.
Some 50 cube meshes with colormaterial
1 directional light
* Enter loop:
Move the cubes towards the camera
render
enhancements tried:
-Tried adding/removing fog filters for the far distance.
-Adding/removing shadows on cubes and the geoplane.
-Sharing 1 material for all the meshes, same for shadow and fog methods.
Doesn’t seem to make much difference.
From my samsung s4 and up I get reasonable FPS (although on s4 stil only 30+ and very unstable)
On my tab 10.1-2 it drop to an awfull 7 to 14 FPS.
The stats show only about 160 POLY average. that’ s not that much is it?
Should I/Could I pre-render the cubes somehow (Like with away3d 3.x ) in perhaps directional 2d sprites?
Add the cube meshes to 1 supermesh?
Is it the geometry size? Im using far distance 20.000 and a far lens
Highest regards & thx for reading this far,
Mac
|
Fabrice Closier, Administrator
Posted: 25 August 2015 03:42 PM Total Posts: 1265
[ # 1 ]
like on many devices, the use of lights is extremely costly, dynamic shadows even more, not to mention the huge diffs in quality.
On some devices the same scenery can run 60/60 and go down to 3 fps by adding a simple light.
Unlike on desktop, realtime 3d on mobile requires very careful and tedious preparation that you use away, threejs or any other engines. You will get diffs in perf depending on device HW based on your project complexity, maps count and sizes, shader types etc…
In my experience, unless you push a zillion of them, polygons are not a prob.
thats having said, if you have a code that isn’t efficient, for instance if you create instances, have costly loops on enterframe, perf will go down no matter what even if you do not render.
|
MacShrike, Newbie
Posted: 25 August 2015 06:06 PM Total Posts: 12
[ # 2 ]
Dear Fabrice,
Thank you for your reply.
I understand what you are saying.
However, I think what I did is the bare minimum in complexity.
One directional light and no shadow methods seems the least you need. (Q: or can I use only ambient and no lightsources? Say use a 6 sided texture on cubes that are pre-shadowed and slap on a side poly for drop shadow?)
The enterloop is the only listener and only adds a small integer to the Z value of 50 cubes. The meshes are in a vector.
When I reduce the far value on the lens, performance improves a bit.
But I cant see why having a larger geometrically scaled scene would be slower. The matrix calculations are the same.
Highest regards,
Mac
Anyhoe..
|
Fabrice Closier, Administrator
Posted: 26 August 2015 10:10 AM Total Posts: 1265
[ # 3 ]
its hard to explain, as its a sum of params that leads to either great or poor perf.
The device drivers and HW being the first factor.
For instance, large depth buffer settings lead to artefacts and slowing down.
IOS would generate some triangles while android will black them.
Non continuous geometry will also be good for slowdown and artefacts.
For lightning, the best is to use environment method and have a map that simulates the lighting conditions that you wanted
Thing is, mobile 3d, especially on phones, is like flash 8, you need do the max you can with little. Means optimised geometry and materials, smart assets/memory management and loads of prebaking.
If you do not dev for a specific model, you’ll have to loose countless hours to test on various devices.
here some tests with different setups.
these two, have lights and one has dynamic shadows.
http://www.closier.nl/webgl/timeline2/
http://www.closier.nl/webgl/timeline_shadows
Note that on IOS 8.4, on
|
MacShrike, Newbie
Posted: 26 August 2015 05:24 PM Total Posts: 12
[ # 4 ]
Wow; now thats a reply! . Thx.
Im going to have to study some more before I augment my Starling with real 3d then.
Or perhaps just target the higher end devices.
To augment your case; all the web links show black screens and/or oops messages in my browsers(IE & Chrome).
So I couldnt check them, but thanks for the trouble.
Your case is well made. Its the same with Starling but the differences are not that dramatic.
Thank you again,
Mac
|
Fabrice Closier, Administrator
Posted: 26 August 2015 07:05 PM Total Posts: 1265
[ # 5 ]
I’ve recently moved from server, from which country are you looking them?
tho, black screen might be a slow connection, the pages do have black screens. if i press the link they all load ok from here (same country as my server)
if you get oops, that’s dns resolving issue, try replace closier by prefab3d.
|
MacShrike, Newbie
Posted: 27 August 2015 05:02 PM Total Posts: 12
[ # 6 ]
Hi,
Im surfing in Amsterdam, the Netherlands.
Tried looking for some specific browser extention I might be missing, couldnt find one.
Is there one I need?
Regards,
Mac
|
Fabrice Closier, Administrator
Posted: 27 August 2015 06:57 PM Total Posts: 1265
[ # 7 ]
mmm, I’m in Assen, so it should be ok. tried in meanwhile on different devices and asked (dutch) friends, they all load them. Dunno what’s going wrong on your side.
|