So I’ve been trying to get things working for procedural map generation. My end goal is pretty simple. A top down game with a tile system (or hexagon?) I just want to use 4 or 5 textures to blend together and basically have a grid layout like this but having some height information to each tile Having a go at random corridor generation in UE4 - YouTube
How I’ve been trying currently is using a square 1 polygon tile and then applying a material with color, normal, height etc. that blends between the textures. So grass and dirt, etc. The problem with this method is that collision cannot be generated based on a height map.
What would be some workarounds for that? Or would there be an entirely better way to go about it? Because how I’m doing it now is a grid block system and it’s quite hard to get natural blending between each square tile.
Would I want to try out landscapes? Something like this https://www.youtube.com/watch?v=39uMosogVog would be perfect since it generates the colission but I have no idea where to start to get something like it
What do you mean collision can’t be generated from a heightmap ? :
Also one of your imgur links aren’t working, maybe that’s partially why you’ve not had any responses, I just got ‘one’ of them working today but the other remains unworking for me at least.
Thanks for the reply. I checked both imgur links and they load fine. Weird.
Collision can’t be generated from a height map on a material that tesselates the object via the world displacement and tesselation modifier on the material. At least from what I researched. If there’s some way for a material to produce the collision map I would love any pointers for that. Because how I would like to have it is the terrain is generated by a material with the heightmap instead of using landscapes because landscapes can’t tile and the way i want my game is via tileable assets.
Alright I will try my best to explain everything from your post(I will even have a go at creating a project file to replicate what you want if you like when I get home, for practice).
The Youtube video showed used a blueprint with the contruction features to spawn a static mesh next to itself in a random direction, unless an object was already there(ocupying the space) thus creating a randomly placed corridor.
TODO this(better then the video did) you would
create a mesh with blueprint which spawns a title next to the mesh on spawn(this should give you the same results as the video)
Add a bool check using a line trace to detect if their is an object in the area where it will be spawned.(if there is then don’t spawn and spawn somewhere else)
If you want to make it in a more grid pattern(it becomes more compicated using this method and it would quickly become a resource hog. As for colisions your using a material to create the landscape(if i’m mistaken then let me know) which creates a problem because as far as I know colusion boxes are fixed
However I think you can use the mesh itself as a colideable object(if you change a property of it) However its important to note that in the 2nd YOUTUBE VIDEO!! The guy had created those meshes using a 3d modeling program instead of a material.(gtg)
This is exactly what I’m looking for. And I would be more than grateful if you want to try and replicate a project file for it. I’m pretty new and bad at this stuff as I’m just an artist haha.
To address your last point tho, I would really like to create the landscape with the materials, because it gives it the best bang for the buck. Between variety and blending as the material spits out the actual 3d model with all the hills and crevices and what not. Would there be some other way you would recommend still being able to have the grid pattern but having textures/meshes blend together? The only way I can think of, while using the method you outlined, is to manually create dozens of variations of mesh tiles that fit together. But this would take a lot of time and articulation and for my game I don’t have that kind of time because I want several different worlds to be on which would requires hundreds of tile meshes and textures.