Custom particle animation: Points library

31 March 2017 06:48
Dear Brothers and Sisters,

I come from a THREE js background originally and wish to take a minute in appreciating the efforts of Blend4Web team in what they have accomplished. Hats off to everyone who have contributed this wonderful, seamlessly performing 3D engine. You guys are make lives easier and 3D on a Nirvana level.

Now coming to my domain of doubts. In THREE.js there is a THREE.Points class to render custom point clouds to achieve effects on par with particles but not strictly particles. I wish to do something similar using Blend4Web but I am quite clueless on how to do this.

To be particular I am trying to achieve this effect originally done using THREE.js Draw Calls: THREE.JS

What did I try? I create a mesh with 'Halo' material in an attempt to modify the vertex positions at run time to achieve the same effect as you would see in the above url. Then use an 'Empty' object to draw lines based on my requirement. The main hassle here is to modify the vertices of a mesh.

Can someone please guide me on this? Sorry if this was a basic question. Thanks in advance to all the guides out there.


31 March 2017 22:34
Will it be possible to integrate something likes this into Blend4Web?


03 April 2017 14:37

As for me, the described demo is not really easy to achieve as currently there is no way to create custom shaders in Blend4Web. Furthermore, without modifying the engine it is not possible to use GL_LINES or GL_POINTS which gives the best performance for this case.

The approach you have chosen looks like the best possible option as for now.

We have plans on significantly improving procedural geometry and materials, but I can't say precisely when this gonna happen.
10 April 2017 19:02

Would it be feasible for me to add a function like gl_lines which would be a patch for Blend4Web which would expose access the the GL_LINES rendering in WebGL?

I am trying to render coloured lines which change every frame, they are marking out a grid which renders the wave equation as a heightmap, this is for a scientific purpose.

Obviously I don't want to do anything which would go against the good design of Blend4Web.
11 April 2017 10:54
The problem with GL_LINES and GL_POINTS is that they are deprecated in modern OpenGL and their possibilities were truncated since OpenGL 3.0 and hence in WebGL 2.0. You can't set their width to a value greater than 1.0.

This is why I think the efforts to implement them in Blend4Web do not worth it.

Instead, it is better to further develop the existing draw_line API. You can always make a pull request to our GitHub repository.
13 April 2017 01:03
Cool thanks. I will look into that.
Please register or log in to leave a reply.