Dynamic Geometry Rendering

preview_player
Показать описание
Time for another really fun exploration of the World of Zero Arcade. We're changing the project slightly and focusing on an abstract SHMUP game based around geometry. To kick things off we're going to focus on building the geometry itself. This is going to be done almost exclusively with Unity's Line Renderer.

To get that working fully we're going to need to build something that can render basic geometric shapes. We'll start there and, using steps around a circle create uniform polygon's that we can render to the screen. That's the easy part.

Next we will move on to animating the shape so that as vertices get added or removed from the shape we can dynamically adjust the vertex positions of the shape efficiently and smoothly. The end goal here is a fully dynamic uniform polygon drawn using a unity line renderer that can adjust it's number of points at run time and handle those changes smoothly. For the most part we accomplish precisely that!

Рекомендации по теме
Комментарии
Автор

This is going to be so useful to me. I will use it for medieval random city generation identity loops. And kind of like your game, the more sides to the polygon, the bigger the city. But the little lerp thing you did at the end sealed the deal for me. I just saw many beautiful city centers shapes.

Nemega
Автор

You are a legend! Thank you very much. Your content is amazing!! Keep up!

xaxababa
Автор

bro you have got some serious skills man i want to be reach your level.

wellwisher.
Автор

It should be something like:

Vector3[] GenerateDots(int count, float radius)
{
List<Vector3> dotsList = new List<Vector3>();

float da = 2 * Mathf.PI / count;

for (int i = 0; i < count + 1; i++)
{
Vector3 dot = new Vector3(
radius * Mathf.Cos(i * da),
0,
radius * Mathf.Sin(i * da)
);
dotsList.Add(dot);
}

return dotsList.ToArray();
}

UCHAaweAXMlymYSevqSw
Автор

Hey World of Zero this was a great tutorial, appreciate the way you did that & learned something from this. Could I offer a small piece of advice - it's heaps better to have a 2nd monitor off-screen with the finished code on it when you're doing these types of screen-casts. It will make you look like a magical uber programmer and save people watching a bit of time, everybody wins :)

karmatraining
Автор

Could you explain a bit more how you made the glow effect on that, that is exactly the look I have been trying to get. I have the image effects asset you linked in the other comment and have been playing with it but cant get anything close

mikesirman
Автор

Nice Tutorial Dude. Quick Question. What material did you use on the LineRenderer? Thanks :)

artrising