Blend4Web 16.01 Released
2016-01-28
We are glad to announce the release of a new version of Blend4Web - an open source platform for creating 3D web applications. Although the month was short, we were able to implement lots of useful functions including API for line rendering and new nodes for the logic editor. In addition, we simplified the SDK installation and improved the Head-Mounted Display support.
Line Rendering
Starting with today's release, Blend4Web has new API functions for high-quality line rendering in 3D space. We have prepared an example which is included in the Code Snippets.
To draw a line, you need to add an empty object with the option Line Renderer enabled to a Blender scene. This object can be animated too.
In the application, lines are drawn with the draw_line method:
var line1 = m_scenes.get_object_by_name("Line1");
m_geometry.draw_line(line1, [x0, y0, z0, x1, y1, z1...]);
It is also possible to set thickness, color and alpha for lines.
Logic Editor
This month we have continued to add new functions to the logic node editor. Now that there are quite a few logic nodes, we decided to separate them into semantic categories.
Two new nodes have been added. Transform Object allows you to move an object in the world, parent or local coordinate space. String Operation performs operations with string constants and variables, similar to the Math Operation node.
An option to switch the variable type between the Number and String types has been added to the Variable Store node. Also, an option to use string variables to save the entire body of the server's request and response has been added to the Send Request node.
Material Library Start
The library of high-quality materials can shorten content creation time significantly. During the next few months, we are planning to implement basic material classes (glass, metals, wood, plastic and so on). As the first step, we have created a model and the environment for demonstrating materials that you can see below.
Other Improvements
Heads up! Installing the SDK has been made easier: now you only need to specify the path to the SDK root directory in the File->Scripts field in the User Preferences menu (until now, you had to specify the path to the script directory inside the SDK folder).
An option to disable social network buttons has been added to the Web Player: to do that, you need to use the no_social attribute in the browser's address bar.
Work on support for virtual reality devices has continued: mechanics to correct the distortion and remove the chromatic aberration has been added. To specify user settings for correction you need to use the set_hmd_params() function.
Two-finger rotation gesture support for touch devices has been implemented. The new Touch Rotate sensor has been added to the controls module for this.
We have optimized the node tree update algorithm which solves the performance issues for huge logic node trees.
In Closing
The presented Blend4Web release is compatible with Blender 2.76. Blend files of all examples mentioned in this article are included in the Blend4Web SDK. The full list of changes and fixed errors can be found in the release notes.