xatlas-python
xatlas-python copied to clipboard
Export an charts image like example.cpp in xatlas
Thanks for the great bindings.
I want to export tga images just like example.cpp provided in xatlas but I meet a problem that I can't find how to get message about chartArray I can only get the value of chart_count.
This is the part of example.cpp. I have no idea about how to get chartArray.I am new at this.If there is something I didn't correctly understand,please tell me. Thank you.
for (uint32_t j = 0; j < mesh.chartCount; j++) { const xatlas::Chart *chart = &mesh.chartArray[j]; uint8_t color[3]; RandomColor(color); for (uint32_t k = 0; k < chart->faceCount; k++) { const uint32_t face = chart->faceArray[k];
Hi,
you cannot access chartArray
because this member is not bound to Python and worse, the class Mesh
is not.
If you are just interested in an image showing the individual chart arrangement, you can try the member atlas.chart_image
.
@zbx99 Does my reply answer your initial question? I'm planning to include direct access to the ChartArray in the future.
I'd also like to chime in here and thank you for the bindings. Direct access to the ChartArray would be very helpful. Do you see that as something that will be added soon?