andrewj Posted November 27, 2022 This is possibly quite useless, but I have written some software which (a) converts a DOOM map into an RGB image, and (b) reconstructs a DOOM map from an RGB image. Why? The idea would be to train a neural net (or whatever) on the images and have it generate new images and hence new DOOM maps, a la StableDiffusion. I haven't done anything like that yet though. Example of E1M1 of Ultimate Doom converting into an image: And this animated GIF shows the before and after (original map and the map reconstructed by the above image) : Here is the WAD created for the above map, which I edited to replace a few Doom 2 flats and textures to make it playable in Doom 1: E1M1_wad.zip Hope somebody finds this interesting :-) Repository here: https://gitlab.com/andwj/levfusion 24 Quote Share this post Link to post
Redneckerz Posted November 27, 2022 Sounds similar to PNG2WAD. Nice idea. 0 Quote Share this post Link to post
janiform Posted November 28, 2022 Great idea! Whatever its current limitations, this is very clever and promising. I've been hoping someone would find a way to use StableDiffusion to generate Doom maps for a long time. I hope you continue working on this! 0 Quote Share this post Link to post
DavidN Posted November 28, 2022 This looks like it could lead to some interesting things :) I'm interested in how it works! Is the PNG just the image we see, or is there more encoded into the metadata as well (like which colours correspond to which textures)? 3 Quote Share this post Link to post
andrewj Posted November 28, 2022 (edited) 7 hours ago, DavidN said: This looks like it could lead to some interesting things :) I'm interested in how it works! Is the PNG just the image we see, or is there more encoded into the metadata as well (like which colours correspond to which textures)? The textures and flats are defined in a file called DOOM_TEX.CFG -- the converter looks them up by name, and the reconstruction program looks them up by number. This is used for all images, a common database you could say, otherwise each image is self-contained. The blue channel of the RGB image has the texturing info, the red channel encodes the floor heights, the green channel encodes the ceiling heights. Edited November 28, 2022 by andrewj 2 Quote Share this post Link to post
Kinsie Posted November 28, 2022 Neat stuff! Pretty accurate with the reconstruction, too. Might be worth creating a second image (or abusing the Alpha channel?) with single pixels to define thing placements? 1 Quote Share this post Link to post
lucius Posted November 28, 2022 (edited) I think using the alpha channel light level might make sense. Though you have to be careful for alpha = 0 (premultiplied alpha and all). But that can be fixed with a small offset. Then you can reproduce the core geometry pretty well from the "geometry image." :)- You would need another image to store gameplay elements, things, triggering lines, sector tags, etc. - which don't fit as well in the image format. Unless the idea is to produce the geometry from the images and then manually add the gameplay elements. * Note - I realize this isn't quite the same as Geometry Images, which encode position and normals in a texture, but it is the same idea. Edited November 28, 2022 by lucius 1 Quote Share this post Link to post
DavidN Posted November 29, 2022 (edited) As there are so many possible colours (256^3) compared to the number of flats/textures you would realistically have in a Doom WAD, maybe each of the R, G and B values could correspond to something different - like a normalmap Edit: On closer examination of the reply to my first post, this is already exactly what it's doing! Edited November 29, 2022 by DavidN 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.