multiple UV sets

Dear all.
Please forgive me if this question has been answered already, I wasn’t able to find a solution yet

I’m trying to generate a model from vertices with

vdata=GeomVertexData('square', format, Geom.UHStatic)
vertex=GeomVertexWriter(self.vdata, 'vertex')
normal=GeomVertexWriter(self.vdata, 'normal')
texcoord = GeomVertexWriter(self.vdata, 'texcoord')
texcoord2= GeomVertexWriter(self.vdata, 'texcoord.second')
prim = GeomTriangles(Geom.UHStatic)

but when i try to add data


I got an error:

the problem is,as i see it, that GeomVertexWriter(vdata, ‘texcoord.second’) returns GeomVertexWriter() but not GeomVertexWriter, array = 00000000, column = 02631524 (Packer_nativefloat_2), write row 0

>>GeomVertexWriter(vdata, 'texcoord')
GeomVertexWriter, array = 00000000, column = 02631524 (Packer_nativefloat_2), write row 0
>>GeomVertexWriter(vdata, 'texcoord.second')

So the question is what i’m doing wrong?
Thank you in advance…

Your GeomVertexFormat does not properly describe your intended structure. You used this:


This returns one of the default GeomVertexFormats, in particular one that has room for a set of vertex positions, normals and texcoords, but not for a second set of texcoords.

You’ll have to create your own GeomVertexFormat that specifies an additional “texcoord.second” column and register and use that. This is described here: … rtexFormat

What you’d be doing is another addColumn call, but instead of using InternalName.getTexcoord() you’d be passing InternalName.getTexcoordName(‘second’), or simply ‘texcoord.second’ as a short-hand as you have been doing.

Thnks, it works.