-
-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Add BlendSpace BlendPoint weight transitions by velocity limiting #105923
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
base: master
Are you sure you want to change the base?
Conversation
9cdd42e
to
9b20f94
Compare
It looks like you have multiple implementations mixed up (weight implementation and smooth implementation can be separated). But from a quick look, I think it makes sense to have the BlendPoint have weight. However, I am quite skeptical of the need for time-dependent smoothing using If you want to adjust the slope of the blendmap, you should not use Or, if it matches the your usage, I think we could welcome the approach of adding a new AnimationNode like GradientSpace2D that places a number of circles with blur. |
9b20f94
to
88f473e
Compare
For explanation, first assume that the vertex weights are all Consider the current point P in triangle ABC. Draw a line from vertex A through the current point to intersect line BC. The intersection with line BC is A', and the weight of the A can be calculated as follows:
Here the weights are linearly interpolated in the range 0 to 1. Then, you can remap it to an arbitrary curve interpolation (smooth_speed is used as the abruptness of the curve). This is also done for B and C. Finally, each point is multiplied by its weight and divided by the total weight to normalize and you should be able to remove the move_toward and time base delta. BTW, the implicitly normalized So you should probably either "make normalization optional (default is true)" or "force normalization and rename it to |
I'm not removing time delta since that's not the point of the PR. The point of the PR isn't to change how the weights are applied across 3 points in a triangle, the point of the PR is across the entire blendspace. I'm not here to change the curvature of weights I'm here to change the fact there is no way to quickly transition from triangle ABC to triangle GHI without going through DEF and applying the weights fully causing animation jank. Just smoothing the BlendPoint.Smoothing.mp4 |
So are you saying that you want to discretely divide the triangle and crossfade the invalid / valid vertices when the current point cross the boundary? If so, delta might make sense, but at least it sounds that it should be a property called transition duration or blend time, not smooth. And in that case, I think that fading property can be enabled in DC mode as well. Also, I think it would be clearer to have a If you want to set the blend time for all vertices at once, you can use In this case, instead of having a |
Yea it's something among those lines. DC can definitely be done as well I just did continuas as that seemed like the logical first place. I only named it smoothing since that's what it was called in UE and I have no real other reference for such a feature. I'll definitely look into implementing your suggestions when I can. |
4cc14d6
to
457810c
Compare
16fe32c
to
615eb2e
Compare
4726f46
to
ba22d29
Compare
Once I made it a draft, so please mark as ready to review when finish working. If you have any other questions, you can mention or DM me. |
aeb86e3
to
e8c9ff9
Compare
e8c9ff9
to
5252abb
Compare
Closes godotengine/godot-proposals#12335
Still need more input on the proposal to improve usability but its pretty much done for the most part. This is my first PR did the best I could but I'm sure some things can defiantly be improved.
Implementation of blend point weight smoothing
Demo project file