How to make a button to procedurally generate terrain/give coordinates?

I know the question is very specific, but this is basically what I’m trying to do:

Trying to make a game inside a submersible with 3 lever/interactive objects. 1 moves an X coordinate which displays on a radar of sorts, 1 moves a Y coordinate, which is displayed as a depth gauge on the side of the radar, and the final interactive object would be a Stop/Start engine. How could I make it so when I press the ‘Stop’ engine, the terrain underneath would be both procedurally generated, and be saved for future reference? So when you exit the submersible through a hatch, the ocean floor (dependent on the Y Value) would be randomly generated. The submersible isn’t moving, as that would be far to complex for me, (Although I’ve dabbled here and there in Unreal for a year doing level design I’m still extremely new) so when the fake coordinates would say something like, " X 500" I could head back into the submersible, leave the current procedurally generated terrain (Let’s say “X 1000”) Head back into X 500, and the terrain would remain the same? First time posting on a forum, and to be honest probably to ambitious an idea.
Another idea, albeit much more simple, I have to try to get around this, is to have a terrain generated upon loading, and instead of generating/streaming new chunks every time the person stops the submersible, the landscape would move instead.

I’m very passionate about this idea/project, and any help is super appreciated

Its not impossible, but find a better engine (and a forum with actual support).

Ue4 is a mess.
Most features don’t allow altering geometry in runtime.
Potentially the peocedural mesh component is a workaround.

Conceptually.
Writing a PNG16 - the standard for heightmaps - is expensive.
Doing so at runtime is ill advised in any system (and you’d need that to save the terrain data).

Data being data, you could just set up a multidimensional array and store height values directly.
This too is expensive, probably just as much yet maybe a little less.
The costs come in while processing (much like the image) - since you dont have to generate a file you have a step less. And no need for file I/O since you can possibly store it in a save game.

Either way, the concept is similar (been the same for 20 years).
You store the Z value of each vertex of set size mesh.

This often does not update collision with most engine tools, which is where possibly the procedural mesh component could help.

On older stuff - Cave, the game - this process would occur with both visual and collision geometry (To be more precise, Cave used a Matrix to generate the terrain, same diff though).
UE4 is literally unable to do that out the door (using landscape or a mesh) without major tinkering.

Performance wise, you want to look at write times when dealing with image files (varies grately on the system), and Processing times when dealing with data sets (varies grately based on processor speed).

Rendering wise doesn’t really matter (because you are acting on Ram/CPU).
Additionally, regardless of what you move (sub or terrain) the number of drawcalls and tris on screen are still going to drive (possibly sink, excuse the pun) the performance most.

Now.
Moving terrain is safer for all systems.
Because of floating point precision.

If the player remains at 0,0,0 and everything moves around them, you’ll never reach zones where animation issues start to occur due to a loss in precision - floating point errors.

Either design the world that way, or levarage the existing (or a custom for other engines) rebasing sytem to fix that. Just make the choiche early as it defines how you work.

It’s really not that ambitious, its just that you need some hands on knowledge on 3/4 of the engine or more to achieve it.
Weareas, if you pick something like Godot you may find a proven generation script…

I’m all for learning and doing things myself, but imho the engine has many other pitfalls that would keep me away from it to make something this simplistic…

The other thing you ought to consider is final deployment:
What system does this need to run on? Base your choiches, modeling, artwork, gameplay, etc. On that.

1 Like

Ah okay I understand (Had to read it through several times to fully grasp lol)
I was trying to make a game similar to Barotruama, but in first person and using nanite, megascans, lumen (or raytracing) etc for that creepy, claustrophobic atmosphere. (And I was looking forward to using Metasounds)
But most importantly the water system (And certain assets such as fluid flux made this seem like a dream come true; I image the submersible slowly flooding with real-time water currents inside the already claustrophobic space)
What engine would you say to attempt this on? Unity? Cryengine? Lumberyard? (The main aspects of this concept would be the audio, fluid / smoke physics, and water quality) I’ve downloaded several engines in the past (Hard drive crash so I kept just Unreal) Anyways thank you so much for the reply!

Water is complicated in anything.

One of, if not the best, implementation for fluid is obviously Nvidia’s GameWorks. However like everything Nvidia it’s “discontinued”. Meaning you can sign up as dev, download 5+ year old code, and implement it on your own.

CryEngine does a really good job at maintaining decent rendering performance and looking good. But you really need to know how to code - out the box it doesn’t even have render targets, which for most water stuff you are definitely going to need.

Unity is a bit of a dud on the realistic rendering side. It’s not that it cannot, it’s that the performance it gets with really good texturing/models and a runtime GI is about the same as Unreal’s.

I’d say to try and pull the Nvidia code first, and see if you can implement it into anything yourself - including unreal.
IF you can do that, then try it out, bench performance, and if not satisfying move to something else…
No way to know until you implement and test - and keep in mind that you should test on whatever type of system low specs you want to have as a minimum requirement.

Ah ok, thanks so much! I’ll definitely take a look around Nvidia GameWorks and WaveWorks