Forum

Dynamic Geometry Texture Coordinates

11 October 2017 16:45
Hi @ll,
Is there a way to apply texture coordinates to the dynamically/programmatically created geometry, too?
Hearing Dmitry stating: "giving the ability to use procedural geometry in scenes", gives me hope that this is an active topic/area of development of the Blend4Web-Engine (?).

In the API, I found only
m_geometry.update_vertex_array(obj, mat_name, attrib_name, array)

with "a_position", "a_tbn" (tangent-binormal-normal?) and "a_normal" as possible attrib_name attribute names, the engine-source code of that function showed as well only handling of those three attribute types.

Is there a way or workaround to set the texture-coordinates for each vertex in that dynamic geometry? / Support for the "a_texcoord"-attribute?

Looking forward for any insight,

Cheers, Daniel.
@ Emotional3D
11 October 2017 19:12
or perhaps (as alternative) the possibility to supply vertex-color data to the dynamic geometry?
@ Emotional3D
12 October 2017 10:56
Hi Daniel,

You can use "a_texcoord" and "a_color" for texture coordinates and vertex color respectively if an object has a non-node material.
For node materials it requires to specify an attribute name, which corresponds to a particular uv map or a vertex color. But it's inconvenient as for now, because these attribute names are the engine's internal identifiers like "param_GEOMETRY_UV_a_0", "param_GEOMETRY_UV_a_1" etc.
16 February 2018 10:30
Hi Ivan , I hope you are fine. I am looking a devoloper for my project. The project about jewelery configrator. I already created my models.

I m trying to open a website for jewlr.com .I mean customer can change metal and stones and price will change depends of customer chooices. Colour and stone rendering quality have to like this https://www.meisterschmuck.ch/shop/trauringe/trauringe-weissgold/rotgold-112.8972.001-11.html have to be realistic.


email: ramiz.yenidogan@gmail.com
 
Please register or log in to leave a reply.