question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FBO Particles in Three.js

See original GitHub issue

Just throwing some ideas here to see how we could add use particles simulation using FBO in three.js

Basically what this means is that particles positions are simulated/calculated in webgl shaders, so particles positions never need to be passed via JS, which potentially means its possible to run millions of particles in realtime.

here’s 2 poc, but they are not really integrated with three.js yet since things broke when i got into a little mess trying hack the webglrenderer.

http://jabtunes.com/labs/particles/experiments_fbo.html http://jabtunes.com/labs/particles/experiments_fbo2.html

perhaps we could something like this?

init() {
  particles = new THREE.FBOParticles();
  particles.simulation = new THREE.Composer(); //...
  particles.renderer = new THREE.ShaderMaterial(); //...

  particles.position.set(x,y,z);

  scene.add(particles)
}

render() {
  particles.updateSimulation();
  renderer.render(scene, camera);
}

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
zz85commented, Aug 17, 2012

Update of FBO particle experiments links with three.js for anyone who might find examples useful 😃

http://nucleal.com http://mrdoob.com/lab/javascript/webgl/particles/particles_zz85.html http://mrdoob.com/144/Magic_dust

1reaction
zz85commented, Jul 17, 2012

heehee… managed to get @mrdoob experiment moved to the shaders.

before was running < 5fps on my macbook air, now its running at 30fps 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

FBO Particles with Three.js - Codrops
FBO Particles with Three.js. Learn how to code the particle cloud seen on the website of Visualdata using Three.js.
Read more >
using FBO to render particles in THREE.js - GitHub
FBO. using FBO to render particles in THREE.js longer article. UPDATE 210525. Mario Carrillo was kind enough to port the code samples to...
Read more >
FBO particles – Youpi !
FBO particles · simulation: uses a Data Texture as an input, updates the particles' positions and writes them back to a RenderTarget ·...
Read more >
FBO Particles with Three.js - Awwwards
FBO Particles with Three.js. FBO Particles with Three.js. This element was built with... fbo; particles; three.js; animation; interaction; article; tutorial ...
Read more >
FBO Particles with Cumulative Movement - three.js
For cumulative movement, you need to use uniforms : Look into passing a uniform named time to your vertex shader.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found