Sign in to follow this  

Finding the changes between several Heightmaps.

This topic is 681 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This has been racking my brain, and jammed me up pretty good.

Starting with a base Heightmap for terrain, I have some number of other heightmaps derived from that one. They might even be some arbitrary piece of the old one that has changed, instead of being the entire map.

 

The idea is that the engine when loading up mod packages, will load up the landmass edits, and apply them.

So... I got one part of the pie working just fine. If the changed landmass is only a piece of the world, and no other changes has been made to it by other files, it will load in just fine.

 

The next part is what happens when two different edits has been made in the same tile? The way the engine is currently handling things... the last thing loaded in takes effect. So buildings and junk are now under ground... or floating above ground?

 

How would you go about blending that?

 

Or... am I just being stupid and making this more complicated than it has to be? In retrospect I am starting to wonder if I should just use a decal system...

Share this post


Link to post
Share on other sites
Merge conflict.



This has to be resolved the same way any complex data gets resolved: with human decision making. Accept one version over another, or reject them all, or whatever; but someone has to intelligently make that call for each situation that arises. No amount of software magic has yet proven capable of reliably merging arbitrary data of this nature.

Share this post


Link to post
Share on other sites

If you mark the altered region of the modded heightmaps with a rectangle stored in the mod, you could keep track of altered regions and if a mod wants to alter a region already altered (rect->rect collision) you could display an error message ("warning: this might cause inconsistencies" or something), ask user to select which mod will take affect or whatever suits your engine best :)

 

I can't help thinking about Bethesda's Gamebryo engine, where the order of mods is very important (gamers often use https://boss-developers.github.io/ to solve those conflicts for them)..

Share this post


Link to post
Share on other sites

This topic is 681 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this