Larian Banner
Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
[RELEASE] Heightmap Import Tool #621696
26/09/17 10:27 AM
26/09/17 10:27 AM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Introduction
========
A tool written in C# to import grayscale heightmaps in DO:S and DO:S 2. There is also functionality for L3DT in the DO:S version but support for that has ended and there is no way to know if it still works like it did four years ago.

Current version
==========
V2.1.1

Download
=======
https://github.com/Celludriel/DOS_Terrain_Importer/files/1337059/DosTerrainImporter_v2.zip

Installation
========
Just unzip the zip file in a convenient folder and open up Dos_Terrain_Importer.exe. This program is safe and can be checked by the community on my open source github. The .net framework is needed to make the program run, although this is installed on a lot of computers by default now. Should it not work try downloading the latest version of the .net framework runtime

Usage
=====

Step 1: create a heightmap
-------------------------------
- Create a bmp file with dimensions (patchsize*33) x (patchsize*33).
- Draw your heightmap with greyscale tints where 0 is the lowest point and 255 is the highest point. I have experimented with different bit depts but saving as a 16 bit image seems to be the safest safe.

Step 2: create a terrain in divinity engine 2
--------------------------------------------------
- Create a new terrain in the level you are working on and make sure the patch size is the size you used in the formula determining the width and height of your heightmap
- Save your terrain in the engine
- Go to your divinity original sin 2 install directory and navigate to your project where your terrain is saved. fe:
\Data\Editor\Mods\Godlings_7ffdb20a-bb9e-4ca6-a3d3-46a3d0c650d3\Levels\ImportTest100x100\Terrains
- Notice the presence of a .data file with a uuid in front

Step 3: doing the import
-----------------------------
- Open up the importer
- press the DO:S 2 button
- Browse for the .data file you just created
- Browse for the bitmap heightmap file you created
- Enter the min height, this is the height the black 0 value will be at
- Enter the max height, this is the height the white 255 value will be at
- Press generate. Generating the terrain is a destructive operation for all the heightmap data, once you press it all previous terrain changes will be overwritten by the new heightmap data.

Step 4: Reload the level
----------------------------
- Go back to divinity engine 2 and choose reload level in the file menu. You should now see the imported heightmap terrain.

Last edited by Celludriel; 27/09/17 12:34 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621773
26/09/17 12:28 PM
26/09/17 12:28 PM
Joined: Jun 2013
Posts: 655
Cromcrom Offline
addict
Cromcrom  Offline
addict

Joined: Jun 2013
Posts: 655
Sounds great, thanks a lot hehe


Un chemin de 1000 lieues commence par un premier pas.

Project:
Steam workshop Frontiere
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621795
26/09/17 12:53 PM
26/09/17 12:53 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Thank you! I'm grabbing it now and will post any results from it. I would highly recommend adding this to the Community Page Submission section of the wiki if you have the time!


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621796
26/09/17 01:00 PM
26/09/17 01:00 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Also, might be good to add a README file in your zipped archive that has the notes you posted here on how to use. smile


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Windemere] #621797
26/09/17 01:00 PM
26/09/17 01:00 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Windemere
Thank you! I'm grabbing it now and will post any results from it. I would highly recommend adding this to the Community Page Submission section of the wiki if you have the time!


experiment with it first, maybe you'll find some bugs that I need to fix. I'm still puzzled why I can't make perfect vertical walls though. There must be some explanation for it maybe because it all works with triangles I don't know yet.

Originally Posted by Windemere
Also, might be good to add a README file in your zipped archive that has the notes you posted here on
how to use. smile


Will do in a bit when I'm a bit less busy smile

Last edited by Celludriel; 26/09/17 01:01 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621824
26/09/17 01:31 PM
26/09/17 01:31 PM
Joined: Jun 2017
Posts: 44
Rada Torment Offline
apprentice
Rada Torment  Offline
apprentice

Joined: Jun 2017
Posts: 44
Good job Celludriel!

Originally Posted by Celludriel

Step 2: create a terrain in divinity engine 2
--------------------------------------------------
- Create a new terrain in the level you are working on and make sure the patch size is the size you used in the formula determining the width and height of your heightmap
- Save your terrain in the engine
- Go to your divinity original sin 2 install directory and navigate to your project where your terrain is saved. fe:
\Data\Editor\Mods\Godlings_7ffdb20a-bb9e-4ca6-a3d3-46a3d0c650d3\Levels\ImportTest100x100\Terrains
- Notice the presence of a .patch file with a uuid in front



I have a lot of patch files created in my terrain folder. In this case I tried selecting the first one but it doesn't work.

Tested with a 8x8 terrain.

Last edited by Rada Torment; 26/09/17 01:49 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Rada Torment] #621879
26/09/17 03:13 PM
26/09/17 03:13 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Rada Torment
Good job Celludriel!

I have a lot of patch files created in my terrain folder. In this case I tried selecting the first one but it doesn't work.

Tested with a 8x8 terrain.


Can you get me the terrain patch and data file together with your heightmap ? I'll try to reproduce why it wouldn't work for you.

Also make sure you are in the \Data\Editor\Mods directory. I made the mistake not being in the Editor folder the first time and it didn't seem to work either then.

Also each terrain gets an unique UUID, that long weird text thing. You should be able to find that in the divinity editor as well if you click on the properties of your terrain. Make sure you pick that file.

Last edited by Celludriel; 26/09/17 03:15 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621901
26/09/17 04:00 PM
26/09/17 04:00 PM
Joined: Jun 2017
Posts: 44
Rada Torment Offline
apprentice
Rada Torment  Offline
apprentice

Joined: Jun 2017
Posts: 44
Yes, the path is correct but I have lots of patch files (64 files for a 8x8 terrain).

The editor crashed when I click "reload level", so the files were modified but something is broken. Maybe 8x8 is too big? or my bmp has something wrong.

I sent you a pm with files.

Last edited by Rada Torment; 26/09/17 04:22 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621909
26/09/17 04:22 PM
26/09/17 04:22 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
oh I see, you are right if you go bigger there are multiple patch files ... damn it all. This makes it way more complex then anticipated.

Once again Larian violated the KISS principle. I have to rethink everything now ... I'm guessing each 1x1 is a patch file. Not sure yet I have to think about this.

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621911
26/09/17 04:30 PM
26/09/17 04:30 PM
Joined: Jun 2017
Posts: 44
Rada Torment Offline
apprentice
Rada Torment  Offline
apprentice

Joined: Jun 2017
Posts: 44
Yes, it seems like the terrain composed of these patchs (like plots) and generate one patch file for each of these segments.

Well, we are here to help and test things smile just patience now.

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621916
26/09/17 04:35 PM
26/09/17 04:35 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
I just did a test, by using my same heightmap for a 1x1 patch for all the patch files

[Linked Image]

So it is as I feared and you said so as well they cut up the terrain for each patch. This complicates things quite a bit. That means I need to cut up the heightmap on parsing and then pick which patch files to update and hope I pick the right order as well.

I also have to determine how many patch files there are based on the size of the bitmap. This is a major rewrite from the code from something simple to something more elaborate frown

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621918
26/09/17 04:42 PM
26/09/17 04:42 PM
Joined: Jun 2013
Posts: 655
Cromcrom Offline
addict
Cromcrom  Offline
addict

Joined: Jun 2013
Posts: 655
Keep faith, and thanks for your hard work already.


Un chemin de 1000 lieues commence par un premier pas.

Project:
Steam workshop Frontiere
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621921
26/09/17 04:43 PM
26/09/17 04:43 PM
Joined: Sep 2017
Posts: 159
M
monzua Offline
member
monzua  Offline
member
M

Joined: Sep 2017
Posts: 159
Hi, i just dont get why would i use it at all? Sorry for that lame question but i dont get it :-)

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621930
26/09/17 04:58 PM
26/09/17 04:58 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
A lot has to do with cutting your workload in half. By drafting an idea you have for a terrain first on a simple 2D greyscale image, using some other tools you can get some very good results. One of the things DO:S E suffers vs NWN is that it takes way to long to create new content due to some of the clunkyness of the UI. That's how I feel at least.

They offer a GM mode in DO:S 2 which is a great great feature. But if a GM needs three months to prepare a 4 hour DM session it's also a failure. I'm trying to find out tools that will cut a GM's workload drastically so this time the DO:S 2 content generating doesn't stop to a grinding halt after just a few weeks ... like last time ... So I have a clear goal in mind with all I'm doing here

For more information about heightmap manipulation.

https://en.wikipedia.org/wiki/Heightmap

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #621949
26/09/17 05:36 PM
26/09/17 05:36 PM
Joined: Sep 2017
Posts: 159
M
monzua Offline
member
monzua  Offline
member
M

Joined: Sep 2017
Posts: 159
Great spirit and motivation you show :) thx for headsup

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622291
27/09/17 08:48 AM
27/09/17 08:48 AM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
I think I fixed it. I made an attempt with a 2x2 patch which translated to a 66px x 66px bitmap.

Heightmap:
[img:center]http://users.telenet.be/sunspot/dos/patch66x66.bmp[/img]

Result:
[Linked Image]


more testing is probably needed and I have to make a new release, but this is looking well.

UPDATE
=====
OP updated with the new release and usage updated as well. Take note you now have to use the DATA file no longer the patch file.

Currenlty only use square terrains, there is still a problem with 2x1 or 1x2. It has something to do with how X and Y are mirrored and reversed in the patch file vs the bitmap file and it's giving me a headache.

Last edited by Celludriel; 27/09/17 09:21 AM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622359
27/09/17 10:58 AM
27/09/17 10:58 AM
Joined: Jul 2014
Posts: 208
morez Offline
enthusiast
morez  Offline
enthusiast

Joined: Jul 2014
Posts: 208
Wow, that is amazing: In 3 seconds i made a volcano. (4x4 patch) Nothing nice so far but really fast and much better base than fiddling 1 hour with terrain shaping tools:
[Linked Image]

Is there a good height map data bank? Where you find stuff like Minas Tirith or whatsoever..?

EDIT:

This island setup was also super fast and smooth. Seems like BMP really has to be 16bit (mustnt 24bit)
[Linked Image]

Last edited by morez; 27/09/17 11:38 AM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622381
27/09/17 11:56 AM
27/09/17 11:56 AM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Nice work, seems it is working as expected so far. I also fixed that you can't use none square setups. I just need to make a release and make a build for it.

First I need food and a movie though. Have been working on this since I woke up this morning. I'll make sure to release it later today. For now you can experiment with the current version smile

Glad it is paying of for you !

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622382
27/09/17 12:05 PM
27/09/17 12:05 PM
Joined: Sep 2017
Posts: 9
W
Wambo Offline
stranger
Wambo  Offline
stranger
W

Joined: Sep 2017
Posts: 9
Awesome tool, thank you for that :)

Will this override existing terrain paints and layers? I'd like to improve the heightmap and apply the changes to the terrain agian. If this works, exporting an existing terrain to bitmap to change and reimport it would be awesome, too.

Re: [RELEASE] Heightmap Import Tool [Re: Wambo] #622386
27/09/17 12:09 PM
27/09/17 12:09 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Wambo
Awesome tool, thank you for that smile

Will this override existing terrain paints and layers? I'd like to improve the heightmap and apply the changes to the terrain agian. If this works, exporting an existing terrain to bitmap to change and reimport it would be awesome, too.


It only overwrites the heightmap data in the patch files, I suggest you make a backup of your work, and then try it. I think it should work

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622389
27/09/17 12:14 PM
27/09/17 12:14 PM
Joined: Jul 2014
Posts: 208
morez Offline
enthusiast
morez  Offline
enthusiast

Joined: Jul 2014
Posts: 208
Just made some minas tirith like base myself in photoshop:

[Linked Image]

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622395
27/09/17 12:27 PM
27/09/17 12:27 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Nice one, seems you at least got a vertical wall going right, didn't work with my tests.

I have updated the main post with a new version the problem with non squared terrains is hopefully fixed I tested it with a 2x1 and included an example heightmap for it

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622403
27/09/17 12:39 PM
27/09/17 12:39 PM
Joined: Jul 2014
Posts: 208
morez Offline
enthusiast
morez  Offline
enthusiast

Joined: Jul 2014
Posts: 208
I wont work with this because I'm lacking time resources to really fill that kind of huge level right now. Just wanted to showcase the potential of your awesome tool. The verical walls aren't beautiful, as place itrms always eill look better,but using heightmaps is a huge help to generally layout a level. It's really great to have that tool. Still i beg larian to provide some API to have something like this as a plugin.

Keep on working on this. I just hope to have encouraged you to continue polishing this nice one.

Re: [RELEASE] Heightmap Import Tool [Re: morez] #622410
27/09/17 12:56 PM
27/09/17 12:56 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by morez
I wont work with this because I'm lacking time resources to really fill that kind of huge level right now. Just wanted to showcase the potential of your awesome tool. The verical walls aren't beautiful, as place itrms always eill look better,but using heightmaps is a huge help to generally layout a level. It's really great to have that tool. Still i beg larian to provide some API to have something like this as a plugin.

Keep on working on this. I just hope to have encouraged you to continue polishing this nice one.


I would love designing this as a plugin, as for polishing , not much more I can do the basic functionality is in. The only thing I can think of is autotexturing by use of a climate map. But that means having to relearn how those damn pages in the Larian file format work. I remember from last time this is a very complicated material to master. Not sure I'm up for that right now, I'm actually with vacation and shouldn't be coding ....

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622454
27/09/17 02:25 PM
27/09/17 02:25 PM
Joined: Jun 2017
Posts: 44
Rada Torment Offline
apprentice
Rada Torment  Offline
apprentice

Joined: Jun 2017
Posts: 44
Here my tests and my thoughts;

My main concern, the resolution for each patch is really low, the smooth is needed if you want avoid some ugly hard edges in heigh levels. This can be fixed using higher resolution heightmaps, so we can have more pixels used per square (patch). My doubt here; are we forced in dos2 engine to use this formula (33 pixels per patch)?

Can we go higher? this is a must have if we really want to have high detailed terrains. Maybe Larian should take a look on this, they could make this even better if they put some effort.

Here the example of these issues;

- The need of smooth tool if you want avoid shadow issues due to hard edges.

[Linked Image]

- Here we can see how this low res affecting painting too.

[Linked Image]

- A smoothed terrain, my best approach.

[Linked Image]

Last edited by Rada Torment; 27/09/17 02:39 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622465
27/09/17 02:38 PM
27/09/17 02:38 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Rada, you may have been using a base terrain texture in that second image leading to the chunky look.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Windemere] #622466
27/09/17 02:39 PM
27/09/17 02:39 PM
Joined: Jun 2017
Posts: 44
Rada Torment Offline
apprentice
Rada Torment  Offline
apprentice

Joined: Jun 2017
Posts: 44
Originally Posted by Windemere
Rada, you may have been using a base terrain texture in that second image leading to the chunky look.


Ok, I'll check that.

Re: [RELEASE] Heightmap Import Tool [Re: Rada Torment] #622470
27/09/17 02:49 PM
27/09/17 02:49 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Rada Torment
are we forced in dos2 engine to use this formula (33 pixels per patch)?


I would need a confirmation of a Larian employee but I'm afraid we are stuck with it. In one patch file the heightmap is 4356 bytes. Each height point in the heightmap is 4 bytes depicting the height in meters. Taking this in account we need to figure out how much space there is in one patch.

4356 / 4 = 1089

So we have 1089 height points in total that can be present in the heightmap, considering we have a square patch we need to take the square root to have one width.

SQRT(1089) = 33

So we end up with a heightmap of 33 * 33 ... if there is any other way to increase resolution I'm more then willing to find out. I'm afraid there isn't though frown

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #622491
27/09/17 03:31 PM
27/09/17 03:31 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Need to play with it a bit more but it will definitely come in handy. It may be coincidence, but it didn't seem to work for me when I tried setting the max height from 20 to 10? It didn't re-generate the terrain at all a couple of times when I tried using the exact same paths and not sure why.

Great work, this will help a lot. smile

[Linked Image]


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Windemere] #622494
27/09/17 03:34 PM
27/09/17 03:34 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Windemere
Need to play with it a bit more but it will definitely come in handy. It may be coincidence, but it didn't seem to work for me when I tried setting the max height from 20 to 10? It didn't re-generate the terrain at all a couple of times when I tried using the exact same paths and not sure why.

Great work, this will help a lot. smile


Can you send me the heightmap and the dimension you were using. I can then experiment a bit with the min and max height. Weird though that is one part I haven't had problems with yet. I'll try and figure out what is going on there.

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #625521
03/10/17 06:26 AM
03/10/17 06:26 AM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
@moderator You can move this thread to the tools forum if you want. It kind of belongs there

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #630082
12/10/17 05:41 AM
12/10/17 05:41 AM
Joined: Oct 2017
Posts: 10
Spokane, WA
T
TheSpartanShow Offline
stranger
TheSpartanShow  Offline
stranger
T

Joined: Oct 2017
Posts: 10
Spokane, WA
I tried to use this and it doesn't seem to be working. Is this still functional?


Twitch Partner - Jedi - Rocket Surgeon - Sponsored by Soylent
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #630839
14/10/17 01:12 PM
14/10/17 01:12 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Same problem. I've tried a bunch of combinations using his example heightmaps and none work. I also tried some earlier revisions and they do not either. I wonder if something changed in the terrain data format.

frown


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #630886
14/10/17 04:02 PM
14/10/17 04:02 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
I'll take a look tomorrow, hopefully they didn't change to much to the file format, but if they did I need to figure out what they did

UPDATE:

Are you sure it's not working ? I'm using the steam edition of the editor so it should be updated to the latest version. I tried the version of the zip file, tried the version in my current workspace of visual studio, tried different test files. It all still seems to work ?

Can you please verify you are using the up to date editor from steam if you are send me your terrain files and heightmap file please so I can investigate what is going wrong with your files.

Last edited by Celludriel; 14/10/17 04:34 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Windemere] #630914
14/10/17 05:49 PM
14/10/17 05:49 PM
Joined: Jul 2014
Posts: 208
morez Offline
enthusiast
morez  Offline
enthusiast

Joined: Jul 2014
Posts: 208
Originally Posted by Windemere
Same problem. I've tried a bunch of combinations using his example heightmaps and none work. I also tried some earlier revisions and they do not either. I wonder if something changed in the terrain data format.

frown


Maybe try again with a new level. For me it wasnt working several times. Always had to retry from scratch with new level i not made any attempts so far. Dont know why it just worked sometimes. Maybe Celludriel you could have look into this.

Re: [RELEASE] Heightmap Import Tool [Re: morez] #630923
14/10/17 06:34 PM
14/10/17 06:34 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by morez
Originally Posted by Windemere
Same problem. I've tried a bunch of combinations using his example heightmaps and none work. I also tried some earlier revisions and they do not either. I wonder if something changed in the terrain data format.

frown


Maybe try again with a new level. For me it wasnt working several times. Always had to retry from scratch with new level i not made any attempts so far. Dont know why it just worked sometimes. Maybe Celludriel you could have look into this.


Well I just made a new project, new level and a new terrain. It just worked as expected. Maybe it's a dimension issue where my math is wrong figuring out the x and y coordinates ?

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #630935
14/10/17 07:32 PM
14/10/17 07:32 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Sent you a youtube video recording my workflow in case that helps. I did do a new level when testing. Thanks for your time.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Windemere] #630947
14/10/17 08:09 PM
14/10/17 08:09 PM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Windemere
Sent you a youtube video recording my workflow in case that helps. I did do a new level when testing. Thanks for your time.


The version in your video is a bit fuzzy, so I couldn't make it out perfectly. Your workflow is right though. I replicated your steps and here it works like it should. I'm stomped atm why it wouldn't be working for you.

This is my version of the editor

[Linked Image]

I did notice the timestamp on your patch files didn't change at all. As if that there was no write operation to them at all. On thing I'm might be thinking is that there isn't any write access to the folder. It's a longshot though, since you where able to do it before.

Last edited by Celludriel; 14/10/17 08:14 PM.
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #631050
15/10/17 03:06 AM
15/10/17 03:06 AM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
I was wondering the same thing, so I tried all kinds of things tonight with running as administrator, moving the tool to be on the same drive, opening new projects, opening old projects, trying with new terrains, and trying with old terrains. It worked once out of about 8 permutations and I have no idea why that one worked while all the others fail.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Windemere] #631080
15/10/17 07:17 AM
15/10/17 07:17 AM
Joined: Jul 2014
Posts: 102
C
Celludriel Offline OP
member
Celludriel  Offline OP
member
C

Joined: Jul 2014
Posts: 102
Originally Posted by Windemere
I was wondering the same thing, so I tried all kinds of things tonight with running as administrator, moving the tool to be on the same drive, opening new projects, opening old projects, trying with new terrains, and trying with old terrains. It worked once out of about 8 permutations and I have no idea why that one worked while all the others fail.


All my tries keep working consistently, I just can't reproduce it. Keep in mind that the tool itself isn't that complicated. It's barely 50 lines of code. It just reads two files and rewrites one of them.

All the code is in two files

https://github.com/Celludriel/DOS_Terrain_Importer/tree/master/DosTerrainImporter/Importer/Dos2

Dos2GrayScaleImporter.cs: figures out the name of the patch files and order
PatchFileWriter.cs: reads and writes one patch file

Wish I could reproduce your problem, but I get consistent results frown

Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #631478
16/10/17 02:49 PM
16/10/17 02:49 PM
Joined: Dec 2013
Posts: 872
Windemere Offline

old hand
Windemere  Offline

old hand

Joined: Dec 2013
Posts: 872
Thanks for your dedication to the tool, Celludriel.

I seem to have a workflow that gets consistent success now. I don't know which of these exactly resolves my former issues, but I was able to make a good 6-7 maps in a row this morning. Things I am doing:

1. Create a new level with only one terrain and save.

2. Always choose a normal 'exit' from the editor. I was in the habit of choosing 'force exit' from the extended period of time when the editor would hang and crash from a normal exit but that seems to be mostly resolved at this point.

3. Run the heightmap tool in administrator mode.

4. Fill-in the bitmap file first and editor terrain second.

My guess is that #2 in the list is the real difference maker. You can see some built-in source control stuff going on when saving a level and perhaps there is some kind of internal locking happening that does not get released when you force exit from the editor.

I do still get crashes when attempting to import heightmaps with a level size of 10x10, but since that is too big for my needs anyway, not a problem for me.

Thanks again, this tool is a huge help to me.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Re: [RELEASE] Heightmap Import Tool [Re: Celludriel] #636840
12/11/17 06:29 PM
12/11/17 06:29 PM
Joined: Sep 2017
Posts: 16
B
Bugsby Bearkeley Offline
stranger
Bugsby Bearkeley  Offline
stranger
B

Joined: Sep 2017
Posts: 16
It took me a while to figure this out but it seems to work for me. Nice tool! I'll be using it.

How trivial would it be to make it work the other way around? I'm trying to get the DOS:1 maps into DOS:2. There's probably an easier way to do that, but I wouldn't know where to start.

Last edited by Bugsby Bearkeley; 12/11/17 08:08 PM.
Page 1 of 3 1 2 3

Moderated by  Larian_Koala 

Powered by UBB.threads™ PHP Forum Software 7.6.2