forum

[Archived] Weird slider points

posted
Total Posts
9
Topic Starter
wCGN0ae6
osu! version: Stable 20200704 (latest)

I'm trying to parse myself a beatmap in order to make edited videos. The problem is that sliders does not respect their points:



I know that somewhere it says that if the lenght in .osu file is less than the actual slider length, the slider will continue in a line until it hits the theoretical length. But that's not the case here, since the center of the last circle on the slider IS NOT on its point, even when playing the map. I noticed some problems with bezier sliders too, didn't looked into it, but now I'm quite sure the same thing is happening

Is there a way to calculate the "true" points? In the image shown above, the second "true" point would be in the center of second circle (moved top-right compared to how it is now)
Zelzatter Zero
Your wording is a bit hard that I have to delete my post in order to see what I was wrong here, orz, but whatever.

I think there's some misunderstanding here, the sliderlength they're talking about is the one on the timeline. For example:



This slider lasts 1 beat (in the metronome), which means the length of this slider is 1 beat.

Additionally, .osu files stores anchor coordinates, which means there's no way to calculate the "true" points unless you Ctrl+G it (which will change the role of sliderstart and sliderend). This leads to situations where points can be like this:



or even like this:


(This one however, you have to modify through the .osu file manually, it's nearly impossible to do it in the editor)
Topic Starter
wCGN0ae6
But without the last point, how do I calculate a point on the bezier curve given the progress?
Zelzatter Zero
You don't...?

Just Ctrl+G them and then Ctrl+G again. The slidershape will mainly be the same throughout the process, but the end point will be exactly in the center of the sliderend. (But remember, Ctrl+G on bezier slider is not atomic, applying that to 3+ points will result in irrevesible slidershape changing)
Topic Starter
wCGN0ae6
I mainly wanted to not edit the beatmap, but parse it how it is...

How Ctrl+G works? Maybe I can replicate the behavior during parsing

Why beatmaps are built without the right alignment?

How osu! calculates the bezier curves if it has only the "anchor" points as input?
Zelzatter Zero

wCGN0ae6 wrote:

I mainly wanted to not edit the beatmap, but parse it how it is...

How Ctrl+G works? Maybe I can replicate the behavior during parsing The main purpose of Ctrl+G is reverse the selection, when apply to sliders, it will change the role of sliderstart and sliderend (sliderstart will become sliderend and vice versa) whilst maintaining the slidershape. though it sometimes doesn't work as intended, especially with slider with 3+ bezier anchors

Why beatmaps are built without the right alignment? Literally who cares wtf

How osu! calculates the bezier curves if it has only the "anchor" points as input? This article would be the best answer for this.
Death
This lazer code should be very similar to how stable calculates the path of a slider using its anchor points:
https://github.com/ppy/osu/blob/8d7a3564692853df695db106bdc54d4d7ea59740/osu.Game/Rulesets/Objects/SliderPath.cs
https://github.com/ppy/osu-framework/blob/5686884bcce9228687a8cf44a052f3580c56f36c/osu.Framework/Utils/PathApproximator.cs

Not only does the path use the position of the anchor points, it also uses the expected length of the slider, which is what I believe Zelzatter Zero was trying to explain. I think this might be the bit of code that handles that in the lazer, but I haven't spent a whole lot of time looking at it:
https://github.com/ppy/osu/blob/8d7a3564692853df695db106bdc54d4d7ea59740/osu.Game/Rulesets/Objects/SliderPath.cs#L247-L277
Topic Starter
wCGN0ae6
Thanks for resources. Having the code of an actual parser will be very useful. I will come back here to ask questions if necessary
Not Blackbuck
I am working on a parser and deparser of my own reconstructing .osu file from minimal features (for my own ai model) and the last (i hope its last) issue i am facing is havng calculate the slider length as i need it to make the timing point which will affect its behaviour. I have tried the resources and the calculations are not coming similar.
I am recontructing the slider length from the slider points, is there some code that does this?
Please sign in to reply.

New reply