Cashgen - (kinda) Infinite Procedural World Generator

Yeah I had a look at it, but it only accepts one heightmap for the whole level. The whole plug-in is massive overkill for what I want anyway. I just need a nice looking water material that I can put on one plane per tile and use a heightmap for wave . I’ll probably look at stripping something simple out of their code.

You might look at making the heightmap a parameter then feeding in the current tile’s heightmap as you move, but I’m not sure how well that would work.

Hey!

Does this system allows making caves and other similar elements? Or is this just generating something like a heightmap? :slight_smile:

Thanks

Just heightmap based terrains this one.

Finally got round to the not terribly difficult but tedious job of adding geometry to hide the LOD seams.

Done :cool:

http://image.prntscr.com/image/346d7bd7a5cc4d2ca3492c69344a9a8b.png

There’s not really a ‘current’ tile as the player can be stood at an intersection of 4 tiles. Basically I need to make something that’s designed for this use case, off the shelf stuff just isn’t quite going to cut it!

@mid_gen: This is an awesome plugin. Have you tested it on multiplayer or is it single player only?

Draw all 4 heightmaps into one texture.

It’s just unnecessarily complicated trying to shoehorn something designed for static levels into a runtime generated, tiled one. Better to just make my own. I originally had a plane for the water per tile and it looked fine, I just didn’t have any nice water shaders so I dropped OceanPlugin in to look nice :slight_smile:

I haven’t tried it in multiplayer yet. In principle it could work but would require a fair bit of work. Have two separate terrains tracking different pawns would work, but you’d need to do some interesting stuff to prevent overlaps when the rendered regions overlapped.

New video with erosion and LOD seam fixes :

Done a little work on biomes and materials.

I have one noise generator for the mountains, one for the rolling hills, and a constant -1 for the water parts.

I blend the mountain and hill generators using a third noise generator. I also pack some information in the vertex colour channels, R = Erosion, G = deposition, B = biome (the values from the third noise gen). So I’ve been able to start making the materials a little nicer instead of just crude height/slope based blends.

The shoreline blend now has some noise added and only appears on ‘hills’ biomes etc.

Hey, as a nice in the material setup, can you enable the possibility to modify some (practically 4) custom textures coverage runtime? I mean one or two kind of road texture and a burnt one to be used around destroyed objects (buildings, vehicles), and one for plough field. Probably a dynamic texture would work, if you want to use vertex colour for something else. Of course, no problem if it is out of focus, I think I can do it…

I’m not much a materials guy I’m afraid. The problem with packing things into the vertex colour channels is that the unit size of the terrain is pretty large when you get up close and the smoothing between vertices can be pretty ugly. I use some noise to make the material transitions a little more natural looking.

You can certainly pack whatever you want into the Vertex Colour information, it’s just a single line of code to adjust it.

Maybe decals would work well for what you’re after? Project a decal from the building onto the terrain? Haven’t tried it but in theory…

yes, for temporary textures decals are fine, maybe they are not the best from the point of view of performance… anyway, these things are really game specific, I will share it once I have time to make it.

Hey @mid-gen,

thanks for your work, the plugin is awesome, is a lot of code to learn (i love learn stuff :slight_smile: ), i have only a little, basically terrain not have collision, could be i miss something?

It should have collision. It uses the Runtime Mesh Component to generate collision and the terrain mesh. I could be wrong.

In the LOD configuration there is a boolean for enabling collision.

Bear in mind that collision cooking is on the game thread, in my testing you will start getting framerate hitches with tile sizes much over 40x40, depending on your system.

Got it, thanks, i will make some test :slight_smile:

Ok I’ve nearly got the grass spawning system back in…but I’m also thinking about what I’m going to work on next year. Also, the plugin is getting to the point where I can’t really go any further without getting into the realms of premature optimisation…how you want to tune the terrain and how complex your materials are will depend really on what you’re using it for.

I am going to freeze the plugin in the new year and just clear out the remaining bugs, clean up and comment the code properly, and then write up a few devblog articles describing the techniques involved. Some real world examples of multi-threading etc I think would be useful to people.

The code will remain on github so anyone feel free to carry on playing with it, I’ll accept pull requests or contributors.