Dynamic Landscape behavior using the Engine classes

Hey guys,

I am working on a prototype for a desert survival game, and I want to replicate the look of Journeys desert setting. Of particular interest to me, are deforming the heightmap with the players footprints and ‘sand waves’ as the developers at thatgamecompany dubbed them, which are fluid simulations that mimic the behavior of windblown sand.

I am well aware that this functionality is not supported by the engine out-of-the-box but am enthusiastic to implement such an extension myself.
I am experienced in C++ and Unreal, but this is the first time I will be attempting to do something that the engine is not designed to off the bat.

From my readings and trawlings of the forum posts regarding this subject, the general impression that I am getting is that I should just go ahead and start trying stuff out by extending the Landscape class, which I’m doing right now, but I figured that I would need all the help that I can get for this.

This is where you guys come in!

Any and all information/github repos/tips regarding how to get Landscape actors to even spawn in game through the complex weave of interacting classes that are wrapped in preproccesser defs would be greatly appreciated. I’ve looked through some forums where the Epic Staff pointed out the classes of Landscape that are most relevant (LandscapeProxy, Landscape, LandscapeInfo), but even so I am at a loss for where to start with any definite confidence in what I’m doing. =/

Thanks!

Much luck on this, I’m not helpful with C++ in this instance but just wanted to ask: Do you need to alter the landscape? Almost everything I’ve seen about surfing/footprints in Journey might be handle-able with spawned meshes, normal maps, or material displacement.

Otherwise I would just be careful with which functions you rely on. If i remember some issues we’ve encountered before it turned out cooking became an issue as some functionality for editing landscapes was tied to Editor code and that would fail on cook. We had to do some funky business to get everything in order but i don’t know what it was.

Hey RimmyD!

Thanks for the reply.

I was thinking along the same lines once I saw the complexity of the task here, however I do believe it might be necessary to alter the landscape.
The method as used in Journey, by the description of thatgamecompanys own programmers, used three varying heightmaps.

Very interesting read by the way.
Anyway, it MIGHT be possible to replicate these effects using other methods, like material displacement for instance, however landscape doesn’t seem very conducive to dynamic materials on the whole, and it might just end up being more complicated to fine tune and get to look good as opposed to the heightmap method (which honestly just shouldn’t be this complicated to make happen)

The heightmap editing is actually super straightforward, it’s just that Unreal engine is not setup to make it happen easily. =(

Also, I’m pretty paranoid about breaking the cooking build by relying on Editor only code so I would probably just write my own classes for most stuff. Or so I think at this point.

Would appreciate your thoughts on this.

Procedural mesh generation is also another way yes, but honestly it more or less amounts to the same thing in the end.

Landscape or procedural mesh, I need to write a heightfield importer/vertex data generator, followed by creating tangents, binormals, collision data etc.

Aaaah, the more I think about it, the more this task seems daunting.
From your statements it seems that you have worked on a project relating to something like this.

Might there be a repo somewhere that I could reference in this dark hour?
Thanks again for this, just having someone to mull it over with is a great help! =)

Right on. Just verifying some options :).

I’ve not seen a specific cookable implementation of Landscape yet (not due to difficulty but more to necessity).

I’ve seen a decent amount of people using dynamic mesh generation to handle this sort of work but it lacks the built in optimizations and tools of landscape so would need to create those separately.

Sadly no, this was other peoples work for proprietary projects.

I do remember this public project from a bit back that was going well called something like Project Eden. Might be worth a look through his forum post where he tracked his WIP.

He creates a quad-sphere with location based LODs and distorts with a heightfield if remember correctly. Not exactly what you want but could lead to some inspiration or ideas as I don’t think he uses landscapes.

This project is impressive as hell. It’s always been my dream to build a procedural planet generator in Unreal 4.

This guy went and did it now. =)

Thank you for this! I now have a proven working alternative to Landscapes. I do have some experience with procedural generation so might even be easier to just go that route.

In either case, thanks a ton man! People like you make the world go round! =)

It’s a bit challenging but i think really it’s just a LARGE task. So as long as you don’t get frustrated or bored I don’t see any reason it should be truly daunting.

Break it into pieces and ask any other specific questions along the way. Starting a Forum post as he did can draw some attention and be a jumping off point for discussions as well.

Found a way to implement something similar to what I wanted using FProceduralMeshComponent and a collection of examples so very nicely compiled by SiggiG.

That’s pretty awesme, glad you have a good direction. Make sure to mark it as an answer!