Jump to content

Doom map → image → Doom map


andrewj

Recommended Posts

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!

Share this post


Link to post

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)?

Share this post


Link to post
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 by andrewj

Share this post


Link to post

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?

Share this post


Link to post

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 by lucius

Share this post


Link to post

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 by DavidN

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...