-
Notifications
You must be signed in to change notification settings - Fork 223
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
Optimisation for high-load input #125
base: master
Are you sure you want to change the base?
Conversation
BREAKING CHANGE: does not ignore close-to-zero area faces. It was making holes in dense UVMeshes. To preserve functionality, a workaround is needed.
With constant number of steps in scheme and rate.
Also: metric experiments, modifying parallelization for more consistent results. BREAKING CHANGE: PackOptions now has additional options, may break C code.
Better results (increased quality) Also: Add different callback which outputs percentage more frequently and more accurate. PackOptions are renamed.
rough implementation of two other overlap checking strategies: image compression and 2d segment tree
Scheme now uses different reductions of chart for different offsets, making it "true" rasterisation. Changed atlas rasterisation to optimistic for faster results
Instead of reducing full image, we now use image from previous layer.
separate checks for pessimistic and optimistic options
when rate is > 4, reduceToOptimistic should work faster (not tested; hidden inside feature flag)
Not only works faster, but also saves memory.
preparation for adding option to actually "rotate" charts
Update comments for PackOptions BREAKING CHANGE: PackOptions::rotateCharts is now responsible for an actual chart rotation
New option to force preserving fractional part of input texture coordinates
GPU implementation (currently not supported fully) skipSpeedup, usePreviousPositionOffset, gridSpeedup - new options. BREAKING CHANGE: new pack options; coarseLevelRate is now hidden from user (its function is now replaced by XA_PACKING_COARSE_RATE[...] macros family.
# Conflicts: # source/xatlas/xatlas.cpp # source/xatlas/xatlas.h
…strategy 'random' now uses 'bruteForce' packing if chart is big enough (reduces speed, improves packing) Previous behaviour is supported through 'PackOptions::randomUseBruteForce'.
…ctionalPart = true`
Hi, @Korinin38 Thanks for your great work. But when I tried your repo, I cannot build successfully and get following error:
Did I do any thing wrong? Any help is appreciated. |
Hi, @lcc815 Have you tried building current version of xatlas without these contributions? If yes, is this error unique to xatlas_hi-res_optimised? |
Yes! I can build current version of xatlas without these contributions successfully. |
@Korinin38 hello, could you please try solving this? please.. Current version of xatlas is just too slow to use. |
Hi, @lcc815, sorry for keeping you waiting, I examined the problem. Seems like the error appears due to addition of exception handling, it would be fixed soon. For immediate result, try changing the parameter Please contact me whether that helped or not. |
also: address warnings add openmp options in premake file remove exception handling fix test of gazebo.obj
@Korinin38 yes! It works! I can build and run your code successfully just like the official code. |
I'll see into it. Can you provide logs for both launches? It would help me greatly. Bear in mind that there are two independent steps: computing charts and packing charts, and if the slowest step is the former, I can do nothing about it as it is not changed in any way. |
Aha, I got it. The bottleneck is computing charts. packing charts do cost less time than the official code. |
I pulled your branch and did 3 tests with a city block model. original xatlas: 73 seconds I didn't try CUDA because of build setup complexities. |
Hello @siliconvoodoo, thank you for reaching out, Is it possible for you to provide the example model? If not, could you share details such as number of vertices & faces, as well as number of charts parametrized with xatlas? It's also useful to know which PackOptions you used, and whether the results of packing are satisfactory in both finished tests. |
This fork is still a bit rough, but is actively developed as of now. There are some important changes, and more strict STL dependencies, so I suggest leave this PR unmerged and instead be used as a link for those who are interested.
Motivation
Big scale projects (photo-realistic objects with >1M faces) can be processed with xatlas, with a caveat of either significant time cost (if using BruteForce packing method) or sub-optimal result (if using Random packing method). The purpose of this fork is to speed up the time of computation of BruteForce while retaining the packing efficiency, or combine two methods to get optimal result in a satisfying time.
To easily compare productivity of old and new versions, see https://github.com/Korinin38/xatlas-comparison.
Additions
Computing charts
No changes.
Packing charts
Changes
Reason: If texelsPerUnit or area captured are large enough, it may lead to undesired result.
PackOptions::rotateCharts
is renamed toPackOptions::transposeCharts
(which is more accurate description of its purpose);PackOptions::rotateCharts
is now used for actual rotation.