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

Doom map → image → Doom map

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.

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.

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!

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
×