x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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!

Product Version: UE 4.11
Tags:
more ▼

asked May 22 '16 at 08:38 AM in C++ Programming

avatar image

Nightmask3
57 6 11 15

avatar image RimmyD May 23 '16 at 06:24 PM

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.

avatar image Nightmask3 May 23 '16 at 08:06 PM

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.

http://www.thatgamecompany.com/forum/viewtopic.php?p=11191

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.

avatar image RimmyD May 23 '16 at 09:25 PM

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.

avatar image Nightmask3 May 23 '16 at 09:49 PM

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! =)

avatar image RimmyD May 24 '16 at 02:46 PM

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.

https://forums.unrealengine.com/showthread.php?85084-The-Eden-Project

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.

avatar image Nightmask3 May 25 '16 at 02:22 AM

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! =)

avatar image RimmyD May 25 '16 at 08:39 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

https://github.com/SiggiG/ProceduralMeshes

more ▼

answered May 28 '16 at 02:25 AM

avatar image

Nightmask3
57 6 11 15

avatar image RimmyD May 28 '16 at 06:00 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question