How to make a hexagon grid - Unreal Engine 5 Tutorial

  Рет қаралды 1,291

Gisli's game development channel

Gisli's game development channel

Күн бұрын

0:00 Intro
0:57 Create hexagon tile in blender
3:21 Understanding how to make tiling hexagons
6:39 Implement a hexagon strip in Unreal Engine
16:55 Implement the full hex grid in Unreal Engine
This video tutorial shows how to create a hexagonal grid and strip using Blender and Unreal Engine. We start by making a single hexagon tile in Blender, noting the specific measurements used.
Then, we explain the properties of the hexagon tile and how it needs to be tiled. Finally, we guide you through creating the hexagonal grid in Unreal Engine, step by step.

Пікірлер: 27
@waltch5711
@waltch5711 Ай бұрын
This is how a tutorial should look like. Great video.
@gisli
@gisli Ай бұрын
Happy to hear! I'll hopefully be able to make the next one in the series soon!
@Zurlak
@Zurlak Ай бұрын
Thank you very much! This is a very cool video and I got it! I really hope for new lessons. This is the only lesson in which I was able to do this.
@gisli
@gisli Ай бұрын
Glad you liked it! I've started to work on the next lesson so hopefully it'll be ready soon
@squidz2720
@squidz2720 25 күн бұрын
Great video man! Would definitely like to see more of this series!
@gisli
@gisli 19 күн бұрын
Glad to hear! I've already started the next chapter so hopefully you won't have to wait long
@MrButiier
@MrButiier Ай бұрын
Thanks for another great tutorial! Very clear and concise.
@gisli
@gisli Ай бұрын
Thanks! Your comment means a lot!
@t3hpwninat0r
@t3hpwninat0r 12 күн бұрын
Great video! I had wondered about how to do the coordinates calculations for this in the past but I'm not good at math and wasn't even sure if hex grids would be better than square grids in my project so I gave up on that and just used a simple square grid. There is only one piece of feedback I have: you can combine the nodes into a function that takes the loop indices as inputs and returns the coordinates of the static mesh instance as an output. You could even add a boolean input "WorldCoordinates" to return world coordinates in the output rather than each tile's actor-relative local coordinates to make the function more useful. This does two things: first the graph will look much cleaner and second you can call this function from another event graph to find out where to place something if you want it to appear on top of a specific tile :)
@ToppledTurtle834
@ToppledTurtle834 2 ай бұрын
Modulo gives you the remainder of number after dividing it by the number you put in. So every even number divided by 2 has a remainder of 0 and every uneven number will have a remainder of 1. If you would input modulo 3 it would return a 1 every third number as every 3 integers the cycle of what remains after dividing repeats
@gisli
@gisli 2 ай бұрын
Again, great explanation. I've always just thought of the modulo operator as a "trick" to figure out odd or even numbers and this clears it up!
@3DWithLairdWT
@3DWithLairdWT 2 ай бұрын
Works great in C++ as well :) Just have to make sure you load in the Static Mesh you'd like your UInstancedStaticMeshComponent to create instances of
@gisli
@gisli 2 ай бұрын
I was thinking about making a quick video to show how to do this in c++ the way that you mentioned, or at the very least clean the blueprint code. When I make the next tutorial I will have made this part of it more stable and easy to understand, don't think I would give this code to anyone tbh :p
@ToppledTurtle834
@ToppledTurtle834 2 ай бұрын
The reason for that being the sqrt(3) *size is simply pythagoras. We know a side=size. if you make a right angle triangle from the middle to a corner and to the middle of a side you get a right angle triangle with sides: 1*side for the long side and 1/2*side for the other side. let's say side=x to make it easy and solve: x^2-(1/2*x)^2= (hight/2)^2 or 3/4*x^2 = (hight/2)^2. This as 1/2^2 is 1/4 and 1 -1/4 =3/4 Then take the sqrt of both and you get sqrt(3)*sqrt(1/4)*x=1/2*hight or sqrt(3)*1/2*x = 1/2*hight. And this finally gives hight = sqrt(3)x
@gisli
@gisli 2 ай бұрын
Awesome! thanks for this explanation, it really helped me understand this better! The more I learn about how this works, the more I want to remake the video to include the full information. Its not complex when its laid out like you did
@PawsmonautGames
@PawsmonautGames 2 ай бұрын
Great tutorial, thanks! Keen to follow this series for a future game.
@gisli
@gisli 2 ай бұрын
Thanks alot! I think there is a huge potential to make interesting tutorials on the subject that will inspire people to make awesome games
@PawsmonautGames
@PawsmonautGames 2 ай бұрын
@@gisli For sure! Key areas I'd be interested in would be 1: applying noise patterns to the procedural generation so you can create 'biomes' of hexes, and 2: having hexes able to know what type of hex their neighbours are :)
@lukebrowell9062
@lukebrowell9062 14 күн бұрын
Imagine that your hexagons are each made of 6 equilateral triangles. Now imagine a grid of equilateral triangles, each alternating its direction either pointing up or down. Now look at your formula for height: Square root of three multiplied by the radius (which is also the length of side of your equilateral triangles). An equilateral triangle can be split into two right angle triangles. Now look at how Pythagoras can be simplified for your use case.
@gisli
@gisli 11 күн бұрын
That's a great explanation! It really looked like "magic" but now I have a pretty good understanding of this
@renemiche735
@renemiche735 Ай бұрын
Nice, clear and simple! Thanks. How to interact with the grid now? Like case selection and paths ?
@gisli
@gisli Ай бұрын
Thanks! I'm thinking about starting with selection first and showing how to do a highlight when you mouse over the grid, and then do "something" when you click on it. Doing a path is pretty interesting. There is probably an algorithm for paths on a hexagon grid that I would have to learn before I make a tutorial. Sounds pretty fun!
@Murmur95
@Murmur95 22 күн бұрын
next tutorials when? I was hoping to randomize terrain on the hexes but I noticed that they are all the same material.
@gisli
@gisli 19 күн бұрын
In this video we are using Instanced Static Meshes so if you apply a material to it then all the tiles will end up having the same material. I'm still working on the next one! happy to hear that you are excited for it. gives me motivation to make it even better :D
@HajahBoy
@HajahBoy Ай бұрын
i'm using unreal engine 5.3,my project file map are failed to load map problem & i'm try autosave map open but unfortunaly same at this map, please resolve my problem 🤕🤕
@gisli
@gisli Ай бұрын
Hi, Its very difficult to figure out what the problem is with so little information. It sounds like something happened that corrupted your file and if you are not using source control like perforce or github then there is not much to be done Do you have a backup of the map that you can restore? Hope you find a solution!
@HajahBoy
@HajahBoy 29 күн бұрын
@@gisli thank you bro i'll solve problem but late seen your comment😅
Unreal Engine Interaction - Event Dispatchers tutorial
10:28
Gisli's game development channel
Рет қаралды 5 М.
Unreal engine 5: Enable click event (Blueprint)
3:07
Clip maker
Рет қаралды 171
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 16 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 61 МЛН
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
00:18
123 GO! HOUSE
Рет қаралды 17 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 4,5 МЛН
Shader Basics: Creating a Master Material
29:21
Future Material Artists
Рет қаралды 171
What's a hex grid? How to make? (Unreal Engine)
12:23
AziApps
Рет қаралды 424
250,000 Random HexGrid Tiles in Unreal (UE4/UE5)
18:37
StayAtHomeDev
Рет қаралды 10 М.
Unreal Engine Interaction - Click on actor tutorial
13:22
Gisli's game development channel
Рет қаралды 30 М.
One Easy Way to Manipulate Instanced Meshes (HexGrid Devlog)
12:58
StayAtHomeDev
Рет қаралды 9 М.
Simple Actor Movement in Unreal Engine 5 - Step-by-Step Tutorial
16:54
Gisli's game development channel
Рет қаралды 11 М.
I'm back from my game dev detox trip!
5:19
Gisli's game development channel
Рет қаралды 66
Unreal Engine interaction - Trigger an event on all actors in the world tutorial
10:42
Gisli's game development channel
Рет қаралды 3,3 М.