{"id":2132,"date":"2021-05-09T05:22:37","date_gmt":"2021-05-09T05:22:37","guid":{"rendered":"https:\/\/castle-engine.io\/wp\/?p=2132"},"modified":"2021-05-09T05:22:37","modified_gmt":"2021-05-09T05:22:37","slug":"gpu-based-3d-particle-system-and-upgraded-2d-particle-system-for-castle-game-engine","status":"publish","type":"post","link":"https:\/\/castle-engine.io\/wp\/2021\/05\/09\/gpu-based-3d-particle-system-and-upgraded-2d-particle-system-for-castle-game-engine\/","title":{"rendered":"GPU-based 3D particle system, and upgraded 2D particle system for Castle Game Engine"},"content":{"rendered":"<table class=\"thumbnails thumbnails-align-right\"><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_edit_fire.png\"\n             class=\"screenshot\"\n             title=\"3D particle system editing - fire\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_edit_fire-200x105.png\"\n             width=\"200\" height=\"105\" \n            alt=\"3D particle system editing - fire\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_particles_million.jpeg\"\n             class=\"screenshot\"\n             title=\"2D particles - million\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_particles_million-200x116.jpeg\"\n             width=\"200\" height=\"116\" \n            alt=\"2D particles - million\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_basic.png\"\n             class=\"screenshot\"\n             title=\"3D particle system - basic\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_basic-200x105.png\"\n             width=\"200\" height=\"105\" \n            alt=\"3D particle system - basic\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_basic_fireflies.png\"\n             class=\"screenshot\"\n             title=\"3D particle system - fireflies\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_basic_fireflies-200x105.png\"\n             width=\"200\" height=\"105\" \n            alt=\"3D particle system - fireflies\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_edit_mine.png\"\n             class=\"screenshot\"\n             title=\"3D particle system editing - beam\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_edit_mine-200x105.png\"\n             width=\"200\" height=\"105\" \n            alt=\"3D particle system editing - beam\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_basic_beam.png\"\n             class=\"screenshot\"\n             title=\"3D particle system - beam\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_basic_beam-200x106.png\"\n             width=\"200\" height=\"106\" \n            alt=\"3D particle system - beam\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_spiral.png\"\n             class=\"screenshot\"\n             title=\"2D particle system - spiral\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_spiral-200x106.png\"\n             width=\"200\" height=\"106\" \n            alt=\"2D particle system - spiral\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_lots.png\"\n             class=\"screenshot\"\n             title=\"2D particle system - lots of particles\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_lots-200x117.png\"\n             width=\"200\" height=\"117\" \n            alt=\"2D particle system - lots of particles\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_basic.png\"\n             class=\"screenshot\"\n             title=\"2D particle system\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/2d_basic-200x105.png\"\n             width=\"200\" height=\"105\" \n            alt=\"2D particle system\"\n          ><\/a><\/td><\/tr><\/table>\n<p><i>With huge thanks to Trung Le (Kagamma)<\/i>, we have a new 3D particle system for CGE, and serious upgrades to the existing 2D particle system:<\/p>\n<ol>\n<li>\n    The <a href=\"https:\/\/github.com\/Kagamma\/cge-2d-particle-emitter\">2D particle system<\/a> has now an alternative GPU-based implementation.<\/p>\n<p>It allows to render 1 million particles on the screen, with FPS still stable at 60 \ud83d\ude42<\/p>\n<p>Note: It is using Transform Feedback and some OpenGL 3+ stuff, so an OpenGL 3.3+ compatible graphics card is required, and it doesn&#8217;t yet work on mobile. But there is still a CPU-based compatible implementation, just use <code>TCastle2DParticleEffect<\/code> instead of <code>TCastle2DParticleEmitterGPU<\/code>, and it will work everywhere.<\/p>\n<li>\n<p>We have a new <a href=\"https:\/\/github.com\/Kagamma\/cge-3d-particle-emitter\/\">3D particle system<\/a>:<\/p>\n<ul>\n<li>\n<p>With a GPU-based implementation.<\/p>\n<p>As above, it is using Transform Feedback, so an OpenGL 3.3+ compatible graphics card is required, and it doesn&#8217;t yet work on mobile. There is no CPU implementation in this case, so it doesn&#8217;t (yet!) run everywhere where CGE is.<\/p>\n<li>\n<p>With its own 3D particle editor and JSON-based format to design 3D particle systems.\n    <\/ul>\n<\/ol>\n<p>Both particle emitters nicely integrate in the <a href=\"https:\/\/castle-engine.io\/manual_editor.php\">editor<\/a> &mdash; you can put them in <code>editor_units<\/code> in your <a href=\"https:\/\/github.com\/castle-engine\/castle-engine\/wiki\/CastleEngineManifest.xml-examples\">CastleEngineManifest.xml<\/a>, and they will register components like <i>3D Particle Emitter (GPU)<\/i>, <i>2D Particle Emitter<\/i>, <i>2D Particle Emitter (GPU)<\/i>.<\/p>\n<p>Get the linked repositories and run demos inside!<\/p>\n<p>Both repositories are listed now on <a href=\"https:\/\/castle-engine.io\/additional_components.php\">our gallery of CGE components<\/a>. (Do you develop any components that may be useful for other CGE developers? <a href=\"https:\/\/castle-engine.io\/talk.php\">Let us know<\/a> and we&#8217;ll happily add your components there.)<\/p>\n<p>See also forum posts about these developments: <a href=\"https:\/\/forum.castle-engine.io\/t\/3d-particle-system\/\">3D particle system<\/a>, <a href=\"https:\/\/forum.castle-engine.io\/t\/cge-2d-particle-emitter-now-supports-gpu-based-particle\/\">Cge-2d-particle-emitter now supports GPU-based particle<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With huge thanks to Trung Le (Kagamma), we have a new 3D particle system for CGE, and serious upgrades to the existing 2D particle system: The 2D particle system has now an alternative GPU-based implementation. It allows to render 1 million particles on the screen, with FPS still stable at 60 \ud83d\ude42 Note: It is &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/castle-engine.io\/wp\/2021\/05\/09\/gpu-based-3d-particle-system-and-upgraded-2d-particle-system-for-castle-game-engine\/\" class=\"more-link\">Continue reading  \u27a4<span class=\"screen-reader-text\"> &#8220;GPU-based 3D particle system, and upgraded 2D particle system for Castle Game Engine&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2135,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"publish_to_discourse":"1","publish_post_category":"9","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"1101","discourse_permalink":"https:\/\/forum.castle-engine.io\/t\/gpu-based-3d-particle-system-and-upgraded-2d-particle-system-for-castle-game-engine\/333","wpdc_publishing_response":"","wpdc_publishing_error":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-2132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/05\/3d_edit_fire.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9IgYW-yo","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/2132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/comments?post=2132"}],"version-history":[{"count":4,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/2132\/revisions"}],"predecessor-version":[{"id":2145,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/2132\/revisions\/2145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media\/2135"}],"wp:attachment":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media?parent=2132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/categories?post=2132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/tags?post=2132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}