chicagobob123 Posted July 11, 2017 Share Posted July 11, 2017 Hey all you 3D wizards. I am trying to put together points received from a lidar onto the screen to create a giant picture. Kind of like a bump map except with points. I slammed together a quick SolidParticle example that creates spheres (50,000) at a fixed location and on the fly. Just to test. Performance AWFUL. Tried the same thing with planes. Performance much. Since I am going to be collecting this information while moving I was wondering if there is a better way. I might collect as many as 200,000 points. its 16 measured location * X per second (X yet to be determined) collected driving an area of about a block. Here is my sample and commented out is the createsphere. http://www.babylonjs-playground.com/#36AJXH Quote Link to comment Share on other sites More sharing options...
fenomas Posted July 11, 2017 Share Posted July 11, 2017 Warning: link in first post is a CPU bomb. Don't open it. Here is the same playground with the number of particles scaled down. As for your question, well, you're creating an SPS with 6M vertices, every single one of which gets updated every frame, so that's liable to be a little slow. You might try using a simpler mesh for your particles, instead of spheres with 120 vertices each, but you may also need to preprocess your point cloud to reduce the density. Also, for me in Chrome at least the core SPS function is getting deoptimized. That kills performance but it's probably a side effect of the playground. Keep in mind that the PG is not for high-performance; most scenes will run faster in a regular page. Quote Link to comment Share on other sites More sharing options...
jerome Posted July 11, 2017 Share Posted July 11, 2017 The sphere geometry is not the ideal candidate as it has by default a lot of vertices. If you want to display only points, you should consider displaying only planar meshes, like discs or, better, quads (only 4 vertices) holding a point texture with some transparent background as an image (ex : ), in billboard mode. Moreover, if you need to display only 2D then, maybe you should also consider using the legagy particle system instead (not the solid particle one), what could be more performant for huge amount of 2D objects. Quote Link to comment Share on other sites More sharing options...
jerome Posted July 11, 2017 Share Posted July 11, 2017 @fenomas : you're right. The PG engine just evaluates the PG code with some kind of eval() what often leads to deoptimized code in Chrome. Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted July 11, 2017 Author Share Posted July 11, 2017 Maybe you should also consider using the legacy particle system instead I will take a look at billboard mode and the older particle system later today. Thanks. Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted July 26, 2017 Author Share Posted July 26, 2017 Particles disappearing when you navigate toward them. For not I scaled down my particles to about 3,000 and did a quick room scan. As I move closer to review the particles from different angle the particles disappear and as you move back or sometimes even just rotate they reappear. ?? I am going to create some Playground code to show that if it isn't some obvious issue. 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.