Conditions for Sharing Custom Extensions

Hello,

I made a neat extension for path postprocessing as a MonoModifier that implements the path smoothing algorithm suggested in Han

I would like to share it with the community but am unsure about the conditions - am I allowed to share that stuff for free with a paid model being around and all?

Cheers

Hey. That’s a fascinating paper! Now want to implement that algorithm in the core package!

Of course, you can share your code. It’s your code, after all.

Here you go then:

It is not 100% perfect - some memory allocations could be avoided and there are some very rare local errors (as in non-optimal result). Maybe someone can track those down - I wasn’t able to find it :slight_smile:

1 Like

Thanks!

I read through the paper implemented my own version, which I will be including in a future update (the funnel modifier will automatically use this algorithm on all grid graphs).
There were many edge cases to handle. But I think I got it quite performant and accurate (there is only one failure case I know of right now, and that’s pretty unlikely to actually happen in a game, and even in that case it falls back to just some slightly suboptimal output). A significant complexity was that I wanted to make sure it worked for layered grid graphs as well as normal ones, I had to reformulate parts of the algorithm to work with that because “find all blocked nodes that intersect a line segment” is not a well-defined operation on layered grid graphs.


For the paths in the above image, it averages to something around 0.03ms per path. I tried hard to make it even faster, but it was tricky. Still, it’s pretty decent.

Good stuff, looking forward to the update! Maybe I should change the thread title to make this more findable :stuck_out_tongue: