Jump to content

Exporting and importing heightmaps without offsets or change in scale. How?


Recommended Posts

Let's say I have a worldspace in a Skyrim LE mod and I want to get the landscape from that worldspace into a FO4 mod.

How would that be done?

 

I know the general workflow would be like this:

  1. Convert the worldspace landscape into a heightmap (I already asked in the Skyrim CK forum about this)
  2. Maybe do some image format conversion magic
  3. Import the heightmap into the FO4 CK

But I want the imported heightmap to be "at the same place" as it was in the original mod.

So for example the "peak" of a mountain in the original mod is in cell 3,-7 and at the position X 100,03, Y 512,3 and Z 4024,01 (just example numbers) I want it to be in the same place in the FO4 worldspace.

So no offset or change of scale, basically a 1:1 copy.

 

I did not have much luck with importing heightmaps in the past, but maybe somebody knows something that might help me with this.

 

I know there is a tool called TesAnnwyn that can make ESP files with worldspaces from heightmaps but that never worked right for me.

 

 

 

Yes, you could do this manually:

 

Open the worldspace in the skyrim CK, hide all objects and markers, show the collision.

Then you can see that every exterior cell is just a mesh with 32 divisions in the X and Y direction, so a grid with 1024 squares.

These squares are split into two triangles,

Then you would just place a static object like a lamp post on every point in the mesh and use the F key to "drop" it onto the collsion.

Then you can see the Z coordinate (height) of that point.

Note that down in a spreadsheet.

Do that for every point in the mesh of the cell.

And for every cell in the worldspace.

 

 

Then do the reverse in the FO4 CK.

Make an empty worldspace.

Place some static object (like a lamp post) at every landscape mesh point.

Set the height of the object to the height of that point that you noted in the spreadsheet.

Go into landscape editing mod.

Drag that landscape point to the height of the placed object.

Then delete the object, so you know you already adjusted the height of that point.

Repeat for every object / landscape-mesh-point and for every cell.

 

It would take a few months of non-stop work but it would be possible to manually "port" a landscape in this way ...

Link to comment
Share on other sites

I've tried to direclty open the landscape from a copy of the original worldspace from Skyrim SE in Fallout 4 CK, and it worked, after many cleanup steps in xEdit (removing eveything but landscape).

The problem is that after generating the landscape LOD, the LOD doesn't work right for some reason, It wont load when you are standing on the ground, but it works perfect when you're "flying" high.

 

You could give it a try, maybe you're luckier than me.

Link to comment
Share on other sites

I was talking about Skyrim LE.

But it makes sense the SE would work better because it is 64 bit and FO4 is also 64 bit.

Looks like I am buying SE after all ...

(What a coincidence, it is on sale right now ...)

 

Did you generate the LOD with the CK or with Fallout4LODGen?

Edited by YouDoNotKnowMyName
Link to comment
Share on other sites

xLODGen
But I don't think the landscape records are any different from LE to SE.
I just duplicated and renamed Skyrim.esm to something else. Then changed the extension to esp, opened it with Skyrim's xEdit, removed esm flag and removed everything but the worldspace, then removed everything from the worldspace except for the landscape data. Then I saved it and loaded it in F4 xEdit, then I added Fallout4.esm as master and replaced all landscape textures to fallout 4 landscape textures. I used scripts of my own to do the tedious repetitive tasks though. I've converted it back to esm in order to save changes to an standalone esp.

 

SkyrimLandscape.esm

Edited by DieFeM
Link to comment
Share on other sites

So I took that file and made the CK start to generate the LOD.

After some time it crashed, but that is ok.

You just need to let the CK start doing the world LOD, that creates a file that xLODGen can read so it knows what to do.

Then I deleted the LOD meshes and textures that the CK made.

I then ran xLODGen.

 

This is the process for generating LOD for a worldspace for the first time, it is always this way ...

 

After running xLODGen it kind of works:

 

Some parts of the LOD work fine, other parts don't show up.

Weird ...

 

Here is a link to the screenshots that I made:

https://drive.google.com/drive/folders/1tdlSxfkyn2fr4NgdoqTdCmsiAw5mjvQT?usp=sharing

Edited by YouDoNotKnowMyName
Link to comment
Share on other sites

Pretty much the same I did, and also pretty much the very same results.

No idea why the LOD doesn't work. You might want to try exporting the heightmaps and importing them, but I have no idea what the proper settings should be so I didn't even tried myself, that's the farest I reached in this matter.

Link to comment
Share on other sites

Ok, good idea!

 

In the "World LOD" window of the CK there is a function to export the heightmap of the worldspace.

I used that and that gave me a heightmap.

 

But when you import a heightmap into the CK you need to say what the lowest and the highest points are.

So I placed something at the highest point of the landscape, wrote down the Z coordinates and I did the same for the lowest point (somewhere outside of the actual playable area, like 64,64).

 

I entered those values in the heightmap import window.

It took the generated heightmap without any problems and after a few seconds it said it was done.

 

The highest point in the map looks good, but the lowest point is a few hundret CK units higher then it should be, so the whole landcape is scaled in on the Z axis.

I will do some more testing to see if it is a systematic error (for example if it is always off by 500 units or always off by 1,2 multiplied by the entered value) and if that is the case I could adjust the entered value to get the desired result.

 

But for now I will use the "imperfect" landscape and generate the LOD again to see if this fixes that problem.

Link to comment
Share on other sites

Ok, that made it a bit better.

I still sometimes get some "chunks" of LOD that are invisible but the game seems to remember "hey that should be visible" and the appear after a few moments.

But it is good enough for me!

 

Now I just need to figure out that heightmap import settings thing and then conv I mean remake all the ground textures and apply them to the worldspace.

See you in a few months.

Edited by YouDoNotKnowMyName
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...