Sasha Posted August 8, 2016 Share Posted August 8, 2016 Hello. I want a dynamic changing of vertex colors in babylonjs. How do I export all variants of vertex colors for one object from blender to babylon? After exporting I found only one one-dimensional array. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 8, 2016 Share Posted August 8, 2016 Hello, this is not supported directly for now. But you can still edit the vertex colors of your mesh using Javascript with mesh.getVerticesData() Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 8, 2016 Share Posted August 8, 2016 Did a quick look at the code. @Deltakosh wrote the vertex color part & I never needed to change it. Yes, it is using the "active" one Colormap = mesh.tessface_vertex_colors.active.data This implies that there is a collection of them in Blender. Unfortunately for you, the .babylon file format only holds 1 of positions, normals, colors. It is open source, so you could change this, but then you would have to have a place for these spare parts to go. This is a big job for a first Pull request. The only practical hope I see is to export multiple times with a different variant set as active. For all but 1, export & edit each to copy out the data of the colors. I recommend the using the source code exporter, Tower of Babel, at least for giving you the syntax of how you load vertex colors. I will not show you, since TOB already documents the syntax. Good luck. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.