particles.html 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Next Generation Particle Emitters :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/3.8/contributions/effect/particles/particles.html">
  8. <meta name="generator" content="Antora 3.0.1">
  9. <link rel="stylesheet" href="../../../../../_/css/site.css">
  10. <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
  11. <meta property="og:description" content="Next Generation Particle Emitters">
  12. <meta property="og:title" content="jMonkeyEngine Docs">
  13. <link rel="stylesheet" href="../../../../../_/css/site-extra.css">
  14. <link rel="stylesheet" href="../../../../../_/css/vendor/docsearch.min.css">
  15. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -->
  16. <link rel="icon" href="../../../../../_/img/favicon.ico" type="image/x-icon">
  17. </head>
  18. <body class="article">
  19. <header class="header">
  20. <nav class="navbar">
  21. <div class="navbar-brand">
  22. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  23. <img alt="" src="../../../../../_/img/jme-logo.png" height="32" type="image/x-icon">
  24. </a>
  25. <div class="navbar-item hide-for-print">
  26. <input id="search-input" type="text" placeholder="Search docs">
  27. </div>
  28. <button class="navbar-burger" data-target="topbar-nav">
  29. <span></span>
  30. <span></span>
  31. <span></span>
  32. </button>
  33. </div>
  34. <div id="topbar-nav" class="navbar-menu">
  35. <div class="navbar-end">
  36. <div class="navbar-item theme-switch-wrapper">
  37. <label class="theme-switch" for="checkbox">
  38. <input type="checkbox" id="checkbox" />
  39. <div class="slider round"></div>
  40. </label>
  41. </div>
  42. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  43. </div>
  44. </div>
  45. </nav>
  46. </header>
  47. <div class="body">
  48. <div class="nav-container" data-component="docs" data-version="3.8">
  49. <aside class="nav">
  50. <div class="panels">
  51. <div class="nav-panel-menu is-active" data-panel="menu">
  52. <nav class="nav-menu">
  53. <h3 class="title"><a href="../../../documentation.html">JME</a></h3>
  54. <ul class="nav-list">
  55. <li class="nav-item" data-depth="0">
  56. <ul class="nav-list">
  57. <li class="nav-item" data-depth="1">
  58. <a class="nav-link" href="../../../documentation.html">Getting Started</a>
  59. </li>
  60. <li class="nav-item" data-depth="1">
  61. <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.4.1-stable">JavaDoc</a>
  62. </li>
  63. <li class="nav-item" data-depth="1">
  64. <a class="nav-link" href="../../../release.html">Release Guide</a>
  65. </li>
  66. </ul>
  67. </li>
  68. <li class="nav-item" data-depth="0">
  69. <ul class="nav-list">
  70. <li class="nav-item" data-depth="1">
  71. <button class="nav-item-toggle"></button>
  72. <a class="nav-link" href="../../../tutorials/beginner/beginner.html">Beginner Tutorials</a>
  73. <ul class="nav-list">
  74. <li class="nav-item" data-depth="2">
  75. <a class="nav-link" href="../../../tutorials/beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
  76. </li>
  77. <li class="nav-item" data-depth="2">
  78. <a class="nav-link" href="../../../tutorials/beginner/hello_node.html">Hello Node</a>
  79. </li>
  80. <li class="nav-item" data-depth="2">
  81. <a class="nav-link" href="../../../tutorials/beginner/hello_asset.html">Hello Asset</a>
  82. </li>
  83. <li class="nav-item" data-depth="2">
  84. <a class="nav-link" href="../../../tutorials/beginner/hello_main_event_loop.html">Hello Update Loop</a>
  85. </li>
  86. <li class="nav-item" data-depth="2">
  87. <a class="nav-link" href="../../../tutorials/beginner/hello_input_system.html">Hello Input System</a>
  88. </li>
  89. <li class="nav-item" data-depth="2">
  90. <a class="nav-link" href="../../../tutorials/beginner/hello_material.html">Hello Material</a>
  91. </li>
  92. <li class="nav-item" data-depth="2">
  93. <a class="nav-link" href="../../../tutorials/beginner/hello_animation.html">Hello Animation</a>
  94. </li>
  95. <li class="nav-item" data-depth="2">
  96. <a class="nav-link" href="../../../tutorials/beginner/hello_picking.html">Hello Picking</a>
  97. </li>
  98. <li class="nav-item" data-depth="2">
  99. <a class="nav-link" href="../../../tutorials/beginner/hello_collision.html">Hello Collision</a>
  100. </li>
  101. <li class="nav-item" data-depth="2">
  102. <a class="nav-link" href="../../../tutorials/beginner/hello_terrain.html">Hello Terrain</a>
  103. </li>
  104. <li class="nav-item" data-depth="2">
  105. <a class="nav-link" href="../../../tutorials/beginner/hello_audio.html">Hello Audio</a>
  106. </li>
  107. <li class="nav-item" data-depth="2">
  108. <a class="nav-link" href="../../../tutorials/beginner/hello_effects.html">Hello Effects</a>
  109. </li>
  110. <li class="nav-item" data-depth="2">
  111. <a class="nav-link" href="../../../tutorials/beginner/hello_physics.html">Hello Physics</a>
  112. </li>
  113. </ul>
  114. </li>
  115. <li class="nav-item" data-depth="1">
  116. <button class="nav-item-toggle"></button>
  117. <span class="nav-text">Key Concepts</span>
  118. <ul class="nav-list">
  119. <li class="nav-item" data-depth="2">
  120. <a class="nav-link" href="../../../tutorials/concepts/best_practices.html">Best Practices</a>
  121. </li>
  122. <li class="nav-item" data-depth="2">
  123. <a class="nav-link" href="../../../tutorials/concepts/optimization.html">Optimization</a>
  124. </li>
  125. <li class="nav-item" data-depth="2">
  126. <a class="nav-link" href="../../../tutorials/concepts/faq.html">Frequently Asked Questions</a>
  127. </li>
  128. <li class="nav-item" data-depth="2">
  129. <a class="nav-link" href="../../../tutorials/concepts/math_for_dummies.html">Math for Dummies</a>
  130. </li>
  131. <li class="nav-item" data-depth="2">
  132. <a class="nav-link" href="../../../tutorials/concepts/math.html">Math overview</a>
  133. </li>
  134. <li class="nav-item" data-depth="2">
  135. <a class="nav-link" href="../../../tutorials/concepts/math_cheet_sheet.html">3D math "cheat sheet"</a>
  136. </li>
  137. <li class="nav-item" data-depth="2">
  138. <a class="nav-link" href="../../../tutorials/concepts/rotate.html">3-D Rotation</a>
  139. </li>
  140. <li class="nav-item" data-depth="2">
  141. <a class="nav-link" href="../../../tutorials/concepts/math_video_tutorials.html">Math video tutorial series</a>
  142. </li>
  143. <li class="nav-item" data-depth="2">
  144. <a class="nav-link" href="../../../tutorials/concepts/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
  145. </li>
  146. <li class="nav-item" data-depth="2">
  147. <a class="nav-link" href="../../../tutorials/concepts/the_scene_graph.html">The Scene Graph</a>
  148. </li>
  149. <li class="nav-item" data-depth="2">
  150. <a class="nav-link" href="../../../tutorials/concepts/scenegraph_for_dummies.html">Scene Graph for Dummies</a>
  151. </li>
  152. <li class="nav-item" data-depth="2">
  153. <a class="nav-link" href="../../../tutorials/concepts/terminology.html">3D Graphics Terminology</a>
  154. </li>
  155. <li class="nav-item" data-depth="2">
  156. <a class="nav-link" href="../../../tutorials/concepts/transparency_sorting.html">Transparency Sorting</a>
  157. </li>
  158. </ul>
  159. </li>
  160. <li class="nav-item" data-depth="1">
  161. <button class="nav-item-toggle"></button>
  162. <span class="nav-text">Articles and How-to&#8217;s</span>
  163. <ul class="nav-list">
  164. <li class="nav-item" data-depth="2">
  165. <button class="nav-item-toggle"></button>
  166. <span class="nav-text">How to Model</span>
  167. <ul class="nav-list">
  168. <li class="nav-item" data-depth="3">
  169. <a class="nav-link" href="../../../tutorials/how-to/modeling/3dsmax/3dsmax.html">3dsmax</a>
  170. </li>
  171. <li class="nav-item" data-depth="3">
  172. <button class="nav-item-toggle"></button>
  173. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender.html">Blender</a>
  174. <ul class="nav-list">
  175. <li class="nav-item" data-depth="4">
  176. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_buffer_clearing.html">Buffer Clearing</a>
  177. </li>
  178. <li class="nav-item" data-depth="4">
  179. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_gltf.html">Export as GlTF</a>
  180. </li>
  181. <li class="nav-item" data-depth="4">
  182. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_ogre_export.html">Export as Ogre XML</a>
  183. </li>
  184. <li class="nav-item" data-depth="4">
  185. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/blender_ogre_compatibility.html">Ogre Compatibility</a>
  186. </li>
  187. <li class="nav-item" data-depth="4">
  188. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/makehuman.html">MakeHuman</a>
  189. </li>
  190. <li class="nav-item" data-depth="4">
  191. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/makehuman_blender_ogrexml_toolchain.html">MakeHuman toolchain</a>
  192. </li>
  193. </ul>
  194. </li>
  195. </ul>
  196. </li>
  197. <li class="nav-item" data-depth="2">
  198. <button class="nav-item-toggle"></button>
  199. <span class="nav-text">How to Animate</span>
  200. <ul class="nav-list">
  201. <li class="nav-item" data-depth="3">
  202. <button class="nav-item-toggle"></button>
  203. <span class="nav-text">Mixamo</span>
  204. <ul class="nav-list">
  205. <li class="nav-item" data-depth="4">
  206. <a class="nav-link" href="../../../tutorials/how-to/modeling/blender/mixamo.html">Blender Models</a>
  207. </li>
  208. </ul>
  209. </li>
  210. </ul>
  211. </li>
  212. <li class="nav-item" data-depth="2">
  213. <a class="nav-link" href="../../../tutorials/how-to/debugging.html">Debugging with Wireframes</a>
  214. </li>
  215. <li class="nav-item" data-depth="2">
  216. <a class="nav-link" href="../../../tutorials/how-to/util/free_skymaps.html">How to create free skymaps</a>
  217. </li>
  218. <li class="nav-item" data-depth="2">
  219. <button class="nav-item-toggle"></button>
  220. <span class="nav-text">Java Tips</span>
  221. <ul class="nav-list">
  222. <li class="nav-item" data-depth="3">
  223. <a class="nav-link" href="../../../tutorials/how-to/java/localization.html">Localization</a>
  224. </li>
  225. <li class="nav-item" data-depth="3">
  226. <a class="nav-link" href="../../../tutorials/how-to/java/swing_canvas.html">Swing Canvas</a>
  227. </li>
  228. <li class="nav-item" data-depth="3">
  229. <a class="nav-link" href="../../../tutorials/how-to/java/logging.html">Logging</a>
  230. </li>
  231. <li class="nav-item" data-depth="3">
  232. <a class="nav-link" href="../../../tutorials/how-to/java/read_graphic_card_capabilites.html">Read Graphics Capabilities</a>
  233. </li>
  234. </ul>
  235. </li>
  236. <li class="nav-item" data-depth="2">
  237. <button class="nav-item-toggle"></button>
  238. <span class="nav-text">Articles</span>
  239. <ul class="nav-list">
  240. <li class="nav-item" data-depth="3">
  241. <button class="nav-item-toggle"></button>
  242. <span class="nav-text">Physically Based Rendering</span>
  243. <ul class="nav-list">
  244. <li class="nav-item" data-depth="4">
  245. <a class="nav-link" href="../../../tutorials/how-to/articles/pbr/pbr_part1.html">PBR – Part one</a>
  246. </li>
  247. <li class="nav-item" data-depth="4">
  248. <a class="nav-link" href="../../../tutorials/how-to/articles/pbr/pbr_part2.html">PBR – Part two</a>
  249. </li>
  250. <li class="nav-item" data-depth="4">
  251. <a class="nav-link" href="../../../tutorials/how-to/articles/pbr/pbr_part3.html">PBR – Part three</a>
  252. </li>
  253. </ul>
  254. </li>
  255. </ul>
  256. </li>
  257. </ul>
  258. </li>
  259. </ul>
  260. </li>
  261. <li class="nav-item" data-depth="0">
  262. <ul class="nav-list">
  263. <li class="nav-item" data-depth="1">
  264. <button class="nav-item-toggle"></button>
  265. <span class="nav-text">Core Engine</span>
  266. <ul class="nav-list">
  267. <li class="nav-item" data-depth="2">
  268. <a class="nav-link" href="../../../core/app/simpleapplication.html">SimpleApplication</a>
  269. </li>
  270. <li class="nav-item" data-depth="2">
  271. <a class="nav-link" href="../../../core/system/appsettings.html">AppSettings</a>
  272. </li>
  273. </ul>
  274. </li>
  275. <li class="nav-item" data-depth="1">
  276. <button class="nav-item-toggle"></button>
  277. <span class="nav-text">Controlling Game Logic</span>
  278. <ul class="nav-list">
  279. <li class="nav-item" data-depth="2">
  280. <a class="nav-link" href="../../../core/app/update_loop.html">Update Loop</a>
  281. </li>
  282. <li class="nav-item" data-depth="2">
  283. <a class="nav-link" href="../../../core/app/state/application_states.html">Application States</a>
  284. </li>
  285. <li class="nav-item" data-depth="2">
  286. <button class="nav-item-toggle"></button>
  287. <a class="nav-link" href="../../../core/scene/control/custom_controls.html">Custom Controls</a>
  288. <ul class="nav-list">
  289. <li class="nav-item" data-depth="3">
  290. <button class="nav-item-toggle"></button>
  291. <span class="nav-text">Video</span>
  292. <ul class="nav-list">
  293. <li class="nav-item" data-depth="4">
  294. <a class="nav-link" href="https://www.youtube.com/watch?v=MNDiZ9YHIpM">Control any scene node</a>
  295. </li>
  296. <li class="nav-item" data-depth="4">
  297. <a class="nav-link" href="https://www.youtube.com/watch?v=-OzRZscLlHY">Control a character</a>
  298. </li>
  299. <li class="nav-item" data-depth="4">
  300. <a class="nav-link" href="https://wiki.jmonkeyengine.org/Scenes/SDK-UsecaseDemo_1.zip">Video Source Code</a>
  301. </li>
  302. </ul>
  303. </li>
  304. </ul>
  305. </li>
  306. <li class="nav-item" data-depth="2">
  307. <a class="nav-link" href="../../../core/app/multithreading.html">Multithreading</a>
  308. </li>
  309. </ul>
  310. </li>
  311. <li class="nav-item" data-depth="1">
  312. <button class="nav-item-toggle"></button>
  313. <span class="nav-text">Scene Graph</span>
  314. <ul class="nav-list">
  315. <li class="nav-item" data-depth="2">
  316. <a class="nav-link" href="../../../core/scene/traverse_scenegraph.html">Traverse SceneGraph</a>
  317. </li>
  318. <li class="nav-item" data-depth="2">
  319. <a class="nav-link" href="../../../core/scene/spatial.html">Spatial: Node vs Geometry</a>
  320. </li>
  321. <li class="nav-item" data-depth="2">
  322. <button class="nav-item-toggle"></button>
  323. <a class="nav-link" href="../../../core/scene/mesh.html">Mesh</a>
  324. <ul class="nav-list">
  325. <li class="nav-item" data-depth="3">
  326. <a class="nav-link" href="../../../core/scene/custom_meshes.html">Custom Meshes</a>
  327. </li>
  328. <li class="nav-item" data-depth="3">
  329. <a class="nav-link" href="../../../core/scene/shape/shape.html">Shape</a>
  330. </li>
  331. <li class="nav-item" data-depth="3">
  332. <a class="nav-link" href="../../../core/scene/3d_models.html">3D Models</a>
  333. </li>
  334. </ul>
  335. </li>
  336. <li class="nav-item" data-depth="2">
  337. <a class="nav-link" href="../../../core/asset/asset_manager.html">Asset Manager</a>
  338. </li>
  339. <li class="nav-item" data-depth="2">
  340. <a class="nav-link" href="../../../core/export/save_and_load.html">Saving and Loading Nodes</a>
  341. </li>
  342. <li class="nav-item" data-depth="2">
  343. <a class="nav-link" href="../../../core/collision/collision_and_intersection.html">Collision and Intersection</a>
  344. </li>
  345. <li class="nav-item" data-depth="2">
  346. <a class="nav-link" href="../../../core/scene/control/level_of_detail.html">Level of Detail</a>
  347. </li>
  348. </ul>
  349. </li>
  350. <li class="nav-item" data-depth="1">
  351. <button class="nav-item-toggle"></button>
  352. <span class="nav-text">Animation, Scene</span>
  353. <ul class="nav-list">
  354. <li class="nav-item" data-depth="2">
  355. <a class="nav-link" href="../../../core/animation/animation_new.html">Animation with AnimComposer</a>
  356. </li>
  357. <li class="nav-item" data-depth="2">
  358. <a class="nav-link" href="../../../core/animation/animation.html">Animation-Old (AnimControl)</a>
  359. </li>
  360. <li class="nav-item" data-depth="2">
  361. <a class="nav-link" href="../../../core/cinematic/cinematics.html">Cinematics (cutscenes, fake destruction physics)</a>
  362. </li>
  363. <li class="nav-item" data-depth="2">
  364. <a class="nav-link" href="../../../core/cinematic/motionpath.html">MotionPaths and Waypoints</a>
  365. </li>
  366. </ul>
  367. </li>
  368. <li class="nav-item" data-depth="1">
  369. <button class="nav-item-toggle"></button>
  370. <span class="nav-text">Material, Light, Shadow</span>
  371. <ul class="nav-list">
  372. <li class="nav-item" data-depth="2">
  373. <a class="nav-link" href="../../../core/material/how_to_use_materials.html">How to use Materials</a>
  374. </li>
  375. <li class="nav-item" data-depth="2">
  376. <a class="nav-link" href="../../../core/material/j3m_material_files.html">.j3m Material Files</a>
  377. </li>
  378. <li class="nav-item" data-depth="2">
  379. <a class="nav-link" href="../../../core/material/material_definitions.html">.j3md Material Definitions</a>
  380. </li>
  381. <li class="nav-item" data-depth="2">
  382. <a class="nav-link" href="../../../core/material/materials_overview.html">.j3md Properties</a>
  383. </li>
  384. <li class="nav-item" data-depth="2">
  385. <a class="nav-link" href="../../../core/shader/jme3_shaders.html">Shaders and JME3</a>
  386. </li>
  387. <li class="nav-item" data-depth="2">
  388. <a class="nav-link" href="../../../core/shader/jme3_shadernodes.html">Shader Node System</a>
  389. </li>
  390. <li class="nav-item" data-depth="2">
  391. <a class="nav-link" href="../../../core/shader/shader_video_tutorials.html">Shader Video Tutorials</a>
  392. </li>
  393. <li class="nav-item" data-depth="2">
  394. <a class="nav-link" href="../../../core/light/light_and_shadow.html">Light and Shadow</a>
  395. </li>
  396. <li class="nav-item" data-depth="2">
  397. <a class="nav-link" href="../../../core/texture/anisotropic_filtering.html">Anisotropic Filtering</a>
  398. </li>
  399. <li class="nav-item" data-depth="2">
  400. <a class="nav-link" href="../../../core/system/jme3_srgbpipeline.html">Gamma Correction</a>
  401. </li>
  402. <li class="nav-item" data-depth="2">
  403. <a class="nav-link" href="../../../core/material/normal_types.html">Normal Map Conventions</a>
  404. </li>
  405. </ul>
  406. </li>
  407. <li class="nav-item" data-depth="1">
  408. <button class="nav-item-toggle"></button>
  409. <span class="nav-text">Audio, Video</span>
  410. <ul class="nav-list">
  411. <li class="nav-item" data-depth="2">
  412. <a class="nav-link" href="../../../core/audio/audio.html">Playing Sounds</a>
  413. </li>
  414. <li class="nav-item" data-depth="2">
  415. <a class="nav-link" href="../../../core/audio/audio_environment_presets.html">Audio Environment Presets</a>
  416. </li>
  417. <li class="nav-item" data-depth="2">
  418. <a class="nav-link" href="../../../core/app/state/screenshots.html">Capture Screenshots</a>
  419. </li>
  420. <li class="nav-item" data-depth="2">
  421. <a class="nav-link" href="../../../core/app/state/capture_audio_video_to_a_file.html">Capture Audio/Video</a>
  422. </li>
  423. </ul>
  424. </li>
  425. <li class="nav-item" data-depth="1">
  426. <button class="nav-item-toggle"></button>
  427. <span class="nav-text">Filter, Effect</span>
  428. <ul class="nav-list">
  429. <li class="nav-item" data-depth="2">
  430. <a class="nav-link" href="../../../core/effect/effects_overview.html">Overview</a>
  431. </li>
  432. <li class="nav-item" data-depth="2">
  433. <a class="nav-link" href="../../../core/effect/bloom_and_glow.html">Bloom and Glow</a>
  434. </li>
  435. <li class="nav-item" data-depth="2">
  436. <a class="nav-link" href="../../../core/effect/particle_emitters.html">Particle Emitters</a>
  437. </li>
  438. </ul>
  439. </li>
  440. <li class="nav-item" data-depth="1">
  441. <button class="nav-item-toggle"></button>
  442. <span class="nav-text">Landscapes</span>
  443. <ul class="nav-list">
  444. <li class="nav-item" data-depth="2">
  445. <a class="nav-link" href="../../../core/util/sky.html">Sky</a>
  446. </li>
  447. <li class="nav-item" data-depth="2">
  448. <a class="nav-link" href="../../../core/terrain/terrain.html">Terrain (TerraMonkey)</a>
  449. </li>
  450. <li class="nav-item" data-depth="2">
  451. <a class="nav-link" href="../../../core/collision/terrain_collision.html">Terrain Collision</a>
  452. </li>
  453. <li class="nav-item" data-depth="2">
  454. <a class="nav-link" href="../../../core/effect/water.html">Simple Water</a>
  455. </li>
  456. <li class="nav-item" data-depth="2">
  457. <a class="nav-link" href="../../../core/effect/post-processor_water.html">Post-Processor Water</a>
  458. </li>
  459. </ul>
  460. </li>
  461. <li class="nav-item" data-depth="1">
  462. <button class="nav-item-toggle"></button>
  463. <span class="nav-text">Camera</span>
  464. <ul class="nav-list">
  465. <li class="nav-item" data-depth="2">
  466. <a class="nav-link" href="../../../core/renderer/camera.html">Camera</a>
  467. </li>
  468. <li class="nav-item" data-depth="2">
  469. <a class="nav-link" href="../../../core/renderer/making_the_camera_follow_a_character.html">Follow a Character</a>
  470. </li>
  471. <li class="nav-item" data-depth="2">
  472. <a class="nav-link" href="../../../core/renderer/remote-controlling_the_camera.html">Remote-Controlling</a>
  473. </li>
  474. <li class="nav-item" data-depth="2">
  475. <a class="nav-link" href="../../../core/renderer/multiple_camera_views.html">Multiple Camera Views</a>
  476. </li>
  477. <li class="nav-item" data-depth="2">
  478. <a class="nav-link" href="../../../core/renderer/jme3_renderbuckets.html">Render Buckets</a>
  479. </li>
  480. </ul>
  481. </li>
  482. <li class="nav-item" data-depth="1">
  483. <button class="nav-item-toggle"></button>
  484. <span class="nav-text">Rendering</span>
  485. <ul class="nav-list">
  486. <li class="nav-item" data-depth="2">
  487. <a class="nav-link" href="../../../core/renderer/render_pipeline.html">Render Pipelines</a>
  488. </li>
  489. </ul>
  490. </li>
  491. <li class="nav-item" data-depth="1">
  492. <button class="nav-item-toggle"></button>
  493. <span class="nav-text">User Interaction</span>
  494. <ul class="nav-list">
  495. <li class="nav-item" data-depth="2">
  496. <a class="nav-link" href="../../../core/input/input_handling.html">Input Handling</a>
  497. </li>
  498. <li class="nav-item" data-depth="2">
  499. <a class="nav-link" href="../../../core/input/combo_moves.html">Combo Moves</a>
  500. </li>
  501. <li class="nav-item" data-depth="2">
  502. <a class="nav-link" href="../../../core/input/mouse_picking.html">Mouse Picking</a>
  503. </li>
  504. </ul>
  505. </li>
  506. <li class="nav-item" data-depth="1">
  507. <button class="nav-item-toggle"></button>
  508. <a class="nav-link" href="../../../core/gui/topic_gui.html">Graphical User Interface</a>
  509. <ul class="nav-list">
  510. <li class="nav-item" data-depth="2">
  511. <button class="nav-item-toggle"></button>
  512. <span class="nav-text">Nifty GUI</span>
  513. <ul class="nav-list">
  514. <li class="nav-item" data-depth="3">
  515. <a class="nav-link" href="../../../core/gui/nifty_gui.html">Integration Tutorial</a>
  516. </li>
  517. <li class="nav-item" data-depth="3">
  518. <a class="nav-link" href="../../../core/gui/nifty_gui_best_practices.html">Best Practices</a>
  519. </li>
  520. <li class="nav-item" data-depth="3">
  521. <a class="nav-link" href="../../../core/gui/nifty_gui_scenarios.html">Scenarios</a>
  522. </li>
  523. </ul>
  524. </li>
  525. <li class="nav-item" data-depth="2">
  526. <a class="nav-link" href="../../../core/ui/hud.html">Head-Up Display (HUD)</a>
  527. </li>
  528. </ul>
  529. </li>
  530. <li class="nav-item" data-depth="1">
  531. <button class="nav-item-toggle"></button>
  532. <span class="nav-text">Virtual Reality</span>
  533. <ul class="nav-list">
  534. <li class="nav-item" data-depth="2">
  535. <a class="nav-link" href="../../../core/vr/virtualreality.html">Virtual Reality</a>
  536. </li>
  537. <li class="nav-item" data-depth="2">
  538. <a class="nav-link" href="../../../core/vr/legacyOpenVr.html">Virtual Reality Legacy Support</a>
  539. </li>
  540. <li class="nav-item" data-depth="2">
  541. <a class="nav-link" href="../../../core/vr/virtualrealitycontrollers.html">Virtual Reality Legacy Controller Support</a>
  542. </li>
  543. </ul>
  544. </li>
  545. </ul>
  546. </li>
  547. <li class="nav-item" data-depth="0">
  548. <ul class="nav-list">
  549. <li class="nav-item" data-depth="1">
  550. <button class="nav-item-toggle"></button>
  551. <a class="nav-link" href="../../../physics/physics.html">Physics</a>
  552. <ul class="nav-list">
  553. <li class="nav-item" data-depth="2">
  554. <a class="nav-link" href="../../../physics/bullet_multithreading.html">Multi-Threaded Physics</a>
  555. </li>
  556. <li class="nav-item" data-depth="2">
  557. <a class="nav-link" href="../../../physics/collision/physics_listeners.html">Collision Detection</a>
  558. </li>
  559. <li class="nav-item" data-depth="2">
  560. <a class="nav-link" href="../../../physics/joint/hinges_and_joints.html">Hinges and Joints</a>
  561. </li>
  562. <li class="nav-item" data-depth="2">
  563. <a class="nav-link" href="../../../physics/control/walking_character.html">Walking Character</a>
  564. </li>
  565. <li class="nav-item" data-depth="2">
  566. <a class="nav-link" href="../../../physics/control/ragdoll.html">Ragdoll</a>
  567. </li>
  568. <li class="nav-item" data-depth="2">
  569. <a class="nav-link" href="../../../physics/control/vehicles.html">Vehicles</a>
  570. </li>
  571. <li class="nav-item" data-depth="2">
  572. <a class="nav-link" href="../../../physics/control/softbody.html">Softbody</a>
  573. </li>
  574. <li class="nav-item" data-depth="2">
  575. <a class="nav-link" href="../../../physics/bullet_pitfalls.html">Bullet Physics Pitfalls</a>
  576. </li>
  577. </ul>
  578. </li>
  579. </ul>
  580. </li>
  581. <li class="nav-item" data-depth="0">
  582. <ul class="nav-list">
  583. <li class="nav-item" data-depth="1">
  584. <button class="nav-item-toggle"></button>
  585. <span class="nav-text">Networking</span>
  586. <ul class="nav-list">
  587. <li class="nav-item" data-depth="2">
  588. <a class="nav-link" href="../../../networking/networking.html">Networking (SpiderMonkey)</a>
  589. </li>
  590. <li class="nav-item" data-depth="2">
  591. <a class="nav-link" href="../../../networking/headless_server.html">Headless Server</a>
  592. </li>
  593. <li class="nav-item" data-depth="2">
  594. <a class="nav-link" href="../../../networking/monkey_zone.html">Multi-Player Demo Code</a>
  595. </li>
  596. <li class="nav-item" data-depth="2">
  597. <a class="nav-link" href="../../../networking/networking_video_tutorials.html">Networking Video Tutorials</a>
  598. </li>
  599. </ul>
  600. </li>
  601. </ul>
  602. </li>
  603. <li class="nav-item" data-depth="0">
  604. <ul class="nav-list">
  605. <li class="nav-item" data-depth="1">
  606. <button class="nav-item-toggle"></button>
  607. <span class="nav-text">User Contributions</span>
  608. <ul class="nav-list">
  609. <li class="nav-item" data-depth="2">
  610. <a class="nav-link" href="../../contributions.html">User Made Utilities</a>
  611. </li>
  612. <li class="nav-item" data-depth="2">
  613. <button class="nav-item-toggle"></button>
  614. <span class="nav-text">Shader</span>
  615. <ul class="nav-list">
  616. <li class="nav-item" data-depth="3">
  617. <a class="nav-link" href="../../shader/shaderblow_project.html">ShaderBlow Project</a>
  618. </li>
  619. </ul>
  620. </li>
  621. <li class="nav-item" data-depth="2">
  622. <button class="nav-item-toggle"></button>
  623. <span class="nav-text">Landscapes</span>
  624. <ul class="nav-list">
  625. <li class="nav-item" data-depth="3">
  626. <a class="nav-link" href="../../lanscapes/vegetationsystem/vegetationsystem.html">Vegetation System</a>
  627. </li>
  628. </ul>
  629. </li>
  630. <li class="nav-item" data-depth="2">
  631. <button class="nav-item-toggle"></button>
  632. <span class="nav-text">Networking</span>
  633. <ul class="nav-list">
  634. <li class="nav-item" data-depth="3">
  635. <a class="nav-link" href="../../networking/open_game_finder.html">Open Game Finder</a>
  636. </li>
  637. </ul>
  638. </li>
  639. <li class="nav-item" data-depth="2">
  640. <button class="nav-item-toggle"></button>
  641. <span class="nav-text">Entity System</span>
  642. <ul class="nav-list">
  643. <li class="nav-item" data-depth="3">
  644. <a class="nav-link" href="#es/entitysystem.adoc">The Zay-ES Entity System</a>
  645. </li>
  646. </ul>
  647. </li>
  648. <li class="nav-item" data-depth="2">
  649. <button class="nav-item-toggle"></button>
  650. <span class="nav-text">Artificial Intelligence</span>
  651. <ul class="nav-list">
  652. <li class="nav-item" data-depth="3">
  653. <a class="nav-link" href="../../ai/recast.html">Recast Navigation</a>
  654. </li>
  655. <li class="nav-item" data-depth="3">
  656. <a class="nav-link" href="../../ai/building_recast.html">Updating and building Recast Native Bindings</a>
  657. </li>
  658. <li class="nav-item" data-depth="3">
  659. <a class="nav-link" href="../../ai/monkey_brains.html">Monkey Brains</a>
  660. </li>
  661. <li class="nav-item" data-depth="3">
  662. <a class="nav-link" href="../../ai/steer_behaviours.html">Steer Behaviours</a>
  663. </li>
  664. <li class="nav-item" data-depth="3">
  665. <a class="nav-link" href="../../ai/jme3_ai.html">jME3 Artificial Intelligence</a>
  666. </li>
  667. </ul>
  668. </li>
  669. <li class="nav-item" data-depth="2">
  670. <button class="nav-item-toggle"></button>
  671. <a class="nav-link" href="../../gui/topic_contributions_gui.html">GUI</a>
  672. <ul class="nav-list">
  673. <li class="nav-item" data-depth="3">
  674. <a class="nav-link" href="../../contributions.html#lemur-gui-library">Lemur - a native jME3 GUI library with scene graph tools</a>
  675. </li>
  676. <li class="nav-item" data-depth="3">
  677. <a class="nav-link" href="../../contributions.html#tonegodgui">tonegodGUI - a native jME3 GUI library</a>
  678. </li>
  679. <li class="nav-item" data-depth="3">
  680. <a class="nav-link" href="../../contributions.html#immediate-graphical-user-interface">Immediate graphical user interface</a>
  681. </li>
  682. </ul>
  683. </li>
  684. <li class="nav-item" data-depth="2">
  685. <button class="nav-item-toggle"></button>
  686. <span class="nav-text">Tools</span>
  687. <ul class="nav-list">
  688. <li class="nav-item" data-depth="3">
  689. <a class="nav-link" href="../../tools/navigation.html">Mercator Projection Tool (Marine Navigation)</a>
  690. </li>
  691. <li class="nav-item" data-depth="3">
  692. <a class="nav-link" href="../../tools/charts.html">Visualizing Maps in JME3 (Marine Charts)</a>
  693. </li>
  694. </ul>
  695. </li>
  696. <li class="nav-item" data-depth="2">
  697. <button class="nav-item-toggle"></button>
  698. <a class="nav-link" href="../../vr/topic_contributions_vr.html">Virtual Reality (And augmented reality)</a>
  699. <ul class="nav-list">
  700. <li class="nav-item" data-depth="3">
  701. <a class="nav-link" href="../../contributions.html#tamarin-openxr">Tamarin OpenXR</a>
  702. </li>
  703. </ul>
  704. </li>
  705. <li class="nav-item" data-depth="2">
  706. <button class="nav-item-toggle"></button>
  707. <span class="nav-text">Projects</span>
  708. <ul class="nav-list">
  709. <li class="nav-item" data-depth="3">
  710. <a class="nav-link" href="../../projects/rise_of_mutants_project.html">Rise of Mutants Project</a>
  711. </li>
  712. </ul>
  713. </li>
  714. </ul>
  715. </li>
  716. </ul>
  717. </li>
  718. <li class="nav-item" data-depth="0">
  719. <ul class="nav-list">
  720. <li class="nav-item" data-depth="1">
  721. <button class="nav-item-toggle"></button>
  722. <a class="nav-link" href="../../../sdk/sdk.html">SDK</a>
  723. <ul class="nav-list">
  724. <li class="nav-item" data-depth="2">
  725. <button class="nav-item-toggle"></button>
  726. <span class="nav-text">Video Tutorials</span>
  727. <ul class="nav-list">
  728. <li class="nav-item" data-depth="3">
  729. <button class="nav-item-toggle"></button>
  730. <span class="nav-text">SDK Use Case Tutorials</span>
  731. <ul class="nav-list">
  732. <li class="nav-item" data-depth="4">
  733. <a class="nav-link" href="http://www.youtube.com/watch?v=-OzRZscLlHY">Demo 1 (Quixote demo)</a>
  734. </li>
  735. <li class="nav-item" data-depth="4">
  736. <a class="nav-link" href="http://www.youtube.com/watch?v=6-YWxD3JByE">Demo 2 (Models and Materials)</a>
  737. </li>
  738. </ul>
  739. </li>
  740. <li class="nav-item" data-depth="3">
  741. <button class="nav-item-toggle"></button>
  742. <span class="nav-text">SDK Tutorials</span>
  743. <ul class="nav-list">
  744. <li class="nav-item" data-depth="4">
  745. <a class="nav-link" href="http://www.youtube.com/watch?v=M1_0pbeyJzI">Basics</a>
  746. </li>
  747. <li class="nav-item" data-depth="4">
  748. <a class="nav-link" href="http://www.youtube.com/watch?v=nL7woH40i5c">Importing Models</a>
  749. </li>
  750. <li class="nav-item" data-depth="4">
  751. <a class="nav-link" href="http://www.youtube.com/watch?v=DUmgAjiNzhY">Dragging&amp;Dropping Nodes</a>
  752. </li>
  753. <li class="nav-item" data-depth="4">
  754. <a class="nav-link" href="http://www.youtube.com/watch?v=ntPAmtsQ6eM">Scene Composing</a>
  755. </li>
  756. <li class="nav-item" data-depth="4">
  757. <a class="nav-link" href="http://www.youtube.com/watch?v=zgPV3W6dD4s">Terrain with Collision Shape</a>
  758. </li>
  759. <li class="nav-item" data-depth="4">
  760. <a class="nav-link" href="http://www.youtube.com/watch?v=Feu3-mrpolc">Working with Materials</a>
  761. </li>
  762. <li class="nav-item" data-depth="4">
  763. <a class="nav-link" href="http://www.youtube.com/watch?v=MNDiZ9YHIpM">Custom Controls</a>
  764. </li>
  765. <li class="nav-item" data-depth="4">
  766. <a class="nav-link" href="http://www.youtube.com/watch?v=oZnssg8TBWQ">WebStart Deployment</a>
  767. </li>
  768. <li class="nav-item" data-depth="4">
  769. <a class="nav-link" href="http://www.youtube.com/watch?v=D7JM4VMKqPc">Animation and Effect TrackEditing</a>
  770. </li>
  771. </ul>
  772. </li>
  773. </ul>
  774. </li>
  775. <li class="nav-item" data-depth="2">
  776. <button class="nav-item-toggle"></button>
  777. <span class="nav-text">Getting Started</span>
  778. <ul class="nav-list">
  779. <li class="nav-item" data-depth="3">
  780. <a class="nav-link" href="../../../sdk/update_center.html">Updating jMonkeyEngine SDK</a>
  781. </li>
  782. <li class="nav-item" data-depth="3">
  783. <a class="nav-link" href="../../../sdk/troubleshooting.html">Troubleshooting</a>
  784. </li>
  785. </ul>
  786. </li>
  787. <li class="nav-item" data-depth="2">
  788. <button class="nav-item-toggle"></button>
  789. <span class="nav-text">Java Development Features</span>
  790. <ul class="nav-list">
  791. <li class="nav-item" data-depth="3">
  792. <a class="nav-link" href="../../../sdk/project_creation.html">Project Creation</a>
  793. </li>
  794. <li class="nav-item" data-depth="3">
  795. <a class="nav-link" href="../../../sdk/code_editor.html">Code Editor and Palette</a>
  796. </li>
  797. <li class="nav-item" data-depth="3">
  798. <a class="nav-link" href="../../../sdk/version_control.html">File Version Control</a>
  799. </li>
  800. <li class="nav-item" data-depth="3">
  801. <a class="nav-link" href="../../../sdk/debugging_profiling_testing.html">Debug, Profile, Test</a>
  802. </li>
  803. <li class="nav-item" data-depth="3">
  804. <button class="nav-item-toggle"></button>
  805. <a class="nav-link" href="../../../sdk/application_deployment.html">Application Deployment</a>
  806. <ul class="nav-list">
  807. <li class="nav-item" data-depth="4">
  808. <a class="nav-link" href="../../../sdk/default_build_script.html">Default Build Script</a>
  809. </li>
  810. <li class="nav-item" data-depth="4">
  811. <a class="nav-link" href="../../../sdk/android.html">Android</a>
  812. </li>
  813. <li class="nav-item" data-depth="4">
  814. <a class="nav-link" href="../../../sdk/android_cheat_sheet.html">Android Cheat Sheet</a>
  815. </li>
  816. <li class="nav-item" data-depth="4">
  817. <a class="nav-link" href="../../../sdk/ios.html">iOS</a>
  818. </li>
  819. </ul>
  820. </li>
  821. </ul>
  822. </li>
  823. <li class="nav-item" data-depth="2">
  824. <button class="nav-item-toggle"></button>
  825. <span class="nav-text">Unique Features</span>
  826. <ul class="nav-list">
  827. <li class="nav-item" data-depth="3">
  828. <button class="nav-item-toggle"></button>
  829. <a class="nav-link" href="../../../sdk/model_loader_and_viewer.html">Import, View, Convert Models</a>
  830. <ul class="nav-list">
  831. <li class="nav-item" data-depth="4">
  832. <a class="nav-link" href="../../../sdk/asset_packs.html">Asset Packs</a>
  833. </li>
  834. </ul>
  835. </li>
  836. <li class="nav-item" data-depth="3">
  837. <a class="nav-link" href="../../../sdk/scene_explorer.html">The SceneExplorer</a>
  838. </li>
  839. <li class="nav-item" data-depth="3">
  840. <a class="nav-link" href="../../../sdk/scene_composer.html">Composing a Scene</a>
  841. </li>
  842. <li class="nav-item" data-depth="3">
  843. <a class="nav-link" href="../../../sdk/terrain_editor.html">Terrain Editor</a>
  844. </li>
  845. <li class="nav-item" data-depth="3">
  846. <a class="nav-link" href="../../../sdk/sample_code.html">Sample Code</a>
  847. </li>
  848. <li class="nav-item" data-depth="3">
  849. <a class="nav-link" href="../../../sdk/material_editing.html">Material Editing</a>
  850. </li>
  851. <li class="nav-item" data-depth="3">
  852. <a class="nav-link" href="../../../sdk/font_creation.html">Creating Bitmap Fonts</a>
  853. </li>
  854. <li class="nav-item" data-depth="3">
  855. <button class="nav-item-toggle"></button>
  856. <a class="nav-link" href="https://hub.jmonkeyengine.org/t/effecttrack-and-audiotrack-editing-in-the-sdk/23378">Audio and Effect Track Editing</a>
  857. <ul class="nav-list">
  858. <li class="nav-item" data-depth="4">
  859. <a class="nav-link" href="https://www.youtube.com/watch?v=D7JM4VMKqPc">Video: Effect and AudioTrack editing in jMonkeyEngine 3 sdk</a>
  860. </li>
  861. </ul>
  862. </li>
  863. <li class="nav-item" data-depth="3">
  864. <a class="nav-link" href="../../../sdk/filters.html">Post-Processor Filter Editor and Viewer</a>
  865. </li>
  866. <li class="nav-item" data-depth="3">
  867. <a class="nav-link" href="../../../core/app/state/application_states.html">Application States</a>
  868. </li>
  869. <li class="nav-item" data-depth="3">
  870. <a class="nav-link" href="../../../core/scene/control/custom_controls.html">Custom Controls</a>
  871. </li>
  872. <li class="nav-item" data-depth="3">
  873. <a class="nav-link" href="../../../sdk/vehicle_creator.html">Vehicle Creator</a>
  874. </li>
  875. <li class="nav-item" data-depth="3">
  876. <a class="nav-link" href="../../../sdk/assetbrowser.html">Asset Browser</a>
  877. </li>
  878. <li class="nav-item" data-depth="3">
  879. <a class="nav-link" href="../../../sdk/animations.html">Animations</a>
  880. </li>
  881. </ul>
  882. </li>
  883. <li class="nav-item" data-depth="2">
  884. <button class="nav-item-toggle"></button>
  885. <span class="nav-text">Advanced Usage</span>
  886. <ul class="nav-list">
  887. <li class="nav-item" data-depth="3">
  888. <a class="nav-link" href="../../../sdk/build_platform.html">Building jMonkeyEngine SDK</a>
  889. </li>
  890. <li class="nav-item" data-depth="3">
  891. <a class="nav-link" href="../../../sdk/use_own_jme.html#.adoc">Using your own (modified) version of jME3 in jMonkeyEngine SDK</a>
  892. </li>
  893. <li class="nav-item" data-depth="3">
  894. <a class="nav-link" href="../../../sdk/increasing_heap_memory.html">Increasing Heap Memory</a>
  895. </li>
  896. <li class="nav-item" data-depth="3">
  897. <a class="nav-link" href="../../../sdk/log_files.html">Log Files</a>
  898. </li>
  899. </ul>
  900. </li>
  901. <li class="nav-item" data-depth="2">
  902. <button class="nav-item-toggle"></button>
  903. <span class="nav-text">Available external plugins</span>
  904. <ul class="nav-list">
  905. <li class="nav-item" data-depth="3">
  906. <a class="nav-link" href="../../contributions.html">Contributions</a>
  907. </li>
  908. <li class="nav-item" data-depth="3">
  909. <a class="nav-link" href="../../../sdk/neotexture.html">Neo Texture Editor for procedural textures</a>
  910. </li>
  911. <li class="nav-item" data-depth="3">
  912. <a class="nav-link" href="http://www.youtube.com/watch?v=yS9a9o4WzL8">Video: Mesh Tool &amp; Physics Editor</a>
  913. </li>
  914. </ul>
  915. </li>
  916. <li class="nav-item" data-depth="2">
  917. <button class="nav-item-toggle"></button>
  918. <a class="nav-link" href="../../../sdk/development.html">Developing plugins for jMonkeyEngine SDK</a>
  919. <ul class="nav-list">
  920. <li class="nav-item" data-depth="3">
  921. <a class="nav-link" href="../../../sdk/development/setup.html">Creating a plugin</a>
  922. </li>
  923. <li class="nav-item" data-depth="3">
  924. <a class="nav-link" href="../../../sdk/development/general.html">Creating components</a>
  925. </li>
  926. <li class="nav-item" data-depth="3">
  927. <a class="nav-link" href="../../../sdk/development/scene.html">The Main Scene</a>
  928. </li>
  929. <li class="nav-item" data-depth="3">
  930. <a class="nav-link" href="../../../sdk/development/sceneexplorer.html">The Scene Explorer</a>
  931. </li>
  932. <li class="nav-item" data-depth="3">
  933. <a class="nav-link" href="../../../sdk/development/projects_assets.html">Projects and Assets</a>
  934. </li>
  935. <li class="nav-item" data-depth="3">
  936. <a class="nav-link" href="../../../sdk/development/extension_library.html">Create a library plugin from a jar file</a>
  937. </li>
  938. <li class="nav-item" data-depth="3">
  939. <a class="nav-link" href="../../../sdk/development/model_loader.html">Create a new or custom model filetype and loader</a>
  940. </li>
  941. </ul>
  942. </li>
  943. </ul>
  944. </li>
  945. </ul>
  946. </li>
  947. </ul>
  948. </nav>
  949. </div>
  950. <div class="nav-panel-explore" data-panel="explore">
  951. <div class="context">
  952. <span class="title">JME</span>
  953. <span class="version">3.8</span>
  954. </div>
  955. <ul class="components">
  956. <li class="component is-current">
  957. <span class="title">JME</span>
  958. <ul class="versions">
  959. <li class="version is-current">
  960. <a href="../../../documentation.html">3.8</a>
  961. </li>
  962. <li class="version">
  963. <a href="../../../../3.4/documentation.html">3.4</a>
  964. </li>
  965. <li class="version">
  966. <a href="../../../../3.3/documentation.html">3.3</a>
  967. </li>
  968. <li class="version">
  969. <a href="../../../../3.2/documentation.html">3.2</a>
  970. </li>
  971. </ul>
  972. </li>
  973. <li class="component">
  974. <span class="title">Wiki Contribution</span>
  975. <ul class="versions">
  976. <li class="version">
  977. <a href="../../../../../docs-wiki/3.8/wiki_contributor.html">3.8</a>
  978. </li>
  979. </ul>
  980. </li>
  981. <li class="component">
  982. <span class="title">Wiki UI</span>
  983. <ul class="versions">
  984. <li class="version">
  985. <a href="../../../../../wiki-ui/index.html">master</a>
  986. </li>
  987. </ul>
  988. </li>
  989. </ul>
  990. </div>
  991. </div>
  992. </aside>
  993. </div>
  994. <main class="article">
  995. <div class="toolbar" role="navigation">
  996. <button class="nav-toggle"></button>
  997. <nav class="breadcrumbs" aria-label="breadcrumbs">
  998. <ul>
  999. <li><a href="../../../documentation.html">JME</a></li>
  1000. <li><a href="particles.html">Next Generation Particle Emitters</a></li>
  1001. </ul>
  1002. </nav>
  1003. <div class="page-versions">
  1004. <button class="version-menu-toggle" title="Show other versions of page">3.8</button>
  1005. <div class="version-menu">
  1006. <a class="version is-current" href="particles.html">3.8</a>
  1007. <a class="version" href="../../../../3.4/contributions/effect/particles/particles.html">3.4</a>
  1008. <a class="version" href="../../../../3.3/contributions/effect/particles/particles.html">3.3</a>
  1009. <a class="version" href="../../../../3.2/contributions/effect/particles/particles.html">3.2</a>
  1010. </div>
  1011. </div>
  1012. <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>
  1013. </div>
  1014. <div class="content">
  1015. <article class="doc">
  1016. <h1 class="page">Next Generation Particle Emitters</h1>
  1017. <div id="preamble">
  1018. <div class="sectionbody">
  1019. <div class="paragraph">
  1020. <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.
  1021. The code for this particle system can be found <a href="https://github.com/jMonkeyEngine-Contributions/ParticleController">jMonkeyEngine-Contributions</a></p>
  1022. </div>
  1023. <div class="paragraph">
  1024. <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>
  1025. </div>
  1026. </div>
  1027. </div>
  1028. <div class="sect1">
  1029. <h2 id="credits"><a class="anchor" href="#credits"></a>Credits</h2>
  1030. <div class="sectionbody">
  1031. <div class="paragraph">
  1032. <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>
  1033. </div>
  1034. <div class="paragraph">
  1035. <p>Those in turn were based on the original jME3 particle system by Kirill Vainer</p>
  1036. </div>
  1037. </div>
  1038. </div>
  1039. <div class="sect1">
  1040. <h2 id="the-big-picture"><a class="anchor" href="#the-big-picture"></a>The Big Picture</h2>
  1041. <div class="sectionbody">
  1042. <div class="paragraph">
  1043. <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>
  1044. </div>
  1045. <div class="paragraph">
  1046. <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>
  1047. </div>
  1048. <table class="tableblock frame-all grid-all stretch">
  1049. <colgroup>
  1050. <col style="width: 50%;">
  1051. <col style="width: 50%;">
  1052. </colgroup>
  1053. <thead>
  1054. <tr>
  1055. <th class="tableblock halign-left valign-top">name</th>
  1056. <th class="tableblock halign-left valign-top">The name to use for the geometry in the scene graph</th>
  1057. </tr>
  1058. </thead>
  1059. <tbody>
  1060. <tr>
  1061. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1062. <p>mesh</p>
  1063. </div></div></td>
  1064. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1065. <p>The mesh to use (Usually either PointMesh or QuadMesh)</p>
  1066. </div></div></td>
  1067. </tr>
  1068. <tr>
  1069. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1070. <p>maxParticles</p>
  1071. </div></div></td>
  1072. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1073. <p>The maximum number of particles to allow active at any one time</p>
  1074. </div></div></td>
  1075. </tr>
  1076. <tr>
  1077. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1078. <p>lifeMin</p>
  1079. </div></div></td>
  1080. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1081. <p>The minimum amount of time (in seconds) for which each particle lives</p>
  1082. </div></div></td>
  1083. </tr>
  1084. <tr>
  1085. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1086. <p>lifeMax</p>
  1087. </div></div></td>
  1088. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1089. <p>The maximum amount of time (in seconds) for which each particle lives</p>
  1090. </div></div></td>
  1091. </tr>
  1092. <tr>
  1093. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1094. <p>source</p>
  1095. </div></div></td>
  1096. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1097. <p>The source from which the particles are spawned</p>
  1098. </div></div></td>
  1099. </tr>
  1100. <tr>
  1101. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1102. <p>emissionController</p>
  1103. </div></div></td>
  1104. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1105. <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>
  1106. </div></div></td>
  1107. </tr>
  1108. <tr>
  1109. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1110. <p>influencers</p>
  1111. </div></div></td>
  1112. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1113. <p>Zero or more ParticleInfluencers, each of which changes the behaviour of the particles.</p>
  1114. </div></div></td>
  1115. </tr>
  1116. </tbody>
  1117. </table>
  1118. <div class="paragraph">
  1119. <p>By selecting the behaviour you desire for each option you can configure up a virtually infinite array of possible particle emitters.</p>
  1120. </div>
  1121. <div class="paragraph">
  1122. <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>
  1123. </div>
  1124. <div class="paragraph">
  1125. <p>For a full reference of the standard options available see the <a href="reference.html" class="xref page">Reference Page</a>.</p>
  1126. </div>
  1127. </div>
  1128. </div>
  1129. <div class="sect1">
  1130. <h2 id="simple-fire"><a class="anchor" href="#simple-fire"></a>Simple Fire</h2>
  1131. <div class="sectionbody">
  1132. <div class="listingblock">
  1133. <div class="content">
  1134. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public class HelloParticles1_SimpleFire extends SimpleApplication {
  1135. public static void main(String[] args){
  1136. HelloParticles1_SimpleFire app = new HelloParticles1_SimpleFire();
  1137. app.start(); // start the game
  1138. }
  1139. @Override
  1140. public void simpleInitApp() {
  1141. // Construct a new ParticleController
  1142. ParticleController pCtrl = new ParticleController(
  1143. // The name of the emitter
  1144. "SimpleFire",
  1145. // Use a simple point mesh (the fastest but most limited mesh type) with the specified
  1146. // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
  1147. new PointMesh(assetManager, "Effects/Explosion/flame.png", 2, 2),
  1148. // Allow at most 32 particles at any time
  1149. 32,
  1150. // Particles last for at least 2 seconds
  1151. 2,
  1152. // And at most 3 seconds
  1153. 3,
  1154. // Point sources always generate particles at the location of the source, the particles
  1155. // are given a random velocity between the two given.
  1156. new PointSource(new Vector3f(-3, 0, -3), new Vector3f(3, 0, 3)),
  1157. // Emit particles at regular intervals, 10 particles every second
  1158. new RegularEmission(10),
  1159. // ** Influencers start here
  1160. // Select a random sprite from the 4 available for each particle
  1161. new RandomSpriteInfluencer(),
  1162. // Particles start off with a size of 0.5 units, end with a radius of 0.1
  1163. new SizeInfluencer(0.5f, 0.1f),
  1164. // Particles start yellow full opacity and fade towards red with very low opacity
  1165. new ColorInfluencer(new ColorRGBA(1,1,0.2f,1), new ColorRGBA(1,0,0,0.1f)),
  1166. // No matter what velocity particles started with they will start moving upwards.
  1167. new PreferredDirectionInfluencer(new Vector3f(0, 1, 0), 0.25f));
  1168. // Finally attach the geometry to the rootNode in order to start the particles running
  1169. rootNode.attachChild(pCtrl.getGeometry());
  1170. }
  1171. }</code></pre>
  1172. </div>
  1173. </div>
  1174. <div class="paragraph">
  1175. <p>Run that and the result should look something like:</p>
  1176. </div>
  1177. <div class="paragraph">
  1178. <p><span class="image"><img src="../../_images/effect/particles/particles1.jpg" alt="particles1.jpg" width="" height=""></span></p>
  1179. </div>
  1180. </div>
  1181. </div>
  1182. <div class="sect1">
  1183. <h2 id="simple-fire-and-smoke"><a class="anchor" href="#simple-fire-and-smoke"></a>Simple Fire and Smoke</h2>
  1184. <div class="sectionbody">
  1185. <div class="listingblock">
  1186. <div class="content">
  1187. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
  1188. public void simpleInitApp() {
  1189. // Construct a new ParticleController
  1190. ParticleController pCtrl = new ParticleController(
  1191. // The name of the emitter
  1192. "SimpleFire",
  1193. // Use a simple point mesh (the fastest but most limited mesh type) with the specified
  1194. // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
  1195. new PointMesh(assetManager, "Effects/Explosion/flame.png", 2, 2),
  1196. // Allow at most 50 particles at any time, the particles are lasting longer this time
  1197. // so we need to allow more on screen at once
  1198. 50,
  1199. // Particles last for at least 4 seconds
  1200. 4,
  1201. // And at most 5 seconds
  1202. 5,
  1203. // Point sources always generate particles at the location of the source, the particles
  1204. // are given a random velocity between the two given.
  1205. new PointSource(new Vector3f(-3, 0, -3), new Vector3f(3, 0, 3)),
  1206. // Emit particles at regular intervals, 10 particles every second
  1207. new RegularEmission(10),
  1208. // ** Influencers start here
  1209. // Select a random sprite from the 4 available for each particle
  1210. new RandomSpriteInfluencer(),
  1211. // Particles start off with a size of 0.5 units, end with a radius of 0.1
  1212. new SizeInfluencer(0.5f, 0.25f),
  1213. // Particles start yellow full opacity and fade towards red with very low opacity
  1214. new MultiColorInfluencer(
  1215. new MultiColorInfluencer.Stage(0, new ColorRGBA(1, 1, 0.1f, 1)),
  1216. new MultiColorInfluencer.Stage(0.15f, new ColorRGBA(1, 0, 0, 0.25f)),
  1217. new MultiColorInfluencer.Stage(0.3f, new ColorRGBA(1f, 1f, 1f, 0.5f)),
  1218. new MultiColorInfluencer.Stage(1, new ColorRGBA(1f,1f,1f,0f))
  1219. ),
  1220. // No matter what velocity particles started with they will start moving upwards.
  1221. new PreferredDirectionInfluencer(new Vector3f(0, 1, 0), 0.25f));
  1222. // Finally attach the geometry to the rootNode in order to start the particles running
  1223. rootNode.attachChild(pCtrl.getGeometry());
  1224. }</code></pre>
  1225. </div>
  1226. </div>
  1227. <div class="paragraph">
  1228. <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>
  1229. </div>
  1230. <div class="paragraph">
  1231. <p><span class="image"><img src="../../_images/effect/particles/particles1.jpg" alt="particles2.jpg" width="" height=""></span></p>
  1232. </div>
  1233. <div class="paragraph">
  1234. <p>This isn&#8217;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>
  1235. </div>
  1236. </div>
  1237. </div>
  1238. <div class="sect1">
  1239. <h2 id="quad-meshes-and-billboarding"><a class="anchor" href="#quad-meshes-and-billboarding"></a>Quad Meshes and Billboarding</h2>
  1240. <div class="sectionbody">
  1241. <div class="paragraph">
  1242. <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>
  1243. </div>
  1244. <div class="paragraph">
  1245. <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>
  1246. </div>
  1247. <div class="admonitionblock note">
  1248. <table>
  1249. <tr>
  1250. <td class="icon">
  1251. <i class="fa icon-note" title="Note"></i>
  1252. </td>
  1253. <td class="content">
  1254. <div class="paragraph">
  1255. <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>
  1256. </div>
  1257. <div class="paragraph">
  1258. <p><span class="image"><img src="../../_images/effect/particles/runecircle.png" alt="runecircle.png" width="256" height=""></span></p>
  1259. </div>
  1260. </td>
  1261. </tr>
  1262. </table>
  1263. </div>
  1264. <div class="listingblock">
  1265. <div class="content">
  1266. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
  1267. public void simpleInitApp() {
  1268. // Construct a new ParticleController to provide the actual spell runes effect
  1269. ParticleController pCtrl = new ParticleController(
  1270. // The name of the emitter
  1271. "SpellRunes",
  1272. // Use a Quad Mesh, this image is available for download on this page. The texture file contains
  1273. // a single image so there are no sprite columns and rows to set up. The BillboardStrategy is how
  1274. // the particles should be oriented, in this case it uses the particle rotation.
  1275. new QuadMesh(QuadMeshBillboardStrategy.USE_PARTICLE_ROTATION, assetManager, "Textures/runeCircle.png"),
  1276. // Allow at most 9 particles at any time
  1277. 9,
  1278. // Particles always last for 4 seconds
  1279. 4,
  1280. 4,
  1281. // We want to generate all particles from the same location with the same velocity.
  1282. new PointSource(new Vector3f(0, 1f, 0), new Vector3f(0, 1f, 0)),
  1283. // Emit particles at regular intervals, 4 particles every second
  1284. new RegularEmission(2),
  1285. // ** Influencers start here
  1286. // These particles should be size 3 and stay the same size
  1287. new SizeInfluencer(3, 3),
  1288. // Start the particles at full opacity blue and then fade them out to 0 opacity cyan.
  1289. new ColorInfluencer(ColorRGBA.Blue, new ColorRGBA(0, 1, 1, 0)),
  1290. // Rotate all particles by the same amount. The units are radians-per-second
  1291. new RotationInfluencer(
  1292. new Vector3f(0, FastMath.QUARTER_PI, 0),
  1293. new Vector3f(0, FastMath.QUARTER_PI, 0), false));
  1294. // Finally attach the geometry to the rootNode in order to start the particles running
  1295. rootNode.attachChild(pCtrl.getGeometry());
  1296. // Construct a new ParticleController to provide the central glow effect
  1297. pCtrl = new ParticleController(
  1298. // The name of the emitter
  1299. "SpellBase",
  1300. // Use a simple point mesh (the fastest but most limited mesh type) with the specified
  1301. // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
  1302. new PointMesh(assetManager, "Textures/flame.png", 2, 2),
  1303. // Allow at most 76 particles at any time
  1304. 76,
  1305. // Particles last for at least 5 seconds
  1306. 5,
  1307. // And at most 5 seconds
  1308. 5,
  1309. // Point sources always generate particles at the location of the source, the particles
  1310. // are given a random velocity between the two given.
  1311. new PointSource(new Vector3f(-1f, 0, -1f), new Vector3f(1f, 0.5f, 1f)),
  1312. // Emit particles at regular intervals, 15 particles every second
  1313. new RegularEmission(15),
  1314. // ** Influencers start here
  1315. // Select a random sprite from the 4 available for each particle
  1316. new RandomSpriteInfluencer(),
  1317. // Particles start red with some blue and green and fade towards blue zero opacity
  1318. // Because particles are rendered using an additive blend then any area where a lot
  1319. // of particles overlap will end up white.
  1320. new ColorInfluencer(new ColorRGBA(1,0.25f,0.25f,0.25f), new ColorRGBA(0,0,1,0f)));
  1321. // Finally attach the geometry to the rootNode in order to start the particles running
  1322. rootNode.attachChild(pCtrl.getGeometry());
  1323. cam.setLocation(new Vector3f(0, 10, -10));
  1324. cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
  1325. }</code></pre>
  1326. </div>
  1327. </div>
  1328. <div class="paragraph">
  1329. <p>The result should look something like:</p>
  1330. </div>
  1331. <div class="ulist">
  1332. <ul>
  1333. <li>
  1334. <p><a href="https://www.youtube.com/watch?v=_Spjqag99HY">Video: Particle Emitter Example 1</a></p>
  1335. </li>
  1336. </ul>
  1337. </div>
  1338. </div>
  1339. </div>
  1340. <div class="sect1">
  1341. <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>
  1342. <div class="sectionbody">
  1343. <div class="paragraph">
  1344. <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>
  1345. </div>
  1346. <div class="listingblock">
  1347. <div class="content">
  1348. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
  1349. public void simpleInitApp() {
  1350. Node monkey = (Node) assetManager.loadModel("Models/MonkeyHead/MonkeyHead.mesh.xml");
  1351. rootNode.attachChild(monkey);
  1352. DirectionalLight dl = new DirectionalLight();
  1353. dl.setDirection(new Vector3f(-0.1f,-0.7f,-1).normalizeLocal());
  1354. dl.setColor(new ColorRGBA(0.88f, 0.60f, 0.60f, 1.0f));
  1355. rootNode.addLight(dl);
  1356. AmbientLight al = new AmbientLight();
  1357. al.setColor(ColorRGBA.White);
  1358. rootNode.addLight(al);
  1359. ...
  1360. }</code></pre>
  1361. </div>
  1362. </div>
  1363. <div class="paragraph">
  1364. <p>The result should look something like:</p>
  1365. </div>
  1366. <div class="paragraph">
  1367. <p><span class="image"><img src="../../_images/effect/particles/particles1.jpg" alt="particles3.jpg" width="" height=""></span></p>
  1368. </div>
  1369. <div class="paragraph">
  1370. <p>Now lets set fire to the monkey! (No monkeys were harmed during the making of this particle system!).</p>
  1371. </div>
  1372. <div class="listingblock">
  1373. <div class="content">
  1374. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">// Construct a new ParticleController
  1375. ParticleController pCtrl = new ParticleController(
  1376. // The name of the emitter
  1377. "SimpleFire",
  1378. // Use a simple point mesh (the fastest but most limited mesh type) with the specified
  1379. // image (from jME3-testdata). The image actually contains a 2x2 grid of sprites.
  1380. new PointMesh(assetManager, "Textures/flame.png", 2, 2),
  1381. // Allow at most 1200 particles at any time, the particles are lasting longer this time
  1382. // so we need to allow more on screen at once
  1383. 1200,
  1384. // Particles last for at least 4 seconds
  1385. 4,
  1386. // And at most 5 seconds
  1387. 5,
  1388. // A MeshSource scans a geometry and picks a random point on the surface of that
  1389. // geometry in order to emit the particle from it. The particle has an initial velocity
  1390. // of 1wu/s along the normal of the triangle from which it is emitted.
  1391. new MeshSource(g),
  1392. // Emit particles at regular intervals, 10 particles every second
  1393. new RegularEmission(240),
  1394. // ** Influencers start here
  1395. // Select a random sprite from the 4 available for each particle
  1396. new RandomSpriteInfluencer(),
  1397. // Particles start off with a size of 0.1 units, end with a size of 0.15
  1398. new SizeInfluencer(0.1f, 0.15f),
  1399. // Particles have a constant speed of 0.25f, this will modify the original speed
  1400. // from the emitter and then allow the GravityInfluencer to change the direction
  1401. // of motion but constrain the speed
  1402. new SpeedInfluencer(0.25f, 0.25f),
  1403. // Fade the particles through a range of colours
  1404. new MultiColorInfluencer(
  1405. new MultiColorInfluencer.Stage(0, new ColorRGBA(1, 1, 0.1f, 1)),
  1406. new MultiColorInfluencer.Stage(0.25f, new ColorRGBA(1, 0, 0, 0.25f)),
  1407. new MultiColorInfluencer.Stage(0.5f, new ColorRGBA(1f, 1f, 1f, 0.25f)),
  1408. new MultiColorInfluencer.Stage(1, new ColorRGBA(1f,1f,1f,0f))
  1409. ),
  1410. // No matter what velocity particles started with they will start moving upwards.
  1411. new GravityInfluencer(new Vector3f(0, 0.5f, 0)));
  1412. // Finally attach the geometry to the rootNode in order to start the particles running
  1413. rootNode.attachChild(pCtrl.getGeometry());</code></pre>
  1414. </div>
  1415. </div>
  1416. <div class="paragraph">
  1417. <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>
  1418. </div>
  1419. <div class="ulist">
  1420. <ul>
  1421. <li>
  1422. <p><a href="https://www.youtube.com/watch?v=W__zGJHZ2AU">Video: Particle Emitter Example 2</a></p>
  1423. </li>
  1424. </ul>
  1425. </div>
  1426. </div>
  1427. </div>
  1428. <div class="sect1">
  1429. <h2 id="meshes-and-weighted-meshes"><a class="anchor" href="#meshes-and-weighted-meshes"></a>Meshes and Weighted Meshes</h2>
  1430. <div class="sectionbody">
  1431. <div class="paragraph">
  1432. <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>
  1433. </div>
  1434. <div class="paragraph">
  1435. <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>
  1436. </div>
  1437. <div class="olist arabic">
  1438. <ol class="arabic">
  1439. <li>
  1440. <p>The WeightedMeshSource consumes more memory as it needs to remember the weights</p>
  1441. </li>
  1442. <li>
  1443. <p>The WeightedMeshSource is slower as it needs to do more work to pick a triangle</p>
  1444. </li>
  1445. <li>
  1446. <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>
  1447. </li>
  1448. </ol>
  1449. </div>
  1450. <div class="paragraph">
  1451. <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>
  1452. </div>
  1453. </div>
  1454. </div>
  1455. <div class="sect1">
  1456. <h2 id="3d-particles-templatemesh"><a class="anchor" href="#3d-particles-templatemesh"></a>3d Particles - TemplateMesh</h2>
  1457. <div class="sectionbody">
  1458. <div class="paragraph">
  1459. <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>
  1460. </div>
  1461. <div class="admonitionblock note">
  1462. <table>
  1463. <tr>
  1464. <td class="icon">
  1465. <i class="fa icon-note" title="Note"></i>
  1466. </td>
  1467. <td class="content">
  1468. <div class="paragraph">
  1469. <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>
  1470. </div>
  1471. </td>
  1472. </tr>
  1473. </table>
  1474. </div>
  1475. <div class="listingblock">
  1476. <div class="content">
  1477. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> @Override
  1478. public void simpleInitApp() {
  1479. // Since we actually use a full lit material for these particles we need
  1480. // to add a light to the scene in order to see anything.
  1481. DirectionalLight dl = new DirectionalLight();
  1482. dl.setDirection(new Vector3f(-0.1f,-0.7f,-1).normalizeLocal());
  1483. dl.setColor(new ColorRGBA(0.6f, 0.60f, 0.60f, 1.0f));
  1484. rootNode.addLight(dl);
  1485. // A standard lit material is used, this rock texture was taking from the
  1486. // jme3 test data but you can easily substitute your own.
  1487. Material rock = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
  1488. rock.setTexture("DiffuseMap", assetManager.loadTexture("Textures/Rock.PNG"));
  1489. rock.setFloat("Shininess", 100f);
  1490. // A PointSource is actually a fully featured Spatial object, in this case
  1491. // we simply adjust its translation, but it can actually be attached to the
  1492. // scene graph and the source will automatically move as the Node to which
  1493. // it is attached is transformed.
  1494. PointSource source = new PointSource(new Vector3f(-5,-5,-5), new Vector3f(5,5,5));
  1495. source.setLocalTranslation(0, 10, -20);
  1496. // A TemplateMesh uses any number of standard meshes to be the template for
  1497. // each 3d particle. This model was generated simply by taking a cube in
  1498. // Blender and running a fracture script on it to generate 20 fragments.
  1499. Node n = (Node) assetManager.loadModel("Models/FracturedCube.j3o");
  1500. Mesh[] templates = new Mesh[n.getChildren().size()];
  1501. int i = 0;
  1502. for (Spatial s: n.getChildren()) {
  1503. Geometry g = (Geometry)((Node)s).getChild(0);
  1504. templates[i++] = g.getMesh();
  1505. }
  1506. // Construct the new particle controller
  1507. ParticleController rockCtrl = new ParticleController(
  1508. "TemplateMesh",
  1509. // The TemplateMesh uses the rock material we created previously, the two boolean
  1510. // flags say that we are not interested in vertex colours but we do want the vertex
  1511. // normals. The array of meshes extracted from the model is then passed in to use
  1512. // as models for each particle.
  1513. new TemplateMesh(rock, false, true, templates),
  1514. // A maximum of 64 particles at once, each lasting for 5 to 5.5 seconds.
  1515. 64,
  1516. 5,
  1517. 5.5f,
  1518. // Particles are emitted from the source that we created and positioned earlier
  1519. source,
  1520. // Emit 8 particles per second
  1521. new RegularEmission(8),
  1522. // The "sprites" in this case are the available templates. The TemplateMesh has
  1523. // one spriteColumn for each template it has been provided, so the standard
  1524. // RandomSpriteInfluencer just causes one to be picked at random each time a
  1525. // particle is emitted.
  1526. new RandomSpriteInfluencer(),
  1527. // Rocks fall.
  1528. new GravityInfluencer(new Vector3f(0, -4, 0)),
  1529. // Rocks spin.
  1530. new RotationInfluencer(new Vector3f(-2, -2, -2), new Vector3f(2, 2, 2), false));
  1531. rootNode.attachChild(rockCtrl.getGeometry());
  1532. }</code></pre>
  1533. </div>
  1534. </div>
  1535. <div class="paragraph">
  1536. <p>The result should look like:</p>
  1537. </div>
  1538. <div class="ulist">
  1539. <ul>
  1540. <li>
  1541. <p><a href="https://www.youtube.com/watch?v=a7y53UF8Giw">Video: Particle Emitter Example 3</a></p>
  1542. </li>
  1543. </ul>
  1544. </div>
  1545. <div class="paragraph">
  1546. <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>
  1547. </div>
  1548. </div>
  1549. </div>
  1550. <div class="sect1">
  1551. <h2 id="emitting-particles-from-particles"><a class="anchor" href="#emitting-particles-from-particles"></a>Emitting Particles from Particles</h2>
  1552. <div class="sectionbody">
  1553. <div class="paragraph">
  1554. <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>
  1555. </div>
  1556. <div class="paragraph">
  1557. <p>Adding the following code:</p>
  1558. </div>
  1559. <div class="listingblock">
  1560. <div class="content">
  1561. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> ParticleController pCtrl = new ParticleController(
  1562. "TemplateFlames",
  1563. new PointMesh(assetManager, "Textures/flame.png", 2, 2),
  1564. 1300,
  1565. 3,
  1566. 4,
  1567. new MeshSource(rockCtrl.getGeometry()),
  1568. new RegularEmission(320),
  1569. new SizeInfluencer(0.5f, 2),
  1570. new ColorInfluencer(new ColorRGBA(1,1,0.1f, 1f), new ColorRGBA(1,0,0,0.05f)),
  1571. new GravityInfluencer(new Vector3f(0, 0.3f, 0)),
  1572. new RandomImpulseInfluencer(
  1573. RandomImpulseInfluencer.ImpulseApplicationTime.INITIALIZE,
  1574. new Vector3f(-0.5f, -0.5f, -0.5f),
  1575. new Vector3f(0.5f, 0.5f, 0.5f)));
  1576. rootNode.attachChild(pCtrl.getGeometry());</code></pre>
  1577. </div>
  1578. </div>
  1579. <div class="paragraph">
  1580. <p>Results in something that looks like this:</p>
  1581. </div>
  1582. <div class="ulist">
  1583. <ul>
  1584. <li>
  1585. <p><a href="https://www.youtube.com/watch?v=WGR5RzF9APg">Video: Particle Emitter Example 3</a></p>
  1586. </li>
  1587. </ul>
  1588. </div>
  1589. <div class="paragraph">
  1590. <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>
  1591. </div>
  1592. <div class="paragraph">
  1593. <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>
  1594. </div>
  1595. <div class="paragraph">
  1596. <p>Leave everything else the same but change the MeshSource into</p>
  1597. </div>
  1598. <div class="listingblock">
  1599. <div class="content">
  1600. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> new ParticleParticleSource(rockCtrl),</code></pre>
  1601. </div>
  1602. </div>
  1603. <div class="paragraph">
  1604. <p>You can see that this gives much better results:</p>
  1605. </div>
  1606. <div class="ulist">
  1607. <ul>
  1608. <li>
  1609. <p><a href="https://www.youtube.com/watch?v=2BlBZVM0EZQ">Video: Particle Emitter Example 4</a></p>
  1610. </li>
  1611. </ul>
  1612. </div>
  1613. <div class="paragraph">
  1614. <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>
  1615. </div>
  1616. <div class="paragraph">
  1617. <p>To add smoke we can add a third emitter after the other two:</p>
  1618. </div>
  1619. <div class="listingblock">
  1620. <div class="content">
  1621. <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
  1622. Material smokeMat = new Material(
  1623. assetManager, "Common/MatDefs/Misc/Particle.j3md");
  1624. // The Smoke.png texture can be found in the jme3 test data
  1625. smokeMat.setTexture("Texture",
  1626. assetManager.loadTexture("Textures/Smoke.png"));
  1627. // Set the blend mode to Alpha rather than AlphaAdditive so that dark smoke
  1628. // can darken the scene behind it
  1629. smokeMat.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
  1630. // For point sprite meshes this parameter must be set
  1631. smokeMat.setBoolean("PointSprite", true);
  1632. // Construct the new particle controller
  1633. pCtrl = new ParticleController(
  1634. "TemplateSmoke",
  1635. // The Smoke.png texture contains 15 sprites, if you use a different texture adjust
  1636. // these parameters accordingly.
  1637. new PointMesh(smokeMat, 15, 1),
  1638. 800,
  1639. 4,
  1640. 5,
  1641. new ParticleParticleSource(rockCtrl),
  1642. new RegularEmission(180),
  1643. new SizeInfluencer(1f, 2.5f),
  1644. new MultiColorInfluencer(
  1645. new MultiColorInfluencer.Stage(0, new ColorRGBA(1, 1, 1, 0)),
  1646. new MultiColorInfluencer.Stage(0.5f, new ColorRGBA(0, 0, 0, 0.5f)),
  1647. new MultiColorInfluencer.Stage(1, new ColorRGBA(1, 1, 1, 0))),
  1648. new GravityInfluencer(new Vector3f(0, 0.75f, 0)),
  1649. new RandomImpulseInfluencer(
  1650. RandomImpulseInfluencer.ImpulseApplicationTime.INITIALIZE,
  1651. new Vector3f(-0.5f, -0.5f, -0.5f),
  1652. new Vector3f(0.5f, 0.5f, 0.5f)));
  1653. rootNode.attachChild(pCtrl.getGeometry());</code></pre>
  1654. </div>
  1655. </div>
  1656. <div class="paragraph">
  1657. <p>The results look something like:</p>
  1658. </div>
  1659. <div class="ulist">
  1660. <ul>
  1661. <li>
  1662. <p><a href="https://www.youtube.com/watch?v=01qCBGBvf-c">Video: Particle Emitter Example 5</a></p>
  1663. </li>
  1664. </ul>
  1665. </div>
  1666. <div class="paragraph">
  1667. <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>
  1668. </div>
  1669. <div class="listingblock">
  1670. <div class="content">
  1671. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/BrightSky.dds", false));</code></pre>
  1672. </div>
  1673. </div>
  1674. <div class="paragraph">
  1675. <p>Now we have the final effect which looks like:</p>
  1676. </div>
  1677. <div class="ulist">
  1678. <ul>
  1679. <li>
  1680. <p><a href="https://www.youtube.com/watch?v=uDeWAjw4LxU">Video: Particle Emitter Example 6</a></p>
  1681. </li>
  1682. </ul>
  1683. </div>
  1684. </div>
  1685. </div>
  1686. </article>
  1687. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  1688. <div class="toc-menu"></div>
  1689. </aside>
  1690. </div>
  1691. </main>
  1692. </div>
  1693. <footer class="footer">
  1694. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  1695. </footer>
  1696. <script src="../../../../../_/js/vendor/docsearch.min.js"></script>
  1697. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
  1698. <script>
  1699. var search = docsearch({
  1700. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  1701. indexName: 'jmonkeyengine',
  1702. inputSelector: '#search-input',
  1703. autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
  1704. algoliaOptions: { hitsPerPage: 10 }
  1705. }).autocomplete
  1706. search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
  1707. function focusSearchInput () { document.querySelector('#search-input').focus() }
  1708. if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
  1709. </script>
  1710. <script src="../../../../../_/js/site.js"></script>
  1711. <script async src="../../../../../_/js/vendor/highlight.js"></script>
  1712. </body>
  1713. </html>