🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Line rendering for path visualization

Started by
0 comments, last by Thibault Ober 3 years, 11 months ago

I am currently working on a way to display the path agent are going to take on a given scene. The path will be drawn on top of the terrain and have a width which depend on the agent size, the shape will be computed using a biArc curve. If possible I would like to use this feature for other purposes like drawing trajectories…

I am kinda new to line rendering, so I would check on the expert on the subject (snooker and golf game)

Now I am wondering how to achieve this effect, I like the fact that the line are not always facing the viewer, they have their on normal which change along the path.

I think I would sample my line on the cpu, compute a list of points and send them to a geometry shader. The shader should try to compute the quad and their intersections.

Do you know some important caveat or some other approachs to this problem ?

I would also like to show the direction using arrow or animation, if have any ideas i am listening.

biArc:

http://www.ryanjuckett.com/programming/biarc-interpolation/

draw line 2D:

https://blog.tammearu.eu/posts/gllines/

This topic is closed to new replies.

Advertisement