Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Resources and Tools => Topic started by: Scytheria23 on October 21, 2016, 09:17:52 am

Title:  [TOOL] [WotLk] ADTForge
Post by: Scytheria23 on October 21, 2016, 09:17:52 am
BIG EDIT - links to original (horrible) tool have been removed.

Dear All,

I've bitten the bullet and decided to add alpha-mapping into the project (now renamed from ADT Guru to ADTForge).  This means I'm a few more weeks away from release, but in the meantime, some teasers:

- Complete control over heights. Extract height information from greyscale bitmaps, combine, manipulate and transform that data, protecting or masking areas.
(https://s18.postimg.org/o0a32apw5/adtforge1.png) (https://postimg.org/image/o0a32apw5/)

- Rip data from existing ADTs, then manipulate like any other data.
(https://s18.postimg.org/ba5up7hxx/adtforge2.png) (https://postimg.org/image/ba5up7hxx/)

- Easily write ADTs and accompanying WDL and WDT files.  ADTs are complete with textures (including animations, overbright and cube-map flags) and ground effects, AreaIDs, impassible flags, and (soon) alphamaps for the three layers above the base layer - all of which can be applied on an Mapwide, ADT by ADT or Chunk by Chunk level.
(https://s18.postimg.org/f7t4em4r9/adtforge3.png) (https://postimg.org/image/f7t4em4r9/)

Maybe ready before Christmas... ask Santa nicely.
Title: Re: [TOOL] [WotLk] ADT Guru
Post by: Grymskvll on October 23, 2016, 12:51:27 am
Sounds really cool. Any plans for texture generating?
Title: Re: [TOOL] [WotLk] ADT Guru
Post by: fandramen on October 23, 2016, 01:26:48 am
Some idea could be while are you parsing the heightmap and then to an x and y apply x texture to another x and another y apply another texture and then continue with this process
Title: Re: [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on October 23, 2016, 03:55:34 am
Yes, auto-texturing is the next step, along with being able to set different water heights (and types?) on the ADTs.  Additionally, I'll be working to add offset-fixes into the code, areaID generation, etc.

Scy
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on October 25, 2016, 01:31:04 pm
Updated to v1.1 (already!)

- maskmin added
- maskmax added
- spike and pit removal added
- softening algorithms added

Scy
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Nupper on October 25, 2016, 07:51:45 pm
Quote from: "Scytheria23"
Updated to v1.1 (already!)

- maskmin added
- maskmax added
- spike and pit removal added
- softening algorithms added

Scy
Code: [Select]
!unable to find or open ADTGuruConfig.txt
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on October 25, 2016, 11:40:10 pm
@ Nupper

Have you placed the ADT Guru folder directly onto your C drive?  Have you renamed any folders?  ADT Guru will not work if you put the folder anywhere else or rename the folders.  

Path should be:

c:/ADT Guru/ADT Guru v1.1.exe

Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on October 26, 2016, 03:52:19 pm
Version 1.2 imminent. Sorry about the rapid update rate. Sharing is the best way to identify bugs. Thanks for the PMs.

- fixed anomalous walls around edges of map when elevate used
- fixed scaleup and scaledown so they behave as described (e.g. Properly)
- fixed scaling and elevating order to make it easier to predict final heights
- added function to dump and import terrain data as a binary file, so masks can be used without having to generate it all over again

No joy solving the install path thing   :(

Coming very soon

Scy
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Kaev on October 27, 2016, 10:06:59 am
Holy fck, that looks awesome. Thank you for releasing it!
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on October 27, 2016, 02:21:03 pm

ADT Guru v1.2 RELEASE!



This will be the last release for a while unless a major bug is found. I'm spent.


Scy
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Skarn on October 27, 2016, 10:31:29 pm
Awesome stuff here.
OffsetFix currently bugs out badly on Windows 10 – I have to switch PC and use Windows 7 to run this!

Found that line in your PDF guide. Actually is an easy-to-solve issue on Windows 10. You can just do this: http://www.model-changing.net/forums/to ... ws-update/ (http://www.model-changing.net/forums/topic/104-solution-for-crashing-software-caused-by-windows-update/" onclick="window.open(this.href);return false;)
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: sinkhile on October 29, 2016, 06:56:37 pm
I downloaded it, but I do not know how to use it, I trouble you to do a textbook on youtube
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on October 30, 2016, 10:20:48 pm
@ Sinkhile: I'm not sure I could explain it on YouTube any better than the coverage in the documentation.  Which part is giving you trouble?

I'm currently building a second version of the app, which will offer a lot more flexibility and power. That, however, comes with a cost - it's considerably more difficult to use.  You'll be able to apply as many masks as you like, manipulating each in whatever ways you want.  This will allow you to add successive layers of fine detail to the terrain, and give much greater control over the output.  Because it's much harder to use (you have to specify the operations and their order in a special scripting language), I'll certainly come up with a few user-guide videos.  

BTW, the 'promised' auto-texturing is a dead end.  Although some preliminary trials gave reasonable results, they were no substitute for painting by hand in Noggit.  The effort needed to set up the auto-texturing was substantially greater than that needed to wave a mouse around in Noggit, so the tool would be kind of redundant.  The human touch is often better.

Scy
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Songen on November 02, 2016, 10:40:10 pm
Hmm, I can't seem to get this to work properly. If I do any changes to the Seedmap images, the program doesn't work.
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on November 02, 2016, 11:15:35 pm
@ Songen

Most likely cause is wrong kind of bitmap.  They MUST be 1537*1537 greyscale with .bmp suffix.  Check exact size of your file. It should be identical to that of the examples.  My guess is that you have edited them and then saved without making sure they are the correct type.  Gimp (which is free) will save in the correct format.  Just select Image > Mode > Greyscale and export with .bmp, refusing any offer to add transparency.  Resulting file should be exactly 2,368,126 bytes.  I'm afraid I'm not likely to improve the app by allowing different file formats or sizes - it's too much fuss when these things can be done by the users.
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Songen on November 03, 2016, 12:30:06 am
Well, I checked and it is a greyscale bmp file that is 1537x1537 but it is not 2,368,126 bytes, its smaller than that.
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Songen on November 03, 2016, 01:00:35 am
Seems like saving with GIMP actually fixed it o.O
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on November 03, 2016, 02:20:25 am
@ Songen

Good to hear.  Do give feedback on your results (pics would be nice).  If you think something could be improved or think of a missing feature, there's still time for me to fix/add into the more substantial sequel.
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: matija168 on November 20, 2016, 11:00:35 pm
Is there any way this tool may get alphamap support any time in the future. As in, to create a base alphamap which would be copied over all ADTs.
Title: Re: [RELEASE] [TOOL] [WotLk] ADT Guru
Post by: Scytheria23 on November 24, 2016, 09:50:21 pm
Quote from: "matija168"
Is there any way this tool may get alphamap support any time in the future. As in, to create a base alphamap which would be copied over all ADTs.

The answer is kind-of.  The base-layer textures, yes.  You're about two weeks away from seeing a MAJOR overhaul of this tool.  The new version, now renamed ADTForge, has a proper Windows interface, many more tools, and is flexible (e.g. you can add as many layers of height info in whatever ways you want).  You can set the primary layer textures, set AreaIDs, impassible flags, animate the textures, do cube-maps, add ground effects and so on.  You can also rip height info from existing ADTs, manipulate it, and merge it into your own height data.  I'm now in the final testing phase and writing the manual/tutorials.  Watch this space!

Scy
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Scytheria23 on December 01, 2016, 04:48:04 am
Bumping because of big edit to the first post
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Scytheria23 on December 05, 2016, 01:25:25 am
:o Ok, some success with alphamap support, but there is a major snag...
The immense quantity of data held by the tool for 12x12 ADTS (4.8 million heights per ADT, 4 million alpha values, AreaIDs, GroundEffects, etc) has resulted in a very slow tool that only works on high-spec machines.  Even with a monster PC, it grinds to a crawl.  As such, I have been forced to reduce the map size to a more manageable 4x4 ADTS (one ninth of the original area).  Of course, it will remain possible to tile multiple sets of 4x4 to make larger maps (although there may be seam problems between maps if heights are not carefully managed), but the working area had to be scaled down.

Edit: OK, got it back up to 8x8, which is much more useful.  I did this by reducing the 'undo' steps to just one (the last operation) and by squeezing some data that was stored in multiple integers as flags (a single byte).
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Skarn on December 06, 2016, 08:24:50 am
Quote from: "Scytheria23"
:o Ok, some success with alphamap support, but there is a major snag...
The immense quantity of data held by the tool for 12x12 ADTS (4.8 million heights per ADT, 4 million alpha values, AreaIDs, GroundEffects, etc) has resulted in a very slow tool that only works on high-spec machines.  Even with a monster PC, it grinds to a crawl.  As such, I have been forced to reduce the map size to a more manageable 4x4 ADTS (one ninth of the original area).  Of course, it will remain possible to tile multiple sets of 4x4 to make larger maps (although there may be seam problems between maps if heights are not carefully managed), but the working area had to be scaled down.

Edit: OK, got it back up to 8x8, which is much more useful.  I did this by reducing the 'undo' steps to just one (the last operation) and by squeezing some data that was stored in multiple integers as flags (a single byte).

You need to do some task through multithreading. It wil increase the capacity of the tool in a really big way. I assume even larger maps will be posassible to get generated.
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Scytheria23 on December 08, 2016, 03:59:33 am
@ Skarn

As much as possible is already multithreaded, but the problem is that most operations cannot run in parallel, each being totally dependent on the result of the last.  The issue is simply one of bytes.  One ADT requires 37120 floating point heights, 4194302 bytes of alphamap information, other data besides.  For 12x12 ADTs this came to over 625 million bytes being manipulated or stored for each layer of work (I had five per ADT).  Few machines can cope with that.

I am working on a code cleanup, which is freeing quite a lot of memory, some compression of data, moving a few routines around, and this is all helping.  I don't think I'll get back to 12x12, but 8x8 is working well and quickly.
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Skarn on December 08, 2016, 11:23:55 am
Quote from: "Scytheria23"
@ Skarn

As much as possible is already multithreaded, but the problem is that most operations cannot run in parallel, each being totally dependent on the result of the last.  The issue is simply one of bytes.  One ADT requires 37120 floating point heights, 4194302 bytes of alphamap information, other data besides.  For 12x12 ADTs this came to over 625 million bytes being manipulated or stored for each layer of work (I had five per ADT).  Few machines can cope with that.

I am working on a code cleanup, which is freeing quite a lot of memory, some compression of data, moving a few routines around, and this is all helping.  I don't think I'll get back to 12x12, but 8x8 is working well and quickly.

Well, if it does not run in parallel what is the problem then? Let's say on a powerful PC it takes 1 minute to generate the map, on a weak one it takes half an hour. If stuff is managed properly and the memory is freed when necessary, the app is not gonna crash because it is weak PC. It will just take longer to get the result.
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Insanity on March 12, 2017, 08:43:25 pm
@ Scytheria

How is the development going?  I'm really looking forwarded to the updated version. Would you be willing to re-post a link the previous version in the meantime (I thought I had a copy but I can't seem to find it)?  Thanks
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Scytheria23 on March 13, 2017, 06:33:22 am
@Insanity

The project is still in development, somewhat slowed by my real life workload.  At present, a volunteer is beta-testing some of the main features, but the whole thing is a way off completion. 

I'm afraid I don't have any copies of the original tool, but trust me, it was crapola.

Scy
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Insanity on March 13, 2017, 05:52:59 pm
No need to explain, life likes to pile it on (especially if there is a pile there to begin with.)  Thanks for the reply.  Let us know if the unskilled masses can help.
Title: Re:  [TOOL] [WotLk] ADTForge
Post by: Kaev on May 16, 2017, 12:55:00 pm
Any news? Was actually looking forward to finally play around with this.  :(