Navmesh, Materials, Axis-Aligned Bounding Boxes

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=U_8MJ4fYzOs



Duration: 1:30:54
29 views
0


Today we talked about three things:


1) I found some good resources for free art assets. I'm not an artist, so I rely on free or paid assets to do my work. Polyland is a nice site for free textures and models. Humble bundles of asset packs also occasionally go on sale to get a lot of assets on the cheap. I went over building a material from scratch using some of the texture samples from that site.


2) Second, we talked about navving characters around. You need to first add a navmesh to your world by dragging in a navmesh volume from the panel on the top right, scale it up to cover your world (or not, if you just want some areas navvable), hit p to see if the navmesh is being generated properly (it'll turn green on areas the AI can walk on) and you can click on the other navmesh entry in the world outliner to change the properties of the navmesh to adjust for things like different step heights or walking angles.


Then put a character (a character is something that can move itself around) into the world - I used the Paragon assets to do so, and use the blueprint nodes I showed in the video to have them nav towards the player or nav randomly around.


4) We then talked about boxes. Boxes and circles are the most common way of accelerating collision detection, ray tracing, and so forth in 3D game engines, especially the AABB (Axis-Aligned Bounding Box), which is a rectangle (in 2D) whose edges are all either parallel with the x or y axis. This makes the math to do a collision test with a ray, line, or line segment really, really easy. y = mx+b all the way. Just substitute in the box's xmin and see if the y you get out is between ymin and ymax, and do the same for xmax. Then substitute in ymin for y in this equation x = (y-b)/m, and see if the x you get is between xmin and xmax, then do the same for ymax.


Pretty easy to write, and pretty fast. Though it can be accelerated by a RTX video card in a data structure called a BVH, which is basically boxes inside boxes inside boxes, making linetraces real fast to see if they hit anything.







Tags:
is50b
aabb
ue4
materials
navmesh
AI movement
line box intersection
axis aligned bounding box
rtx