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

Sort faces by texture #4

Open
Dylancyclone opened this issue Jun 27, 2020 · 0 comments
Open

Sort faces by texture #4

Dylancyclone opened this issue Jun 27, 2020 · 0 comments
Labels
optimization Something that doesn't change functionality but improves the result of the program

Comments

@Dylancyclone
Copy link
Owner

If a brush used multiple materials, it is possible for the .obj file to switch back and forth between the materials multiple times. For optimization, it would be nice to sort the faces so that only one usemtl needs to be used per material per object.

For example:

usemtl tools/toolsnodraw
f 1/1 2/2 3/3 4/4 
usemtl tools/toolstrigger
f 5/5 6/6 7/7 8/8 
usemtl tools/toolsnodraw
f 9/9 10/10 11/11 12/12

could be optimized to:

usemtl tools/toolsnodraw
f 1/1 2/2 3/3 4/4 
f 9/9 10/10 11/11 12/12
usemtl tools/toolstrigger
f 5/5 6/6 7/7 8/8 
@Dylancyclone Dylancyclone added enhancement New feature or request optimization Something that doesn't change functionality but improves the result of the program and removed enhancement New feature or request labels Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization Something that doesn't change functionality but improves the result of the program
Projects
None yet
Development

No branches or pull requests

1 participant