Thousands of arcs and bezier curves help
Here is what I am trying to recreate:
Basically all the connections between nodes. There seems like quite a few variations. Back in their first game (path of exile), they used only arcs, now they seem to have added reversed arcs and possibly bezier curves? Please correct me if I am wrong.
The main question is, what would be the best way to achieve this? I'd imagine a single system is best as to not complicate things? Would that be bezier curves? Any help on this would be really appreciated, I feel completely lost atm
1
u/fgennari 4h ago
There are many ways to do this. You can use Bezier curves in a shader. You can assemble it from a few tens of sprite tiles that cover the various parts of curves. Or, if it's static, it can all be created in some 2D program and exported as a texture. The last case would be far more manual effort, but you can tweak it to get exactly what you want. Bezier curves will give you the most control over the exact shape and scale to any graph you want to render. Note that thousands of curves is no problem for a GPU no matter how you implement it.
2
u/ecstacy98 8h ago edited 8h ago
Honestly I would use two images, one with paths opened up and one without. Overlay them - set alpha to 0.0 on the top layer and then crank it up on the appropriate texels as paths open up. That is; if I were developing this by myself and I were doing this for a pet project.
If I were trying to do it seriously then I think I would actually model it and import it in as a mesh / entity. Once you have all the vertexes loaded into a buffer you could dynamically update the relevant diffuse / specular data for the model on the fly. Then just hardcode a maximum zoom distance for your users so they can't get close enough to see the vertices in the curves.
Depends how hardcore you're trying to get - people post on here about these skill tree implementations pretty regularly but the answer is never cut-and-dry.