hunts Posted February 5, 2017 Share Posted February 5, 2017 hyyy guys, is it possible to get the same Fps on mobile as PC using BJS engine Quote Link to comment Share on other sites More sharing options...
bruno_ Posted February 5, 2017 Share Posted February 5, 2017 That's hard to say. If you try on high end mobile phones like samsung galaxy s7 you get high fps rate. On low end devices you get bad fps rates. Try to test in some devices and adapt as needed. Quote Link to comment Share on other sites More sharing options...
georage Posted February 7, 2017 Share Posted February 7, 2017 (edited) No, a great PC will always outperform a great phone. My crummy 4-year-old laptop is better than my new S7, and my desktop PC blows them both out of the water. There is only so much magic a phone can pull off. A PC can have much better graphic cards, memory, cpus and the motherboard has much greater I/O bandwidth. BUT ... you can do some amazing stuff on phones ... just keep the mesh/vertices count down and be judicious and much is possible. As a benchmark my PC has no prob with animating 3,000 cloned shapes at 60 FPS but my phone has 10 FPS and my "business" laptop about 40. Wife's iPad is 20. Not sure you would ever need more than 3,000 animated meshes in a game. They make pretty demos though. Here is an instructive read .... https://blog.raananweber.com/2015/09/03/scene-optimization-in-babylon-js/ Edited February 7, 2017 by georage added raanan's link hunts 1 Quote Link to comment Share on other sites More sharing options...
Sac Posted June 16, 2017 Share Posted June 16, 2017 I am worried, that I just saw an alternate for my same sample app written in Babylon Js, with models exported from Max to Babylon JS working good in a S7 and very bad in other phones (like note 3, around 5 FPS) , while the alternate sample app, written in Three using a propitiatory exporter, works so smooth (60 fps) on all devices. I want to get the same kind of fps using Babylon JS. I am struck and dont know how, I used Scene.Optimizer with 8 different options of let result = new BABYLON.SceneOptimizerOptions(60, 5000); result.optimizations.push(new BABYLON.ShadowsOptimization(0)); // Priority 0 result.optimizations.push(new BABYLON.PostProcessesOptimization(1)); // Priority 1 result.optimizations.push(new BABYLON.TextureOptimization(2, 512)); // Priority 2, result.optimizations.push(new BABYLON.TextureOptimization(3, 256)); // Priority 3 result.optimizations.push(new BABYLON.HardwareScalingOptimization(4, 2)); // Priority 4, HardwareScaling 2 result.optimizations.push(new BABYLON.HardwareScalingOptimization(5, 4)); // Priority 5, HardwareScaling 4 And still no result ! I am worried. Please help on more Mobile optimization ideas... the model is a set of meshes (12) each having key framed animations of their own, with only two meshes having Textured material, rest are color based material. The whole size of the meshes come to around 60K polygons. there is no Lens flare, no Particles, and no RenderTarget. I used HDR for skybox and reflections, I removed it, and currently using Cube reflection box for sky and reflections. I have PBR materials on all of them for proper reflections, metal and plastic effects. And all i do is run animation for all the meshes in registerBeforeRender function, whenever there is a pick sensed on its parent object (which is a dummy). Now I am on the verge of loosing my client because the alternate runs smooth on all devices. Please help ! Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted June 16, 2017 Share Posted June 16, 2017 Hi @Sac Without knowing more about your project, code, textures and meshes, here's a few general guidelines; When working with mobile / tablets, there should be no problem using 256px textures (if you aren't already), and sometimes even 128px are fine depending on how close you zoom on the mesh(es) , the changes in quality should be too small to even notise. Secondly and probably most importantly in your case, look for spots on your meshes to optimize, 60k poly's are a lot for a low-end phone. Third, optimizing animations, (even though this should be done at creation) as an example there's no need to have 200 frames of a running animation on a character mesh doing 7-8 steps, 30-40 frames and 2 steps are often enough. the rest is just using up precious memory. and Fourth, Code optimizations, could be simple things like caching loops, depending on the target device, method & support, while most modern browsers does this automaticly today, i don't know anything on the subject when it comes to app's, but's it's worth checking up on. I hope you make it work Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted June 16, 2017 Share Posted June 16, 2017 Also, @Sac Are you using 2.5 or 3.0 beta ? PBR materials can be pretty heavy for a phone,@Deltakosh did a awesome optimization on how materials are handled in 3.0. Quote Link to comment Share on other sites More sharing options...
Sac Posted June 16, 2017 Share Posted June 16, 2017 Just now, aWeirdo said: Also, @Sac Are you using 2.5 or 3.0 ? PBR materials can be pretty heavy for a phone,@Deltakosh did a awesome optimization on how materials are handled in 3.0. I'm using 2.5. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted June 16, 2017 Share Posted June 16, 2017 2 minutes ago, Sac said: I'm using 2.5. Even though 3.0 is still "only" in beta, if i was you i'd give it a go and see if it gets better. Quote Link to comment Share on other sites More sharing options...
Sac Posted June 16, 2017 Share Posted June 16, 2017 Thank you, Will check it out. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted June 16, 2017 Share Posted June 16, 2017 @Sac I just saw PBR materials haven't been updated yet, it's the only one missing. so the improvement might be limited so far, i'm guessing it'll be updated with or before the official 3.0 release. https://github.com/BabylonJS/Babylon.js/issues/1961 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 16, 2017 Share Posted June 16, 2017 We are working on PBR just right now Quote Link to comment Share on other sites More sharing options...
Paradine Posted June 16, 2017 Share Posted June 16, 2017 5 hours ago, aWeirdo said: Also, @Sac Are you using 2.5 or 3.0 beta ? PBR materials can be pretty heavy for a phone,@Deltakosh did a awesome optimization on how materials are handled in 3.0. @aWeirdoIs it out of the box optimization or it would require something to be changed by app developer? Any doc on that? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 16, 2017 Share Posted June 16, 2017 Yes here: But we do not move the PBR to this new mode (yet :)) Quote Link to comment Share on other sites More sharing options...
Sac Posted June 16, 2017 Share Posted June 16, 2017 Unfortunately, My implementation of the project is limited because of two reasons, a. it is not running smoothly on a mobile device,b. The exporting of the model to .babylon file from max or converting the model from fbx to .babylon gives undesirable results which we are not able to rectify. because of which I'm loosing this project and client Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 16, 2017 Share Posted June 16, 2017 For A: 12 meshes with 60k vertices does not seem wildly excessive. I personally do not believe in scene optimizer, though it might do a good job. You should probably try to isolate if there is one big area which is your bottle neck. Assuming yes there is you can adjust. Blind optimization checklist following rarely gets it down to the real problem. Assuming desktop profiling might not be a good enough indicator, try progressively eliminating stuff from the scene one at a time. Hopefully, after one it will just pop up. Then you will be dealing with hard things to attack. Just dumping PBR material for the simplest Standard material would be an example. Also, since you are using 2.5, I assume you are using skeleton animation. How many bones per skeleton are you using? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.