-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[3.x] SurfaceTool - efficiency improvements #69723
Conversation
81219f2
to
eeb787a
Compare
hi, just wanted to tell you there is an open pr #68034 (for 4.0) which changes the implementation of the smooth groups. not sure if it's relevant here |
Although the PR you linked looked sensible, I'm not attempting to make any changes to smoothing behaviour in this PR. Any changes should be in a separate PR considered on their own merit. This makes things easier to review. 👍 |
In addition to lawnjelly's comment, note that this PR is targetting 3.x, so that PR is totally irrelevant as 3.x and 4.0 work differently with respect to smooth groups |
my small hope was that maybe it's possible to consolidate some backporting work with this or to stay more compatible to 4.0 (or the other way around) to make it easier to backport things later |
Any changes to 3.x has to be backward compatible, so we can't easily change the existing behaviour. Nevertheless if there was a largely improved smoothing group implementation we could probably add it in parallel (as e.g. a new method) if there was demand and it had proved successful in 4.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the change looks fine to me. I left a few style nitpicks, but the implementation looks good.
eeb787a
to
690a9ab
Compare
Changed to use LocalVector rather than linked lists.
690a9ab
to
ff714fb
Compare
@clayjohn @lawnjelly Is this pr ready to go? |
Yup, changes made. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me. I tested locally and couldn't detect any regressions.
I tested on a mesh made of 100,000 primitive points and this PR improved the speed of creating and committing the mesh noticeably (~15% based on rough measurements)
Thanks! |
Changed to use LocalVector rather than linked lists.
This is actually part of #61568 but has been separated for easier review.
Notes
SurfaceTool
to use vectors rather than linked lists has already been done in master.Areas of interest
Vertex
now has fixed arrays for bones and weights, this allows more efficient access / movement withinLocalVector
s, and we don't support more than 4 bones in 3.x anyway.