Dad72 Posted February 17, 2014 Share Posted February 17, 2014 I used the 'sprites' to make the grass. I must have 1800 sprites on the stage. I note a large difference in FPS between firfox and Google Chrome.On Chrome, I have 40/41 fpsOn Firfox i have 25/27 fpson firfox, my fps, quickly drop. If I removed the sprites, my fps goes back has 60 on firfox and on chrome. I think that there is a performance problem with the sprites. If i put 4000 sprites, my scene lag, the fps are very low. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 17, 2014 Share Posted February 17, 2014 I cannot fix Firefox davrous and gwenael 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 17, 2014 Author Share Posted February 17, 2014 Ah Ah, recess. But why much difference. I asked if you have an idea of why.With Google Chrome as well, when it adds a lot of sprites, the fps, down very much. Why? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 18, 2014 Share Posted February 18, 2014 Too much sprites : 4000 is a lot Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 18, 2014 Author Share Posted February 18, 2014 1800 sprites is also apparently much? Therefore, there is nothing in Babylon which permettes to make the herbs on a field in large quantity? The grass allows you to make the scene more realistic. This brings a touch of nature. It is disappointing not to be able to put grass in large quantity.Are there solutions to put large amount of grass? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 18, 2014 Author Share Posted February 18, 2014 There would be a solution to make large expanse of grass with the sprites. With isvisvible. To hide the herbs at a certain distance from the camera by placing isvisible on false. This would allow a lot of grass. Only 1000 could see, the rest would not be rendered as a camera does not track. This would be has add with the request of here, or you forget to answer me: http://www.html5gamedevs.com/topic/3946-pickinfo-on-the-sprites-pickedsprite/ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 19, 2014 Share Posted February 19, 2014 For me this should be resolved by a shader and not by sprites The shader has more raw power and is only used on visible pixel. You can use a dynamic texture where you define where grass is and inside your shader you can use this texture to draw grass or not Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 19, 2014 Author Share Posted February 19, 2014 Thank you very much for the advice. I have of very poor knowledge in shader, but I am going to try to study question. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 19, 2014 Share Posted February 19, 2014 look what I did with ground shader in worldmonger demo Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 20, 2014 Author Share Posted February 20, 2014 I find the solution.with google chrome, if I put the object to false isvisible to hide objects far from the camera the FPS remains acceptable.By contrast with Firefox it must add visibility 0 in addition isvisible false for the FPS is acceptable, otherwise, the FPS are a 16. thus: Google Chrome :mesh.isvisible = false; Firfox : mesh.isvisible = false;+mesh.visilility = 0; Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 21, 2014 Share Posted February 21, 2014 To be fully removed try to use this: mesh.setEnabled(false) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 21, 2014 Author Share Posted February 21, 2014 Yes, it is perfect, it works well. It is better than what I had done. 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.