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

What does this do different compared to https://github.com/ands/trianglepacker ? #1

Open
ands opened this issue Jan 19, 2018 · 3 comments

Comments

@ands
Copy link

ands commented Jan 19, 2018

Good to know that somebody tries to improve my code ;)
What exactly are the differences between our trianglepackers?

@ray-cast
Copy link
Owner

ray-cast commented Jan 19, 2018

I have tried to use your project in my project, i think it's works well in the most time, but it can't support the quad polygon, it'll cause the vertices of the model much more than origin model, so i'm trying to write a project to improve your trianglepacker.

In most case, the model is converted from a quad to two triangle.
For example: Quad indices: (0 1 2 3) to Triangle indices (0, 2, 1), (2, 3, 1)

This method is looks like blender's lightmappack, that can be extended to support these types of quad polygon, when two triangle are (0, 2, 1), (2, 3, 1).

@ray-cast
Copy link
Owner

ray-cast commented Jan 19, 2018

so, two triangle become combined and can result in a quad, but not finished yet, and i think the rectangle pack is a good structure for texture sampling.
image

are not two triangle:
image

@ands
Copy link
Author

ands commented Jan 19, 2018

That sounds great! This was actually the feature I always wanted to add, but never got around to actually do :)

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

2 participants