12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Next Generation Particle Emitters :: jMonkeyEngine Docs</title>
- <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/3.8/contributions/effect/particles/particles.html">
- <meta name="generator" content="Antora 3.0.1">
- <link rel="stylesheet" href="../../../../../_/css/site.css">
- <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
- <meta property="og:description" content="Next Generation Particle Emitters">
- <meta property="og:title" content="jMonkeyEngine Docs">
- <link rel="stylesheet" href="../../../../../_/css/site-extra.css">
- <link rel="stylesheet" href="../../../../../_/css/vendor/docsearch.min.css">
- <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -->
- <link rel="icon" href="../../../../../_/img/favicon.ico" type="image/x-icon">
- </head>
- <body class="article">
- <header class="header">
- <nav class="navbar">
- <div class="navbar-brand">
- <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
- <img alt="" src="../../../../../_/img/jme-logo.png" height="32" type="image/x-icon">
- </a>
- <div class="navbar-item hide-for-print">
- <input id="search-input" type="text" placeholder="Search docs">
- </div>
- <button class="navbar-burger" data-target="topbar-nav">
- <span></span>
- <span></span>
- <span></span>
- </button>
- </div>
- <div id="topbar-nav" class="navbar-menu">
- <div class="navbar-end">
- <div class="navbar-item theme-switch-wrapper">
- <label class="theme-switch" for="checkbox">
- <input type="checkbox" id="checkbox" />
- <div class="slider round"></div>
- </label>
- </div>
- <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
- </div>
- </div>
- </nav>
- </header>
- <div class="body">
- <div class="nav-container" data-component="docs" data-version="3.8">
- <aside class="nav">
- <div class="panels">
- <div class="nav-panel-menu is-active" data-panel="menu">
- <nav class="nav-menu">
- <h3 class="title"><a href="../../../documentation.html">JME</a></h3>
- <ul class="nav-list">
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <a class="nav-link" href="../../../documentation.html">Getting Started</a>
- </li>
- <li class="nav-item" data-depth="1">
- <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.4.1-stable">JavaDoc</a>
- </li>
- <li class="nav-item" data-depth="1">
- <a class="nav-link" href="../../../release.html">Release Guide</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../tutorials/beginner/beginner.html">Beginner Tutorials</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_node.html">Hello Node</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_asset.html">Hello Asset</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_main_event_loop.html">Hello Update Loop</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_input_system.html">Hello Input System</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_material.html">Hello Material</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_animation.html">Hello Animation</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_picking.html">Hello Picking</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_collision.html">Hello Collision</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_terrain.html">Hello Terrain</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_audio.html">Hello Audio</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_effects.html">Hello Effects</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/beginner/hello_physics.html">Hello Physics</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Key Concepts</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/best_practices.html">Best Practices</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/optimization.html">Optimization</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/faq.html">Frequently Asked Questions</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/math_for_dummies.html">Math for Dummies</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/math.html">Math overview</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/math_cheet_sheet.html">3D math "cheat sheet"</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/rotate.html">3-D Rotation</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/math_video_tutorials.html">Math video tutorial series</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/the_scene_graph.html">The Scene Graph</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/scenegraph_for_dummies.html">Scene Graph for Dummies</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/terminology.html">3D Graphics Terminology</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/concepts/transparency_sorting.html">Transparency Sorting</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Articles and How-to’s</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">How to Model</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/3dsmax/3dsmax.html">3dsmax</a>
- </li>
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender.html">Blender</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_buffer_clearing.html">Buffer Clearing</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_gltf.html">Export as GlTF</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_ogre_export.html">Export as Ogre XML</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_ogre_compatibility.html">Ogre Compatibility</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/makehuman.html">MakeHuman</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/makehuman_blender_ogrexml_toolchain.html">MakeHuman toolchain</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">How to Animate</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Mixamo</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/mixamo.html">Blender Models</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/how-to/debugging.html">Debugging with Wireframes</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../tutorials/how-to/util/free_skymaps.html">How to create free skymaps</a>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Java Tips</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../tutorials/how-to/java/localization.html">Localization</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../tutorials/how-to/java/swing_canvas.html">Swing Canvas</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../tutorials/how-to/java/logging.html">Logging</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../tutorials/how-to/java/read_graphic_card_capabilites.html">Read Graphics Capabilities</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Articles</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Physically Based Rendering</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/articles/pbr/pbr_part1.html">PBR – Part one</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/articles/pbr/pbr_part2.html">PBR – Part two</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../tutorials/how-to/articles/pbr/pbr_part3.html">PBR – Part three</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Core Engine</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/app/simpleapplication.html">SimpleApplication</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/system/appsettings.html">AppSettings</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Controlling Game Logic</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/app/update_loop.html">Update Loop</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/app/state/application_states.html">Application States</a>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../core/scene/control/custom_controls.html">Custom Controls</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Video</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="https://www.youtube.com/watch?v=MNDiZ9YHIpM">Control any scene node</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="https://www.youtube.com/watch?v=-OzRZscLlHY">Control a character</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="https://wiki.jmonkeyengine.org/Scenes/SDK-UsecaseDemo_1.zip">Video Source Code</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/app/multithreading.html">Multithreading</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Scene Graph</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/scene/traverse_scenegraph.html">Traverse SceneGraph</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/scene/spatial.html">Spatial: Node vs Geometry</a>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../core/scene/mesh.html">Mesh</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/scene/custom_meshes.html">Custom Meshes</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/scene/shape/shape.html">Shape</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/scene/3d_models.html">3D Models</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/asset/asset_manager.html">Asset Manager</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/export/save_and_load.html">Saving and Loading Nodes</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/collision/collision_and_intersection.html">Collision and Intersection</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/scene/control/level_of_detail.html">Level of Detail</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Animation, Scene</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/animation/animation_new.html">Animation with AnimComposer</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/animation/animation.html">Animation-Old (AnimControl)</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/cinematic/cinematics.html">Cinematics (cutscenes, fake destruction physics)</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/cinematic/motionpath.html">MotionPaths and Waypoints</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Material, Light, Shadow</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/material/how_to_use_materials.html">How to use Materials</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/material/j3m_material_files.html">.j3m Material Files</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/material/material_definitions.html">.j3md Material Definitions</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/material/materials_overview.html">.j3md Properties</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/shader/jme3_shaders.html">Shaders and JME3</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/shader/jme3_shadernodes.html">Shader Node System</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/shader/shader_video_tutorials.html">Shader Video Tutorials</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/light/light_and_shadow.html">Light and Shadow</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/texture/anisotropic_filtering.html">Anisotropic Filtering</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/system/jme3_srgbpipeline.html">Gamma Correction</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/material/normal_types.html">Normal Map Conventions</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Audio, Video</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/audio/audio.html">Playing Sounds</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/audio/audio_environment_presets.html">Audio Environment Presets</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/app/state/screenshots.html">Capture Screenshots</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/app/state/capture_audio_video_to_a_file.html">Capture Audio/Video</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Filter, Effect</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/effect/effects_overview.html">Overview</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/effect/bloom_and_glow.html">Bloom and Glow</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/effect/particle_emitters.html">Particle Emitters</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Landscapes</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/util/sky.html">Sky</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/terrain/terrain.html">Terrain (TerraMonkey)</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/collision/terrain_collision.html">Terrain Collision</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/effect/water.html">Simple Water</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/effect/post-processor_water.html">Post-Processor Water</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Camera</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/renderer/camera.html">Camera</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/renderer/making_the_camera_follow_a_character.html">Follow a Character</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/renderer/remote-controlling_the_camera.html">Remote-Controlling</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/renderer/multiple_camera_views.html">Multiple Camera Views</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/renderer/jme3_renderbuckets.html">Render Buckets</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Rendering</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/renderer/render_pipeline.html">Render Pipelines</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">User Interaction</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/input/input_handling.html">Input Handling</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/input/combo_moves.html">Combo Moves</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/input/mouse_picking.html">Mouse Picking</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../core/gui/topic_gui.html">Graphical User Interface</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Nifty GUI</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/gui/nifty_gui.html">Integration Tutorial</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/gui/nifty_gui_best_practices.html">Best Practices</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/gui/nifty_gui_scenarios.html">Scenarios</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/ui/hud.html">Head-Up Display (HUD)</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Virtual Reality</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/vr/virtualreality.html">Virtual Reality</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/vr/legacyOpenVr.html">Virtual Reality Legacy Support</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../core/vr/virtualrealitycontrollers.html">Virtual Reality Legacy Controller Support</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../physics/physics.html">Physics</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/bullet_multithreading.html">Multi-Threaded Physics</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/collision/physics_listeners.html">Collision Detection</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/joint/hinges_and_joints.html">Hinges and Joints</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/control/walking_character.html">Walking Character</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/control/ragdoll.html">Ragdoll</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/control/vehicles.html">Vehicles</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/control/softbody.html">Softbody</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../physics/bullet_pitfalls.html">Bullet Physics Pitfalls</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Networking</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../networking/networking.html">Networking (SpiderMonkey)</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../networking/headless_server.html">Headless Server</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../networking/monkey_zone.html">Multi-Player Demo Code</a>
- </li>
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../../networking/networking_video_tutorials.html">Networking Video Tutorials</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">User Contributions</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <a class="nav-link" href="../../contributions.html">User Made Utilities</a>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Shader</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../shader/shaderblow_project.html">ShaderBlow Project</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Landscapes</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../lanscapes/vegetationsystem/vegetationsystem.html">Vegetation System</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Networking</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../networking/open_game_finder.html">Open Game Finder</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Entity System</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="#es/entitysystem.adoc">The Zay-ES Entity System</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Artificial Intelligence</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../ai/recast.html">Recast Navigation</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../ai/building_recast.html">Updating and building Recast Native Bindings</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../ai/monkey_brains.html">Monkey Brains</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../ai/steer_behaviours.html">Steer Behaviours</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../ai/jme3_ai.html">jME3 Artificial Intelligence</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../gui/topic_contributions_gui.html">GUI</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../contributions.html#lemur-gui-library">Lemur - a native jME3 GUI library with scene graph tools</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../contributions.html#tonegodgui">tonegodGUI - a native jME3 GUI library</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../contributions.html#immediate-graphical-user-interface">Immediate graphical user interface</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Tools</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../tools/navigation.html">Mercator Projection Tool (Marine Navigation)</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../tools/charts.html">Visualizing Maps in JME3 (Marine Charts)</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../vr/topic_contributions_vr.html">Virtual Reality (And augmented reality)</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../contributions.html#tamarin-openxr">Tamarin OpenXR</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Projects</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../projects/rise_of_mutants_project.html">Rise of Mutants Project</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="0">
- <ul class="nav-list">
- <li class="nav-item" data-depth="1">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../sdk/sdk.html">SDK</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Video Tutorials</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">SDK Use Case Tutorials</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=-OzRZscLlHY">Demo 1 (Quixote demo)</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=6-YWxD3JByE">Demo 2 (Models and Materials)</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">SDK Tutorials</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=M1_0pbeyJzI">Basics</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=nL7woH40i5c">Importing Models</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=DUmgAjiNzhY">Dragging&Dropping Nodes</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=ntPAmtsQ6eM">Scene Composing</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=zgPV3W6dD4s">Terrain with Collision Shape</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=Feu3-mrpolc">Working with Materials</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=MNDiZ9YHIpM">Custom Controls</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=oZnssg8TBWQ">WebStart Deployment</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="http://www.youtube.com/watch?v=D7JM4VMKqPc">Animation and Effect TrackEditing</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Getting Started</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/update_center.html">Updating jMonkeyEngine SDK</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/troubleshooting.html">Troubleshooting</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Java Development Features</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/project_creation.html">Project Creation</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/code_editor.html">Code Editor and Palette</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/version_control.html">File Version Control</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/debugging_profiling_testing.html">Debug, Profile, Test</a>
- </li>
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../sdk/application_deployment.html">Application Deployment</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../sdk/default_build_script.html">Default Build Script</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../sdk/android.html">Android</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../sdk/android_cheat_sheet.html">Android Cheat Sheet</a>
- </li>
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../sdk/ios.html">iOS</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Unique Features</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../sdk/model_loader_and_viewer.html">Import, View, Convert Models</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="../../../sdk/asset_packs.html">Asset Packs</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/scene_explorer.html">The SceneExplorer</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/scene_composer.html">Composing a Scene</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/terrain_editor.html">Terrain Editor</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/sample_code.html">Sample Code</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/material_editing.html">Material Editing</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/font_creation.html">Creating Bitmap Fonts</a>
- </li>
- <li class="nav-item" data-depth="3">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="https://hub.jmonkeyengine.org/t/effecttrack-and-audiotrack-editing-in-the-sdk/23378">Audio and Effect Track Editing</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="4">
- <a class="nav-link" href="https://www.youtube.com/watch?v=D7JM4VMKqPc">Video: Effect and AudioTrack editing in jMonkeyEngine 3 sdk</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/filters.html">Post-Processor Filter Editor and Viewer</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/app/state/application_states.html">Application States</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../core/scene/control/custom_controls.html">Custom Controls</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/vehicle_creator.html">Vehicle Creator</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/assetbrowser.html">Asset Browser</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/animations.html">Animations</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Advanced Usage</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/build_platform.html">Building jMonkeyEngine SDK</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/use_own_jme.html#.adoc">Using your own (modified) version of jME3 in jMonkeyEngine SDK</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/increasing_heap_memory.html">Increasing Heap Memory</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/log_files.html">Log Files</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <span class="nav-text">Available external plugins</span>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../contributions.html">Contributions</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/neotexture.html">Neo Texture Editor for procedural textures</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="http://www.youtube.com/watch?v=yS9a9o4WzL8">Video: Mesh Tool & Physics Editor</a>
- </li>
- </ul>
- </li>
- <li class="nav-item" data-depth="2">
- <button class="nav-item-toggle"></button>
- <a class="nav-link" href="../../../sdk/development.html">Developing plugins for jMonkeyEngine SDK</a>
- <ul class="nav-list">
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/setup.html">Creating a plugin</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/general.html">Creating components</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/scene.html">The Main Scene</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/sceneexplorer.html">The Scene Explorer</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/projects_assets.html">Projects and Assets</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/extension_library.html">Create a library plugin from a jar file</a>
- </li>
- <li class="nav-item" data-depth="3">
- <a class="nav-link" href="../../../sdk/development/model_loader.html">Create a new or custom model filetype and loader</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </nav>
- </div>
- <div class="nav-panel-explore" data-panel="explore">
- <div class="context">
- <span class="title">JME</span>
- <span class="version">3.8</span>
- </div>
- <ul class="components">
- <li class="component is-current">
- <span class="title">JME</span>
- <ul class="versions">
- <li class="version is-current">
- <a href="../../../documentation.html">3.8</a>
- </li>
- <li class="version">
- <a href="../../../../3.4/documentation.html">3.4</a>
- </li>
- <li class="version">
- <a href="../../../../3.3/documentation.html">3.3</a>
- </li>
- <li class="version">
- <a href="../../../../3.2/documentation.html">3.2</a>
- </li>
- </ul>
- </li>
- <li class="component">
- <span class="title">Wiki Contribution</span>
- <ul class="versions">
- <li class="version">
- <a href="../../../../../docs-wiki/3.8/wiki_contributor.html">3.8</a>
- </li>
- </ul>
- </li>
- <li class="component">
- <span class="title">Wiki UI</span>
- <ul class="versions">
- <li class="version">
- <a href="../../../../../wiki-ui/index.html">master</a>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </aside>
- </div>
- <main class="article">
- <div class="toolbar" role="navigation">
- <button class="nav-toggle"></button>
- <nav class="breadcrumbs" aria-label="breadcrumbs">
- <ul>
- <li><a href="../../../documentation.html">JME</a></li>
- <li><a href="particles.html">Next Generation Particle Emitters</a></li>
- </ul>
- </nav>
- <div class="page-versions">
- <button class="version-menu-toggle" title="Show other versions of page">3.8</button>
- <div class="version-menu">
- <a class="version is-current" href="particles.html">3.8</a>
- <a class="version" href="../../../../3.4/contributions/effect/particles/particles.html">3.4</a>
- <a class="version" href="../../../../3.3/contributions/effect/particles/particles.html">3.3</a>
- <a class="version" href="../../../../3.2/contributions/effect/particles/particles.html">3.2</a>
- </div>
- </div>
- <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs/modules/contributions/pages/effect/particles/particles.adoc">Edit this Page</a></div>
- </div>
- <div class="content">
- <article class="doc">
- <h1 class="page">Next Generation Particle Emitters</h1>
- <div id="preamble">
- <div class="sectionbody">
- <div class="paragraph">
- <p>This is a new particle system for jME3 posted for review and comments. This is an opportunity for people to comment on and request changes to the <abbr title="Application Programming Interface">API</abbr> or the internal functionality of the system.
- The code for this particle system can be found <a href="https://github.com/jMonkeyEngine-Contributions/ParticleController">jMonkeyEngine-Contributions</a></p>
- </div>
- <div class="paragraph">
- <p>Apologies for the slight jitter in some of the videos, the VideoRecorderState seems to be causing some issues which are not present when the application is running normally.</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="credits"><a class="anchor" href="#credits"></a>Credits</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>These particle emitters are inspired by and use some code from t0neg0ds particle emitters as described <a href="http://hub.jmonkeyengine.org/t/influencer-based-particleemitter-candidate-mesh-based-animated-particles/25831">here</a></p>
- </div>
- <div class="paragraph">
- <p>Those in turn were based on the original jME3 particle system by Kirill Vainer</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="the-big-picture"><a class="anchor" href="#the-big-picture"></a>The Big Picture</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>The core of all Particle Emitters is a ParticleController. That is used to manage all of the particles, the behaviour of the particles themselves though is controlled though a number of other classes that are plugged in to the ParticleController to provide the required functionality. You can think of the ParticleController as providing the central hub into which you plug all the modules you need to get the desired behaviour.</p>
- </div>
- <div class="paragraph">
- <p>An easy way to see what you need is to create a new ParticleController and then look at the constructor, you can see what parameters need to be supplied there.</p>
- </div>
- <table class="tableblock frame-all grid-all stretch">
- <colgroup>
- <col style="width: 50%;">
- <col style="width: 50%;">
- </colgroup>
- <thead>
- <tr>
- <th class="tableblock halign-left valign-top">name</th>
- <th class="tableblock halign-left valign-top">The name to use for the geometry in the scene graph</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>mesh</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>The mesh to use (Usually either PointMesh or QuadMesh)</p>
- </div></div></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>maxParticles</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>The maximum number of particles to allow active at any one time</p>
- </div></div></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>lifeMin</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>The minimum amount of time (in seconds) for which each particle lives</p>
- </div></div></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>lifeMax</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>The maximum amount of time (in seconds) for which each particle lives</p>
- </div></div></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>source</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>The source from which the particles are spawned</p>
- </div></div></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>emissionController</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>The frequency and timing with which particles are spawned. If null then no particles are automatically spawned and they must be triggered manually using emitNextParticle() or emitAllParticles()</p>
- </div></div></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>influencers</p>
- </div></div></td>
- <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
- <p>Zero or more ParticleInfluencers, each of which changes the behaviour of the particles.</p>
- </div></div></td>
- </tr>
- </tbody>
- </table>
- <div class="paragraph">
- <p>By selecting the behaviour you desire for each option you can configure up a virtually infinite array of possible particle emitters.</p>
- </div>
- <div class="paragraph">
- <p>We will now walk through some common examples and possible uses, and then in the end we will document all of the possible choices for these options.</p>
- </div>
- <div class="paragraph">
- <p>For a full reference of the standard options available see the <a href="reference.html" class="xref page">Reference Page</a>.</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="simple-fire"><a class="anchor" href="#simple-fire"></a>Simple Fire</h2>
- <div class="sectionbody">
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public class HelloParticles1_SimpleFire extends SimpleApplication {
- public static void main(String[] args){
- HelloParticles1_SimpleFire app = new HelloParticles1_SimpleFire();
- app.start(); // start the game
- }
- @Override
- public void simpleInitApp() {
- // Construct a new ParticleController
- ParticleController pCtrl = new ParticleController(
- // The name of the emitter
- "SimpleFire",
- // Use a simple point mesh (the fastest but most limited mesh type) with the specified
- // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
- new PointMesh(assetManager, "Effects/Explosion/flame.png", 2, 2),
- // Allow at most 32 particles at any time
- 32,
- // Particles last for at least 2 seconds
- 2,
- // And at most 3 seconds
- 3,
- // Point sources always generate particles at the location of the source, the particles
- // are given a random velocity between the two given.
- new PointSource(new Vector3f(-3, 0, -3), new Vector3f(3, 0, 3)),
- // Emit particles at regular intervals, 10 particles every second
- new RegularEmission(10),
- // ** Influencers start here
- // Select a random sprite from the 4 available for each particle
- new RandomSpriteInfluencer(),
- // Particles start off with a size of 0.5 units, end with a radius of 0.1
- new SizeInfluencer(0.5f, 0.1f),
- // Particles start yellow full opacity and fade towards red with very low opacity
- new ColorInfluencer(new ColorRGBA(1,1,0.2f,1), new ColorRGBA(1,0,0,0.1f)),
- // No matter what velocity particles started with they will start moving upwards.
- new PreferredDirectionInfluencer(new Vector3f(0, 1, 0), 0.25f));
- // Finally attach the geometry to the rootNode in order to start the particles running
- rootNode.attachChild(pCtrl.getGeometry());
- }
- }</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>Run that and the result should look something like:</p>
- </div>
- <div class="paragraph">
- <p><span class="image"><img src="../../_images/effect/particles/particles1.jpg" alt="particles1.jpg" width="" height=""></span></p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="simple-fire-and-smoke"><a class="anchor" href="#simple-fire-and-smoke"></a>Simple Fire and Smoke</h2>
- <div class="sectionbody">
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
- public void simpleInitApp() {
- // Construct a new ParticleController
- ParticleController pCtrl = new ParticleController(
- // The name of the emitter
- "SimpleFire",
- // Use a simple point mesh (the fastest but most limited mesh type) with the specified
- // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
- new PointMesh(assetManager, "Effects/Explosion/flame.png", 2, 2),
- // Allow at most 50 particles at any time, the particles are lasting longer this time
- // so we need to allow more on screen at once
- 50,
- // Particles last for at least 4 seconds
- 4,
- // And at most 5 seconds
- 5,
- // Point sources always generate particles at the location of the source, the particles
- // are given a random velocity between the two given.
- new PointSource(new Vector3f(-3, 0, -3), new Vector3f(3, 0, 3)),
- // Emit particles at regular intervals, 10 particles every second
- new RegularEmission(10),
- // ** Influencers start here
- // Select a random sprite from the 4 available for each particle
- new RandomSpriteInfluencer(),
- // Particles start off with a size of 0.5 units, end with a radius of 0.1
- new SizeInfluencer(0.5f, 0.25f),
- // Particles start yellow full opacity and fade towards red with very low opacity
- new MultiColorInfluencer(
- new MultiColorInfluencer.Stage(0, new ColorRGBA(1, 1, 0.1f, 1)),
- new MultiColorInfluencer.Stage(0.15f, new ColorRGBA(1, 0, 0, 0.25f)),
- new MultiColorInfluencer.Stage(0.3f, new ColorRGBA(1f, 1f, 1f, 0.5f)),
- new MultiColorInfluencer.Stage(1, new ColorRGBA(1f,1f,1f,0f))
- ),
- // No matter what velocity particles started with they will start moving upwards.
- new PreferredDirectionInfluencer(new Vector3f(0, 1, 0), 0.25f));
- // Finally attach the geometry to the rootNode in order to start the particles running
- rootNode.attachChild(pCtrl.getGeometry());
- }</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>You can see that the only change is to make the particles last a little longer and to change the ColorInfluencer for a MultiColorInfluencer, and yet the results look quite different:</p>
- </div>
- <div class="paragraph">
- <p><span class="image"><img src="../../_images/effect/particles/particles1.jpg" alt="particles2.jpg" width="" height=""></span></p>
- </div>
- <div class="paragraph">
- <p>This isn’t a very convincing fire yet, but it is very simple to get up and running. One problem with this approach is that particles are done using an alpha-additive material, they can only make things brighter but never darker. That is not ideal for smoke which should be able to make them darker too. We will look at this again later but for now we will move on to some different mesh types.</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="quad-meshes-and-billboarding"><a class="anchor" href="#quad-meshes-and-billboarding"></a>Quad Meshes and Billboarding</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>Point Meshes are extremely fast, but they have a number of limitations. The main ones being that the sprites must always be facing towards the screen and that on certain graphics cards the maximum number of pixels a sprite can occupy on the screen is limited.</p>
- </div>
- <div class="paragraph">
- <p>While PointMesh is recommended for basic particles for more advanced options there is the QuadMesh, this constructs each particle using a quad and as a result can allow any size on the screen and any orientation. The following example combines two separate particle emitters to produce a spell-like effect.</p>
- </div>
- <div class="admonitionblock note">
- <table>
- <tr>
- <td class="icon">
- <i class="fa icon-note" title="Note"></i>
- </td>
- <td class="content">
- <div class="paragraph">
- <p>The flame image from before is used for the second emitter, the first emitter uses this image which you can download and use:</p>
- </div>
- <div class="paragraph">
- <p><span class="image"><img src="../../_images/effect/particles/runecircle.png" alt="runecircle.png" width="256" height=""></span></p>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
- public void simpleInitApp() {
- // Construct a new ParticleController to provide the actual spell runes effect
- ParticleController pCtrl = new ParticleController(
- // The name of the emitter
- "SpellRunes",
- // Use a Quad Mesh, this image is available for download on this page. The texture file contains
- // a single image so there are no sprite columns and rows to set up. The BillboardStrategy is how
- // the particles should be oriented, in this case it uses the particle rotation.
- new QuadMesh(QuadMeshBillboardStrategy.USE_PARTICLE_ROTATION, assetManager, "Textures/runeCircle.png"),
- // Allow at most 9 particles at any time
- 9,
- // Particles always last for 4 seconds
- 4,
- 4,
- // We want to generate all particles from the same location with the same velocity.
- new PointSource(new Vector3f(0, 1f, 0), new Vector3f(0, 1f, 0)),
- // Emit particles at regular intervals, 4 particles every second
- new RegularEmission(2),
- // ** Influencers start here
- // These particles should be size 3 and stay the same size
- new SizeInfluencer(3, 3),
- // Start the particles at full opacity blue and then fade them out to 0 opacity cyan.
- new ColorInfluencer(ColorRGBA.Blue, new ColorRGBA(0, 1, 1, 0)),
- // Rotate all particles by the same amount. The units are radians-per-second
- new RotationInfluencer(
- new Vector3f(0, FastMath.QUARTER_PI, 0),
- new Vector3f(0, FastMath.QUARTER_PI, 0), false));
- // Finally attach the geometry to the rootNode in order to start the particles running
- rootNode.attachChild(pCtrl.getGeometry());
- // Construct a new ParticleController to provide the central glow effect
- pCtrl = new ParticleController(
- // The name of the emitter
- "SpellBase",
- // Use a simple point mesh (the fastest but most limited mesh type) with the specified
- // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
- new PointMesh(assetManager, "Textures/flame.png", 2, 2),
- // Allow at most 76 particles at any time
- 76,
- // Particles last for at least 5 seconds
- 5,
- // And at most 5 seconds
- 5,
- // Point sources always generate particles at the location of the source, the particles
- // are given a random velocity between the two given.
- new PointSource(new Vector3f(-1f, 0, -1f), new Vector3f(1f, 0.5f, 1f)),
- // Emit particles at regular intervals, 15 particles every second
- new RegularEmission(15),
- // ** Influencers start here
- // Select a random sprite from the 4 available for each particle
- new RandomSpriteInfluencer(),
- // Particles start red with some blue and green and fade towards blue zero opacity
- // Because particles are rendered using an additive blend then any area where a lot
- // of particles overlap will end up white.
- new ColorInfluencer(new ColorRGBA(1,0.25f,0.25f,0.25f), new ColorRGBA(0,0,1,0f)));
- // Finally attach the geometry to the rootNode in order to start the particles running
- rootNode.attachChild(pCtrl.getGeometry());
- cam.setLocation(new Vector3f(0, 10, -10));
- cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
- }</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>The result should look something like:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=_Spjqag99HY">Video: Particle Emitter Example 1</a></p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="using-a-mesh-as-the-particle-source"><a class="anchor" href="#using-a-mesh-as-the-particle-source"></a>Using a mesh as the particle source</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>There is a model of a monkeys head in the test data that is used in this example, although you can use any other model you like. Just make sure you can find the geometry within the model for the next step.</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
- public void simpleInitApp() {
- Node monkey = (Node) assetManager.loadModel("Models/MonkeyHead/MonkeyHead.mesh.xml");
- rootNode.attachChild(monkey);
- DirectionalLight dl = new DirectionalLight();
- dl.setDirection(new Vector3f(-0.1f,-0.7f,-1).normalizeLocal());
- dl.setColor(new ColorRGBA(0.88f, 0.60f, 0.60f, 1.0f));
- rootNode.addLight(dl);
- AmbientLight al = new AmbientLight();
- al.setColor(ColorRGBA.White);
- rootNode.addLight(al);
- ...
- }</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>The result should look something like:</p>
- </div>
- <div class="paragraph">
- <p><span class="image"><img src="../../_images/effect/particles/particles1.jpg" alt="particles3.jpg" width="" height=""></span></p>
- </div>
- <div class="paragraph">
- <p>Now lets set fire to the monkey! (No monkeys were harmed during the making of this particle system!).</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">// Construct a new ParticleController
- ParticleController pCtrl = new ParticleController(
- // The name of the emitter
- "SimpleFire",
- // Use a simple point mesh (the fastest but most limited mesh type) with the specified
- // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
- new PointMesh(assetManager, "Textures/flame.png", 2, 2),
- // Allow at most 1200 particles at any time, the particles are lasting longer this time
- // so we need to allow more on screen at once
- 1200,
- // Particles last for at least 4 seconds
- 4,
- // And at most 5 seconds
- 5,
- // A MeshSource scans a geometry and picks a random point on the surface of that
- // geometry in order to emit the particle from it. The particle has an initial velocity
- // of 1wu/s along the normal of the triangle from which it is emitted.
- new MeshSource(g),
- // Emit particles at regular intervals, 10 particles every second
- new RegularEmission(240),
- // ** Influencers start here
- // Select a random sprite from the 4 available for each particle
- new RandomSpriteInfluencer(),
- // Particles start off with a size of 0.1 units, end with a size of 0.15
- new SizeInfluencer(0.1f, 0.15f),
- // Particles have a constant speed of 0.25f, this will modify the original speed
- // from the emitter and then allow the GravityInfluencer to change the direction
- // of motion but constrain the speed
- new SpeedInfluencer(0.25f, 0.25f),
- // Fade the particles through a range of colours
- new MultiColorInfluencer(
- new MultiColorInfluencer.Stage(0, new ColorRGBA(1, 1, 0.1f, 1)),
- new MultiColorInfluencer.Stage(0.25f, new ColorRGBA(1, 0, 0, 0.25f)),
- new MultiColorInfluencer.Stage(0.5f, new ColorRGBA(1f, 1f, 1f, 0.25f)),
- new MultiColorInfluencer.Stage(1, new ColorRGBA(1f,1f,1f,0f))
- ),
- // No matter what velocity particles started with they will start moving upwards.
- new GravityInfluencer(new Vector3f(0, 0.5f, 0)));
- // Finally attach the geometry to the rootNode in order to start the particles running
- rootNode.attachChild(pCtrl.getGeometry());</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>Again this is just a very simple example, much more sophisticated fire effects are possible with the use of the right textures and mixture of emitters and influencers. The result though should look something like this:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=W__zGJHZ2AU">Video: Particle Emitter Example 2</a></p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="meshes-and-weighted-meshes"><a class="anchor" href="#meshes-and-weighted-meshes"></a>Meshes and Weighted Meshes</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>The previous example uses a MeshSource, this picks a random triangle from the mesh without any regard given to the size of different triangles. This means areas with small triangles are actually more likely to emit particles than areas with large triangles. For most meshes this is not visible, however there is a WeightedMeshSource available if this should be a problem.</p>
- </div>
- <div class="paragraph">
- <p>The WeightedMeshSource scans the mesh and works out a weight for each triangle based on its relative size, so that the result is an even spread of particles even with very large differences in triangle sizes. There are some limitations with this though:</p>
- </div>
- <div class="olist arabic">
- <ol class="arabic">
- <li>
- <p>The WeightedMeshSource consumes more memory as it needs to remember the weights</p>
- </li>
- <li>
- <p>The WeightedMeshSource is slower as it needs to do more work to pick a triangle</p>
- </li>
- <li>
- <p>The WeightedMeshSource does not update automatically if the mesh changes, if triangles are added they will not emit, if triangles are removed it could cause a crash. If triangles change shape then the weights are not updated.</p>
- </li>
- </ol>
- </div>
- <div class="paragraph">
- <p>There is a method available to cause the weights to be recalculated which can be used if changing the mesh, but really if possible a non-weighted MeshSource should be used for dynamic meshes.</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="3d-particles-templatemesh"><a class="anchor" href="#3d-particles-templatemesh"></a>3d Particles - TemplateMesh</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>The previous mesh examples all use simple 2d quads to display images. There is another mesh type though, the TemplateMesh, which allows fully featured 3d particles to be used.</p>
- </div>
- <div class="admonitionblock note">
- <table>
- <tr>
- <td class="icon">
- <i class="fa icon-note" title="Note"></i>
- </td>
- <td class="content">
- <div class="paragraph">
- <p>There is a rock texture available in the jME3 test data, or you can substitute any other suitable texture. The model for this example is: <a href="http://www.zero-separation.com/particles/FracturedCube.j3o">FracturedCube.j3o</a></p>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
- public void simpleInitApp() {
- // Since we actually use a full lit material for these particles we need
- // to add a light to the scene in order to see anything.
- DirectionalLight dl = new DirectionalLight();
- dl.setDirection(new Vector3f(-0.1f,-0.7f,-1).normalizeLocal());
- dl.setColor(new ColorRGBA(0.6f, 0.60f, 0.60f, 1.0f));
- rootNode.addLight(dl);
- // A standard lit material is used, this rock texture was taking from the
- // jme3 test data but you can easily substitute your own.
- Material rock = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
- rock.setTexture("DiffuseMap", assetManager.loadTexture("Textures/Rock.PNG"));
- rock.setFloat("Shininess", 100f);
- // A PointSource is actually a fully featured Spatial object, in this case
- // we simply adjust its translation, but it can actually be attached to the
- // scene graph and the source will automatically move as the Node to which
- // it is attached is transformed.
- PointSource source = new PointSource(new Vector3f(-5,-5,-5), new Vector3f(5,5,5));
- source.setLocalTranslation(0, 10, -20);
- // A TemplateMesh uses any number of standard meshes to be the template for
- // each 3d particle. This model was generated simply by taking a cube in
- // Blender and running a fracture script on it to generate 20 fragments.
- Node n = (Node) assetManager.loadModel("Models/FracturedCube.j3o");
- Mesh[] templates = new Mesh[n.getChildren().size()];
- int i = 0;
- for (Spatial s: n.getChildren()) {
- Geometry g = (Geometry)((Node)s).getChild(0);
- templates[i++] = g.getMesh();
- }
- // Construct the new particle controller
- ParticleController rockCtrl = new ParticleController(
- "TemplateMesh",
- // The TemplateMesh uses the rock material we created previously, the two boolean
- // flags say that we are not interested in vertex colours but we do want the vertex
- // normals. The array of meshes extracted from the model is then passed in to use
- // as models for each particle.
- new TemplateMesh(rock, false, true, templates),
- // A maximum of 64 particles at once, each lasting for 5 to 5.5 seconds.
- 64,
- 5,
- 5.5f,
- // Particles are emitted from the source that we created and positioned earlier
- source,
- // Emit 8 particles per second
- new RegularEmission(8),
- // The "sprites" in this case are the available templates. The TemplateMesh has
- // one spriteColumn for each template it has been provided, so the standard
- // RandomSpriteInfluencer just causes one to be picked at random each time a
- // particle is emitted.
- new RandomSpriteInfluencer(),
- // Rocks fall.
- new GravityInfluencer(new Vector3f(0, -4, 0)),
- // Rocks spin.
- new RotationInfluencer(new Vector3f(-2, -2, -2), new Vector3f(2, 2, 2), false));
- rootNode.attachChild(rockCtrl.getGeometry());
- }</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>The result should look like:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=a7y53UF8Giw">Video: Particle Emitter Example 3</a></p>
- </li>
- </ul>
- </div>
- <div class="paragraph">
- <p>Any number and mixture of models can be used, although as it is all a single mesh the same material must be used for all of them. It is recommended to keep a similar number of vertices for each of the models but that is not a strict requirement.</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="emitting-particles-from-particles"><a class="anchor" href="#emitting-particles-from-particles"></a>Emitting Particles from Particles</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>To add more dramatic effects sometimes you want to emit particles from particles, this could be done simply by attaching a MeshSource for the second controller to the mesh from the first controller. There are a number of limitations to this approach though, which will be demonstrated now:</p>
- </div>
- <div class="paragraph">
- <p>Adding the following code:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> ParticleController pCtrl = new ParticleController(
- "TemplateFlames",
- new PointMesh(assetManager, "Textures/flame.png", 2, 2),
- 1300,
- 3,
- 4,
- new MeshSource(rockCtrl.getGeometry()),
- new RegularEmission(320),
- new SizeInfluencer(0.5f, 2),
- new ColorInfluencer(new ColorRGBA(1,1,0.1f, 1f), new ColorRGBA(1,0,0,0.05f)),
- new GravityInfluencer(new Vector3f(0, 0.3f, 0)),
- new RandomImpulseInfluencer(
- RandomImpulseInfluencer.ImpulseApplicationTime.INITIALIZE,
- new Vector3f(-0.5f, -0.5f, -0.5f),
- new Vector3f(0.5f, 0.5f, 0.5f)));
- rootNode.attachChild(pCtrl.getGeometry());</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>Results in something that looks like this:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=WGR5RzF9APg">Video: Particle Emitter Example 3</a></p>
- </li>
- </ul>
- </div>
- <div class="paragraph">
- <p>You can see that while dramatic the fire is left behind each particle, this is because although it is emitted from the face of the particle at its current position it has no knowledge of how that particle is moving.</p>
- </div>
- <div class="paragraph">
- <p>To allow for this we also offer a different emitter, this allows one ParticleController to act as the source for another. The emitted particles are then able to start with the same velocity and rotation of the particle they are being emitted from and then move onward from there as appropriate.</p>
- </div>
- <div class="paragraph">
- <p>Leave everything else the same but change the MeshSource into</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> new ParticleParticleSource(rockCtrl),</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>You can see that this gives much better results:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=2BlBZVM0EZQ">Video: Particle Emitter Example 4</a></p>
- </li>
- </ul>
- </div>
- <div class="paragraph">
- <p>There is a lot of falling rocks and fire here, but not much in the way of smoke. That could be added using a multi-colour emitter as previously, but the standard particle material is additive. That means it can only make colours brighter, never darker. For smoke it should be able to darken as well as lighten.</p>
- </div>
- <div class="paragraph">
- <p>To add smoke we can add a third emitter after the other two:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">// Construct a new material for the smoke based off the default particle material
- Material smokeMat = new Material(
- assetManager, "Common/MatDefs/Misc/Particle.j3md");
- // The Smoke.png texture can be found in the jme3 test data
- smokeMat.setTexture("Texture",
- assetManager.loadTexture("Textures/Smoke.png"));
- // Set the blend mode to Alpha rather than AlphaAdditive so that dark smoke
- // can darken the scene behind it
- smokeMat.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
- // For point sprite meshes this parameter must be set
- smokeMat.setBoolean("PointSprite", true);
- // Construct the new particle controller
- pCtrl = new ParticleController(
- "TemplateSmoke",
- // The Smoke.png texture contains 15 sprites, if you use a different texture adjust
- // these parameters accordingly.
- new PointMesh(smokeMat, 15, 1),
- 800,
- 4,
- 5,
- new ParticleParticleSource(rockCtrl),
- new RegularEmission(180),
- new SizeInfluencer(1f, 2.5f),
- new MultiColorInfluencer(
- new MultiColorInfluencer.Stage(0, new ColorRGBA(1, 1, 1, 0)),
- new MultiColorInfluencer.Stage(0.5f, new ColorRGBA(0, 0, 0, 0.5f)),
- new MultiColorInfluencer.Stage(1, new ColorRGBA(1, 1, 1, 0))),
- new GravityInfluencer(new Vector3f(0, 0.75f, 0)),
- new RandomImpulseInfluencer(
- RandomImpulseInfluencer.ImpulseApplicationTime.INITIALIZE,
- new Vector3f(-0.5f, -0.5f, -0.5f),
- new Vector3f(0.5f, 0.5f, 0.5f)));
- rootNode.attachChild(pCtrl.getGeometry());</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>The results look something like:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=01qCBGBvf-c">Video: Particle Emitter Example 5</a></p>
- </li>
- </ul>
- </div>
- <div class="paragraph">
- <p>To complete the effect one final line of code adds a skybox (using another texture that can be find in the test data):</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/BrightSky.dds", false));</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>Now we have the final effect which looks like:</p>
- </div>
- <div class="ulist">
- <ul>
- <li>
- <p><a href="https://www.youtube.com/watch?v=uDeWAjw4LxU">Video: Particle Emitter Example 6</a></p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </article>
- <aside class="toc sidebar" data-title="Contents" data-levels="2">
- <div class="toc-menu"></div>
- </aside>
- </div>
- </main>
- </div>
- <footer class="footer">
- <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
- </footer>
- <script src="../../../../../_/js/vendor/docsearch.min.js"></script>
- <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
- <script>
- var search = docsearch({
- apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
- indexName: 'jmonkeyengine',
- inputSelector: '#search-input',
- autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
- algoliaOptions: { hitsPerPage: 10 }
- }).autocomplete
- search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
- function focusSearchInput () { document.querySelector('#search-input').focus() }
- if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
- </script>
- <script src="../../../../../_/js/site.js"></script>
- <script async src="../../../../../_/js/vendor/highlight.js"></script>
- </body>
- </html>
|