Changing vertex colors

08 July 2017 22:00
I know how to change material colors dynamically with the API.

Is there any way to reassign vertex colors?
09 July 2017 04:33
While you can do Vertex Painting in Blender, I don't know of any way to do it after run-time in Blend4Web
09 July 2017 19:05
Hi, could you describe an example of what he would be lusting to do?
10 July 2017 04:54
Making 3D content for WebGL in browsers can be done at a very low level of programming (link). You can manually program the position and color of each vertex. While this can be used for some cool things, it is not very useful if you want to make a large scene with mountains, grass and clouds. With Blend4Web, you make your object and color in Blender and all the low level color assignment happens automatically. It might be like using a paintbrush tool in Photoshop vs. manually typing in the RGB color for each pixel.
12 July 2017 02:21
Thank you both for your replies.

I have been using Blender and Blend4web to display neuroimaging data on meshes of brain cortical surfaces. For this, I have been coloring different brain regions either using material colors and separate meshes or vertex painting in Blender as Will mentioned. It would be nice to apply different vertex colors dynamically to display different data sets, as you say after run-time, rather than generating multiple differently colored mesh objects.
13 July 2017 14:38
Hi, changing the color is easy with logical nodes, look at this youtube link to see if that is what you are looking for.
14 July 2017 11:22
There's also some low-level API for manipulating attribute data: extract_vertex_array / update_vertex_array.

If you use stack material with the "Vertex Color Paint" option enabled, then you can specify "a_color" as the attribute name in these methods.
Please register or log in to leave a reply.