logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Custom Unity Line Renderer With Actual 3D Geometry

A Reddit user survivorr123_ shared their Unity component that leverages Burst and Job system and efficiently handles thousands of points.

LineRenderer3D offers functionality similar to Unity's built-in Line Renderer for drawing lines in 3D space but with actual 3D geometry. Built with performance in mind, it's capable of generating huge amounts of geometry without causing a significant performance impact, thanks to leveraging the Job system and Burst compiler.

According to the developer, generating a line with 2048 points at 16 resolution (resulting in 65k triangles) takes approximately 1 ms in Editor on an AMD Ryzen 7 5700X. Similar implementations often face problems with uneven thickness due to skewing and inconsistent vertex alignment. However, LineRenderer3D ensures that all generated meshes maintain high quality and automatically resolves these issues.

The developer, a Reddit user named survivorr123_, originally created LineRenderer3D to animate a grappling hook in their game. After several months of work, they reworked the tool and published it on GitHub. Compared to Unity's Splines, LineRenderer3D is significantly more efficient. For instance, when creating and animating a simple spline with around 2k triangles, it takes 1.5 ms per update. In contrast, LineRenderer3D can generate 65k triangles in just 1 ms.

See the original Reddit post here and get LineRenderer3D by clicking this link. Also, don't forget to join our 80 Level Talent platform and our new Discord server, follow us on InstagramTwitterLinkedInTelegramTikTok, and Threads, where we share breakdowns, the latest news, awesome artworks, and more.

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more