Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
jval

Terrain Generator (DD_Terrain) for GZDoom/K8Vavoom/RAD (Updated Jan 3, 2022)

Recommended Posts

A few hints on how to use this generator would be nice 

 

elSZuHd.png

 

How to apply texture.

How to save for UDMF.

How to import into pwad.

etc

Share this post


Link to post

First of all, sorry about the lack of documentation :P

It was started as a personal tool, to use it with my project RAD. After some comments from @Redneckerz here and @Gez here  the idea for making it work with other source ports in UDMF format was born. After some hours of coding I've managed to make it work, and that made me so happy! So I've made this thread to announce it. It was late night and I was a bit tired, so, obviously, I didn't  manage to make a complete demonstration.

 

Quote

Does this terrain generator creates terrains compatible with delphidoom?

 

Unfortunately no. DelphiDoom does not have (yet) the mechanics to work with terrains exported by the tool. I have to back-port the "easyslope" things of RAD to DelphiDoom. This will be done in near future (I hope). 

 

 

Quote

How to apply texture.

 

In the "WAD File" tab you can open a WAD with the flats you want to use.

At the time, only flats are supported. This is because the project was initially created to work with the "editing WAD" of RAD (RAD2WAD) that converts the RADIX.DAT file of the game RADIX into a Doom WAD file. The editing WAD contains all textrures of RADIX.DAT in both flat and texture format, so using only the flats was OK.

 

So, in the next example we open the DOOM2.WAD file, and we see and select the flats we can use for "texture painting":

IMPORT-WAD.png

 

 

Then we can go to the "Properties" tab to select the drawing tool ("rectangle", "circle", and "round edge" - inside the red eclipse in the following image)

We can change the size and opacity with the slides (inside the blue eclipse in the following image). And then we draw on the "Terrain" preview.

 

TEXTURE-APPLY.png

 

 

The heightmap values can be edited with the 3 other tools ("edit mesh", "edit heightmap" & "Smooth heightmap" - inside the green eclipse in the following image).

The "Height" and "Smooth" slides (inside the pink eclipse) control the strength of the effect.

 

TEXTURE-APPLY-HEIGHTMAP.png

 

 

The best way to edit the heightmap is by selecting the "Edit mesh" botton.

The we can right-click to open a dialog that sets the selected/nearest mesh point values.

These are:

  • Height (obvious)
  • DX, DY: Horizontal plane offsets to make accurate deformations to geometry, not limited by automatic grid spacing (hope you can understand, can't find words to explain it better)

 

edit-heightmap.png

 

...or we can left click and drag to directly to make a deformation on a heightmap point:

 

mesh-deformation2.png

 

 

You can also use the "Paste Texture" and "Paste Heightmap" menu items from the "Edit" menu. These functions will set the taxture and heightmap in just one step with the contents of the Windows OS clipboard. Personally, I find this the most convenient way to work, I keep texture and heightmap in an external image editing application and I copy/paste them to the DD_Terrain.

 

paste-heightmap-texture.png

 

 

Quote

How to save for UDMF.

 

You can go to the file/export menu. There are some options:

  • 3D View screenshot (saves the 3d view on an image file)
  • Radix WAD map
  • UDMF Map (GZDooom/K8Vavoom)

The Radix WAD map will create a new WAD file containing a level (E1M1) for RAD.

The UDMF Map (GZDooom/K8Vavoom) will create a new WAD file containing a UDMF map (MAP01). These maps are tested and work with GZDoom & K8Vavoom.

 

The export procedure adds a player start to easy test the produced maps out of the box.

 

Of course, after that, you will have to open the generated maps with an external editor (eg DoomBuilder) and continue editing.

 

Screenshot of the export menus:

export-wad.png

 

Quote

How to import into pwad.

 

DD_Terrain does not have a merge WAD capability. You must use a lump editor (eg. SLADE3) to import the produced WAD into a PWAD.

 

1 hour ago, Doom-X-Machina said:

So... do you build the map in Doombuilder first, then run it through this or use this first and then import the WAD into Doombuilder??

 

  • First you make the terrain in DD_Terrain.
  • Then export the WAD file with the map.
  • Then you can open it with DoomBuilder and continue editing.

 

 

Future development:

  • Make a dialog with options for the export procedure, e.g. player start, map name, scale.
  • Second terrain for ceiling (?)
  • Place things according to game (Probably not, use DoomBuilder for that ??)
  • Export the RAD wad with true color terrain texture.
  • Additional ideas from the community.

 

Edited by jval

Share this post


Link to post

Had a bit of a tinker with it... very cool stuff man!! I can see this being useful, however it only exported as a 1024 x 1024 mpu sector. Is there a way to make this bigger to export out or should I just make separate 1024 x 1024 pieces and then combine them for something larger? Definitely will save me time with mountain areas that can be very tedious in Doombuilder. I also noticed it included a player start point on it's own, I dig that. 3D perspective view takes a little getting used to with moving it around but it's very cool.

Excellent stuff and thankyou for the tutorial on how it works. It's pretty simple once you've had a go at it.

Some recommendations:
- Definitely add support for doing ceilings. Would be amazing to build caves and ravines etc.
- Add support not just for flats but for any texture.

All in all, this is a pretty awesome tool and I'm going to be using it more often. Well done mate! :D
 

test1.jpg.33b5435c2cf95702acc468e35a0f53d3.jpgScreenshot_Doom_20201212_204230.png.e35a11a106a935651422e5fe437e2943.png

Share this post


Link to post

Selecting DOOM2.WAD as the wadfile works well enough, but none of the texture packs I tried display flats:

2mbrown.wad, GOTHICTX.WAD, OTEX_1.1.WAD, Afterglow texture packs and others.

 

What about texture packs where textures are between TX_ markers?

Are those supported, and if yes, how can I load them for terrain use?

Share this post


Link to post

 

1 hour ago, Kappes Buur said:

What about texture packs where textures are between TX_ markers?

Are those supported, and if yes, how can I load them for terrain use?

 

2 hours ago, Doom-X-Machina said:

Some recommendations:
- Definitely add support for doing ceilings. Would be amazing to build caves and ravines etc.
- Add support not just for flats but for any texture.

 

 

3 hours ago, jval said:

In the "WAD File" tab you can open a WAD with the flats you want to use. 

At the time, only flats are supported. This is because the project was initially created to work with the "editing WAD" of RAD (RAD2WAD) that converts the RADIX.DAT file of the game RADIX into a Doom WAD file. The editing WAD contains all textrures of RADIX.DAT in both flat and texture format, so using only the flats was OK.

 

As I explained in my previous post, currently only flats are supported.

Probably the first think that I have to add is better texture support :)

 

2 hours ago, Doom-X-Machina said:

Had a bit of a tinker with it... very cool stuff man!! I can see this being useful, however it only exported as a 1024 x 1024 mpu sector. Is there a way to make this bigger to export out or should I just make separate 1024 x 1024 pieces and then combine them for something larger? Definitely will save me time with mountain areas that can be very tedious in Doombuilder. I also noticed it included a player start point on it's own, I dig that. 3D perspective view takes a little getting used to with moving it around but it's very cool.

 

The texture surface (map size) can be 256x256, 512x512, 1024x1024 & 2048x2048, and the heightmap size (geometry complexity) can be 5x5, 9x9, 17x17, 33x33 and 65x65. These values can be set in the New Terrain dialog:

new-terrain.png

 

Then, after generating the WAD map, you can copy/paste it into DoomBuilder and continue editing. E.g. you can make multiple small terrains and embed/copy-paste them into a larger map.

Idea for future updates: Change the geometry dynamically and/or add geometry complexity option in WAD export?

 

2 hours ago, Doom-X-Machina said:

Excellent stuff and thankyou for the tutorial on how it works. It's pretty simple once you've had a go at it.

 

Glad to hear that it can be easy to use from people besides myself :) :)

I spend less than an hour (just to show you how easy is if you get used to it) to make another example demonstrating the texture blending and geometry deformation to create spectacular worlds just with a few clicks.  EDIT: Literally, it took me more time to make this post than the example.

Please note that I'm not a mapper and my artistic creativity is close to zero :) :)

Donwload: https://sourceforge.net/projects/dd-terrain/files/Examples/Example01.zip/download

 

The zip file contains 2 files:

  • Example01.terrain: The file you can open with DD_Terrain
  • Example01_UDMF.wad: An almost out of the box test map in UDMF format (I've changed only the player start position)

Also, the example contains graphics from FreeDoom.

 

Editor screenshots:

 

Image14.png

 

Image12.png

 

Playing the map:

 

Screenshot-Doom-20201212-130236.png

 

Share this post


Link to post

This is absolutely amazing @jval and a powerful tool to GZDoom users who want an alternative to ZTerrain (And K8Vavoom, ofcourse ;))

Having said that, this should be posted on the ZDoom forums aswell. Do you have an account there, or perhaps i can help?

 

PS:

Dynamic geometry changes sounds a bit like Deformed Doom does it - Although that's just a visual trick and not something indepth. I am also unsure how this would work with BSP's and scripting languages (Will dynamic geometry require a node rebuild/altered BSP tree, does this require additional scripting and if such, which?) but i can totally see such a thing be a wild feature (Imagine entire mountains generated by DD_Terrain be able to move out of the way or what not).

Share this post


Link to post

can it join flat areas into bigger polys? this may help UDMF engines a little, especially if people will build big planes with some hills here and there, for example. it shouldn't be that hard, i believe, and doable in export time. just check if triangle is horizontal, check it's neighbours, if they both horizontal and on the same level, join them. repeat until there is nothing more to join. with additional pass to remove extra vertices lying on the same line.

 

i'm not pressing you on that, just an idea that will make already great tool even greater. ;-)

Share this post


Link to post
36 minutes ago, Redneckerz said:

a powerful tool to GZDoom users who want an alternative to ZTerrain (And K8Vavoom, ofcourse

actually, for any sourceport with support for UDMF and slopes, i believe. but, of course, i have no objections to the current topic title! ;-)

Share this post


Link to post
1 hour ago, Redneckerz said:

This is absolutely amazing @jval and a powerful tool to GZDoom users who want an alternative to ZTerrain (And K8Vavoom, ofcourse ;))

Having said that, this should be posted on the ZDoom forums aswell. Do you have an account there, or perhaps i can help?

Yes, that's a good idea. I'll manage ;)

 

Quote

PS:

Dynamic geometry changes sounds a bit like Deformed Doom does it - Although that's just a visual trick and not something indepth. I am also unsure how this would work with BSP's and scripting languages (Will dynamic geometry require a node rebuild/altered BSP tree, does this require additional scripting and if such, which?) but i can totally see such a thing be a wild feature (Imagine entire mountains generated by DD_Terrain be able to move out of the way or what not). 

The deformation of the geometry is something that is done inside the editor, to fine-tune the mesh triangles.

 

Just because I can't easily describe it, just compare the same terrain with and without deformation:

 

This is how it looks with deformation (editor and 3d)

Notice that the brown stone path is completely flat in 3d preview

result-deformation.png

 

This is how it looks without deformation (editor and 3d)

Notice that the brown stone path is not flat in 3d preview
result-plain.png

 

 

Edited by jval

Share this post


Link to post
On 12/12/2020 at 3:12 PM, ketmar said:

can it join flat areas into bigger polys? this may help UDMF engines a little, especially if people will build big planes with some hills here and there, for example. it shouldn't be that hard, i believe, and doable in export time. just check if triangle is horizontal, check it's neighbours, if they both horizontal and on the same level, join them. repeat until there is nothing more to join. with additional pass to remove extra vertices lying on the same line.

 

i'm not pressing you on that, just an idea that will make already great tool even greater. ;-)

 

Actually that's something I did in UDMF export, but I had to abort it. It still does merge sectors without slope while exporting wads for RAD. (i.e. the algorithm exists and works fine)

Unfortunately, the "cut-off" procedure produces unassigned linedefs... and UDMF seems to dislike them a lot :) :)

RAD does not seems to bother.

 

On 12/12/2020 at 3:15 PM, ketmar said:

actually, for any sourceport with support for UDMF and slopes, i believe. but, of course, i have no objections to the current topic title! ;-)

I've tried it only with GZDoom and K8Vavoom, I didn't tried it with other source ports. If there is a chance that the exported maps are compatible with other source ports, that's good news!!

Edited by jval : Grammar

Share this post


Link to post
46 minutes ago, jval said:

If there is a chance that the exported maps are compatible with other source ports, that's good news!!

yeah. you can be pretty sure that if it loads and works with k8vavoom and GZDoom, it should work with any other sourceport that support UDMF vertex-based slopes.

 

46 minutes ago, jval said:

Unfortunately, the "cut-off" procedure lefts  unassigned linedefs... and UDMF seems to dislike them a lot :) :)

just add another pass then, that will incrementally rebuild the map structures once again. walk through sector lists, collect all used linedefs and vertices -- and you're done! ;-)

 

p.s.: if you'll make it buildable with Lazarus, i may take a look at it. no promises, tho. ;-)

Share this post


Link to post
2 hours ago, ketmar said:

actually, for any sourceport with support for UDMF and slopes, i believe. but, of course, i have no objections to the current topic title! ;-)

Maybe its also something worth it for @RambOrc and the KoraxRPG engine (Though that relies on Vavoom and not K8Vavoom)? ;)

1 hour ago, jval said:

Yes, that's a good idea. I'll manage ;)

Alright :) Let me know if i can help out here.

1 hour ago, jval said:

 

The deformation of the geometry is something that is done inside the editor, to fine-tune the mesh triangles.

And you said you couldn't easily describe it? ;)  That looks great, thank you for the examples. And this looks very worthwhile for mappers alike. Especially hue open area's can be made to look really interesting with DD_Terrain, i feel.

Share this post


Link to post
4 minutes ago, Redneckerz said:

Maybe its also something worth it for @RambOrc and the KoraxRPG engine (Though that relies on Vavoom and not K8Vavoom)? ;)

alas, there is no UDMF vertex slopes support in Vavoom.

Share this post


Link to post
4 minutes ago, ketmar said:

alas, there is no UDMF vertex slopes support in Vavoom.

 

Another idea emerged: Make minecraft-line export for source ports that don't support slopes!

Share this post


Link to post
10 minutes ago, jval said:

Another idea emerged: Make minecraft-line export for source ports that don't support slopes!

then people will inevitably ask you to implement minecraft map import! ;-)

 

and to clarify things a little: Vavoom does support slopes. it just doesn't process Z coordinate of UDMF vertices. but "slope things" and "slope actions" do work.

Share this post


Link to post

This looks very promising, having experimented with it and been particularly impressed by the texture blending, which even with the stock Doom 2 flats can generate convincing-looking rocks.  My main feature request for the future is OTEX compatibility (I tried creating a WAD file with just the OTEX flats, but the colours come out in greyscale), in which case I am highly likely to make use of it.

 

Edit: I have found a rather hacky way to get it working with the OTEX flats for the time being.

Edited by ENEMY!!!

Share this post


Link to post

Another thought, I tested it with both OTEX and the vanilla Doom 2 flats and the animated textures don't animate with it, so I wonder if it is possible either to integrate compatibility with animated textures for a future version or if there are workarounds at the user end (I know I got OTEX working).  These comments are mainly suggestions for future improvements rather than criticisms, I've been very impressed with what I've been getting out of it so far.

Share this post


Link to post
37 minutes ago, ENEMY!!! said:

Edit: I have found a rather hacky way to get it working with the OTEX flats for the time being.

 

Yes, it needs the FF_START & FF_END entries to be renamed to F_START & F_END and also add the PLAYPAL lump from a doom wad. Then you'll have the flats of OTEX to work with.

Share this post


Link to post
5 minutes ago, ENEMY!!! said:

Another thought, I tested it with both OTEX and the vanilla Doom 2 flats and the animated textures don't animate with it, so I wonder if it is possible either to integrate compatibility with animated textures for a future version or if there are workarounds at the user end (I know I got OTEX working).  These comments are mainly suggestions for future improvements rather than criticisms, I've been very impressed with what I've been getting out of it so far.

 

How can a texture been animated if it is blended with other textures ?

 

Eg notice the edges of the water and lava textures, they are blended into the rock texture background.

Also the nukage texture has varying transparency, how can this be animated inside a Doom map?

 

blend2.png

Share this post


Link to post

Yeah good points, come to think of it I remember the Doom 3 model presets having non-animated lava probably for the same reasons.  On second thoughts, I can imagine an approach of using DD_Terrain for the land mass and then overlaying translucent water in DoomBuilder using a 3D floor working very well.

 

I can also foresee this editor being useful for example for implementing realistic-looking lying snow (I remember in Eviternity a couple of maps simulated thawing snow in certain places using custom textures but blended snow/grass could look even better).

Share this post


Link to post

A new update (ver. 1.0.3.15) is available.

 

Downloads:

Executable (win32): https://sourceforge.net/projects/dd-terrain/files/DD_Terrain_1.0.3.15/DD_Terrain_1.0.3.15_win32.zip/download

Source code: https://sourceforge.net/projects/dd-terrain/files/DD_Terrain_1.0.3.15/DD_Terrain_1.0.3.15_src.zip/download

 

The most important things that comes with this update is support for FF_START & FF_END namespace (common in texture pack WADs), the option to select palette in case of missing from the WAD and true color support for RAD maps.

 

9 hours ago, Kappes Buur said:

GOTHICTX.WAD, OTEX_1.1.WAD, Afterglow texture packs and others.

 

Tested with them and works now, you must select the Doom/Doom2 palette from the WAD file tab.

Note that still only reads FLATS.


Fixes/Additions:

Spoiler
  • True color support for RAD maps
  • Does not require a PLAYPAL lump inside WADs.
  • Support for [FF_START..FF_END] namespace inside WADs.
  • Copy heightmap to clipboard.
  • Exports screenshots in PNG format.
  • Fixed "Rendered triangles" message in statusbar.

 

Screenshots of the Select Palette button:

palette1.png

 


palette2.png

 

Edited by jval

Share this post


Link to post

The flats used with the terrain tutorials are enormous... do you need to use 2048x2048 or larger flats to get the optimum visual presentation out of it? Also, how to make the mountainous peaks smooth? Mine are coming out very sharp any pointed even with the smoothness pushed to 100... also, after importing into Doombuilder there's a ton of triangles to clean up... is that normal?

Share this post


Link to post
1 hour ago, Doom-X-Machina said:

The flats used with the terrain tutorials are enormous... do you need to use 2048x2048 or larger flats to get the optimum visual presentation out of it?

The flat size depends on the terrain size (256x256 thru 2048x2048). Flats larger than 2048x2048 are not supported, since it's the upper limit of RAD (this project was initially developed for it).

 

1 hour ago, Doom-X-Machina said:

Also, how to make the mountainous peaks smooth? Mine are coming out very sharp any pointed even with the smoothness pushed to 100...

A larger heightmap size could help the smoothness. The automated tool changes the elevation/height value of a vertex depending on the height of it's neighbor vertexes.

In order to have the best results it is recommended to use the "Edit mesh" tool 395198320_.png.210e4bb41066c189ee77e1cc5c8fadab.png  and change the vertex position (mesh deformation helps a lot, as it was mentioned in this post above:  https://www.doomworld.com/forum/topic/118563-terrain-generator-dd_terrain-for-gzdoomk8vavoomrad/?do=findComment&comment=2229391)

Also by right-clicking on the "Terrain" tab you can open the "Edit Heightmap Item" dialog to fine-tune the terrain.

A nice example of how the deformation can help can be found at this post above: https://www.doomworld.com/forum/topic/118563-terrain-generator-dd_terrain-for-gzdoomk8vavoomrad/?do=findComment&comment=2229350

 

1 hour ago, Doom-X-Machina said:

also, after importing into Doombuilder there's a ton of triangles to clean up... is that normal?

It's #1 priority to merge the flat sectors into larger ones for UDMF maps, in RAD maps the flat sectors are merged to reduce complexity (see also https://www.doomworld.com/forum/topic/118563-terrain-generator-dd_terrain-for-gzdoomk8vavoomrad/?do=findComment&comment=2229398)

 

Share this post


Link to post
4 minutes ago, jval said:

The flat size depends on the terrain size (256x256 thru 2048x2048). Flats larger than 2048x2048 are not supported, since it's the upper limit of RAD (this project was initially developed for it).

 

A larger heightmap size could help the smoothness. The automated tool changes the elevation/height value of a vertex depending on the height of it's neighbor vertexes.

In order to have the best results it is recommended to use the "Edit mesh" tool 395198320_.png.210e4bb41066c189ee77e1cc5c8fadab.png  and change the vertex position (mesh deformation helps a lot, as it was mentioned in this post above:  https://www.doomworld.com/forum/topic/118563-terrain-generator-dd_terrain-for-gzdoomk8vavoomrad/?do=findComment&comment=2229391)

Also by right-clicking on the "Terrain" tab you can open the "Edit Heightmap Item" dialog to fine-tune the terrain.

A nice example of how the deformation can help can be found at this post above: https://www.doomworld.com/forum/topic/118563-terrain-generator-dd_terrain-for-gzdoomk8vavoomrad/?do=findComment&comment=2229350

 

It's #1 priority to merge the flat sectors into larger ones for UDMF maps, in RAD maps the flat sectors are merged to reduce complexity (see also https://www.doomworld.com/forum/topic/118563-terrain-generator-dd_terrain-for-gzdoomk8vavoomrad/?do=findComment&comment=2229398)

 


Thanks for the explanations. Still try getting the hang of it. I can totally see me using this for a lot of stuff once I master it :)

Share this post


Link to post

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
×