jerome Posted November 10, 2015 Author Share Posted November 10, 2015 to be continued here : http://www.html5gamedevs.com/topic/18512-sps-finished/?p=104986 at last ... Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 10, 2015 Share Posted November 10, 2015 Its one mesh, and not all one mesh. sigh. How the hell did you do this, Jerome? I thought... hmm. Remember that playground... with the depth render issue? All the particles were either behind something, or in-front-of something, but they could not be BOTH. Remember? I thought... that was caused... by all the particles being a single mesh... and the depth renderer treated it so, and thus there was problems. But you... how the hell? The depth render/alpha-thingy is gone, with SPS? How the hell... ??? You're a maniac, J-man. Too good. That's the 4th BJS trophy for you, ya know? 1. Spherical Harmonics - skyrocket to fame and fortune2. Parametric Shapes3. Options Parameters/Meshbuilder4. Solid Particle Sprayer Good lookin' trophy case, Jerome! Well done! jerome 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted November 11, 2015 Author Share Posted November 11, 2015 You know, I did no magic Remember there was a discussion between DK, Jahow and Fenomas about the issues of the legacy Particle System when dealing with z-sort or alpha. These were design choices for performance reasons and because the particles were 2D quads drawn on top of the screen layer. The ol'good BJS classical abstract mesh then remained the best object in terms of z-sort, blending, alpha, etc.So I didn't re-invent anything. I just got this ol'good BJS mesh and made it a particle system in order to keep as much as possible all its features and capabilities. I just got the benefit that if I were using a real mesh, then I could make solid particles rotating in the space instead of only 2D quad ever facing the camera. The real challenge was to optimize all the very numerous 3D computations CPU side : each solid particle is applied, in brief, quite the same process than what the World Matrix does GPU side for a whole standard mesh (+ here : dynamic updates for colors, uvs and user custom logic).The SPS mesh is modified, updated, rebuild each frame, particle per particle, then passed to the GPU for its usual process : world transformation, view transformation, etc. These GPU processes apply only on the whole mesh : SPS rotation (not particle rotation), translation, camera moves, etc. So the SPS is a real BJS standard mesh. It should have the same weaknesses and powers than its brothers : as you can display a sphere in the middle of a torus, you can display a sphere within a SPS. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted January 1, 2016 Share Posted January 1, 2016 I dunno if I am doing something wrong in my set up... But, the Mesh that is created with SPS has no id or name -- you have to look it up by it's array value. Quote Link to comment Share on other sites More sharing options...
jerome Posted January 1, 2016 Author Share Posted January 1, 2016 https://github.com/BabylonJS/Babylon.js/blob/master/src/Particles/babylon.solidParticleSystem.ts#L107 ooopsseems to be a bug herethis should be this.name instead of name I'll fix it next week I don't get how this could passed the TS compilation Quote Link to comment Share on other sites More sharing options...
jerome Posted January 4, 2016 Author Share Posted January 4, 2016 PRed Quote Link to comment Share on other sites More sharing options...
Jon DevoS Posted June 11, 2018 Share Posted June 11, 2018 hi guys i am super new in babylon and i have some question, when mesh moves behind camera she disabled? any suggestion how to solve it? here is PG https://www.babylonjs-playground.com/#WCDZS#81 sorry for my bad english and maybe wrong theme solved SPS.mesh.alwaysSelectAsActiveMesh = true; :) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 11, 2018 Share Posted June 11, 2018 well done Quote Link to comment Share on other sites More sharing options...
jerome Posted June 11, 2018 Author Share Posted June 11, 2018 everything is explained here : http://doc.babylonjs.com/how_to/solid_particles#sps-visibility 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.