Nastro Posted June 16, 2016 Share Posted June 16, 2016 Hi Everyone ! I have a new question for you Actually i need to create a lot of vertices like this : http://www.babylonjs-playground.com/#1NYPJD And i need to have the most fps is possible I check a little "Solid Particle System" but i don't know if it's for me. The most important is i need to select all object. All object are unique. So the merge is not a possibility :/ Any ideas ? Thanks a lot Quote Link to comment Share on other sites More sharing options...
adam Posted June 16, 2016 Share Posted June 16, 2016 It sounds to me like SPS is your best choice. Quote Link to comment Share on other sites More sharing options...
Temechon Posted June 16, 2016 Share Posted June 16, 2016 It's exactly a mission for SPS Quote Link to comment Share on other sites More sharing options...
jerome Posted June 16, 2016 Share Posted June 16, 2016 http://doc.babylonjs.com/overviews/Solid_Particle_System or instances or mergeMeshes ... about this last one, I don't know if the passed meshes are disposed by the function or not [EDIT] the answer is here : http://doc.babylonjs.com/tutorials/How_to_Merge_Meshes with the parameter disposeSource Quote Link to comment Share on other sites More sharing options...
jerome Posted June 16, 2016 Share Posted June 16, 2016 I don't get why you have still 164 meshes and 164 draw calls in your scene since the meshes are supposed to be disposed Quote Link to comment Share on other sites More sharing options...
adam Posted June 16, 2016 Share Posted June 16, 2016 44 minutes ago, jerome said: or instances Would this help if Nastro needs to use a random color for each box? Quote Link to comment Share on other sites More sharing options...
jerome Posted June 16, 2016 Share Posted June 16, 2016 nope In this case, the SPS would be the last solution. Quote Link to comment Share on other sites More sharing options...
jerome Posted June 16, 2016 Share Posted June 16, 2016 ok, I guess I understand what happen in your PG http://www.babylonjs-playground.com/#1NYPJD#1 Have a look at the line 117 : you call mergeMeshes in a loop, so it creates many many meshes... so your FPS drop You might construct all your 164 meshes, populate an array with them, and finally only call once mergeMeshes() to get a single mesh. chicagobob123 1 Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted June 16, 2016 Share Posted June 16, 2016 I am a big believer in SPS. They are saving my bacon and FPS. Currently using over 15,000 of them. You can be creative with them. They are handled individually, and you can also have fun with UV texturing as Jerome can attest to. Quote Link to comment Share on other sites More sharing options...
Nastro Posted June 17, 2016 Author Share Posted June 17, 2016 Thanks a lot for answers. @jerome i think that SPS is a good solution i will try. Thanks guys : @chicagobob123 , @adam, @Temechon, @jerome 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.