xatlas-python icon indicating copy to clipboard operation
xatlas-python copied to clipboard

Export an charts image like example.cpp in xatlas

Open zbx99 opened this issue 3 years ago • 3 comments

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];

zbx99 avatar Aug 11 '21 09:08 zbx99

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.

mworchel avatar Aug 13 '21 17:08 mworchel

@zbx99 Does my reply answer your initial question? I'm planning to include direct access to the ChartArray in the future.

mworchel avatar Oct 08 '21 16:10 mworchel

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?

kongsgard avatar Dec 10 '21 12:12 kongsgard