Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export an charts image like example.cpp in xatlas #6

Open
zbx99 opened this issue Aug 11, 2021 · 3 comments
Open

Export an charts image like example.cpp in xatlas #6

zbx99 opened this issue Aug 11, 2021 · 3 comments

Comments

@zbx99
Copy link

zbx99 commented Aug 11, 2021

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

@mworchel
Copy link
Owner

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
Copy link
Owner

mworchel commented Oct 8, 2021

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

@kongsgard
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants