How to create LMP sprite lumps?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
GrayFace
Posts: 32
Joined: Mon Feb 13, 2023 1:34 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 x64
Graphics Processor: ATI/AMD with Vulkan/Metal Support

How to create LMP sprite lumps?

Post by GrayFace »

All I found for dealing with *.lmp so far is SLADE and SLumpEd, but all they can do is export LMP sprites or edit a few pixels in existing ones, with no way to import them from PNG or BMP. What tool can actually do that?
Jarewill
 
 
Posts: 1845
Joined: Sun Jul 21, 2019 8:54 am

Re: How to create LMP sprite lumps?

Post by Jarewill »

You can actually use PNGs for modding and they will be recognised as long as you put them in the correct place.
For example sprites go into a "sprites" folder in .pk3 files, or between S_START and S_END markers in .wad files.

However if you want to convert PNGs into image lumps, you can do it in SLADE using its converter:
First right click the graphic and select "Convert to..."

Then select "Doom Gfx (Paletted)" in the drop down box, it should be the default:

And convert:

Now your image file should have been converted into a lump.
GrayFace
Posts: 32
Joined: Mon Feb 13, 2023 1:34 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 x64
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: How to create LMP sprite lumps?

Post by GrayFace »

Jarewill wrote: Fri Sep 15, 2023 12:41 pm You can actually use PNGs for modding and they will be recognised as long as you put them in the correct place.
For example sprites go into a "sprites" folder in .pk3 files, or between S_START and S_END markers in .wad files.

However if you want to convert PNGs into image lumps, you can do it in SLADE using its converter:
Thank you!
The real reason for my problems turned out to be GIMP's inability to load paletted PNGs. When I loaded BMPs and then made them into PNGs, they work fine and respect color translations. Indeed, no need to bother with LMPs, but good to know how.
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: How to create LMP sprite lumps?

Post by ramon.dexter »

Well, gimp is not good tool for working with palleted graphics.
I'm using Aseprite, it work with palleted graphics with ease. It's payed, but honestly, its a good piece of software for $20.
User avatar
axredneck
Posts: 400
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: How to create LMP sprite lumps?

Post by axredneck »

GrayFace wrote: Fri Sep 15, 2023 1:36 pmThe real reason for my problems turned out to be GIMP's inability to load paletted PNGs.
It works for me. What i'm doing wrong?
GrayFace
Posts: 32
Joined: Mon Feb 13, 2023 1:34 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 x64
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: How to create LMP sprite lumps?

Post by GrayFace »

axredneck wrote: Thu Sep 21, 2023 10:54 am
GrayFace wrote: Fri Sep 15, 2023 1:36 pmThe real reason for my problems turned out to be GIMP's inability to load paletted PNGs.
It works for me. What i'm doing wrong?
*Paletted PNGs with transparency. It works on some of them, like 50/50. When it doesn't work, it butchers them when loading. This time it did it when saving, not even when loading.
User avatar
axredneck
Posts: 400
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: How to create LMP sprite lumps?

Post by axredneck »

GrayFace wrote: Fri Sep 29, 2023 10:32 am...
*Paletted PNGs with transparency. It works on some of them, like 50/50. When it doesn't work, it butchers them when loading. This time it did it when saving, not even when loading.
Do you mean paletted PNGs with semi-transparency?
If so, then yes, Gimp (along with many other software) doesn't support them.
GrayFace
Posts: 32
Joined: Mon Feb 13, 2023 1:34 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 x64
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: How to create LMP sprite lumps?

Post by GrayFace »

axredneck wrote: Fri Sep 29, 2023 11:25 am
GrayFace wrote: Fri Sep 29, 2023 10:32 am...
*Paletted PNGs with transparency. It works on some of them, like 50/50. When it doesn't work, it butchers them when loading. This time it did it when saving, not even when loading.
Do you mean paletted PNGs with semi-transparency?
If so, then yes, Gimp (along with many other software) doesn't support them.
Those are ones it's having issues loading. Maybe they were saved imperfectly too.
As for saving, it can't save transparency for paletted PNGs at all. Open any PNG exported by SLADE and try to save it, transparency would be gone.
User avatar
axredneck
Posts: 400
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: How to create LMP sprite lumps?

Post by axredneck »

I tried, and yes, it doesn't work. But it worked before, probably a year or two ago, so it looks like a regression in GIMP.
Edit: i tried Krita, and it messes up transparency in Doom pngs exported by Slade too.
Edit2: i tried different software: MTPaint, XnView, Pixelorama, LibreSprite - OK; GIMP, Krita - bug.
Edit3: i only experience this bug with files created by Slade. If i open the file in XnView, then export it, and then open it in GIMP, then GIMP works with it without the bug.
User avatar
axredneck
Posts: 400
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: How to create LMP sprite lumps?

Post by axredneck »

I experimented more:
- First, i extract any graphics lump from Doom to png file using Slade,
- Then open it in any graphics editor (including GIMP),
- Convert it to 32-bit, and then back to indexed 8-bit,
And now GIMP handles it without problems.
GrayFace
Posts: 32
Joined: Mon Feb 13, 2023 1:34 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 x64
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: How to create LMP sprite lumps?

Post by GrayFace »

axredneck wrote: Mon Oct 02, 2023 4:49 pm I experimented more:
- First, i extract any graphics lump from Doom to png file using Slade,
- Then open it in any graphics editor (including GIMP),
- Convert it to 32-bit, and then back to indexed 8-bit,
And now GIMP handles it without problems.
The way I tried that worked - if I save a file as BMP, then open it in GIMP, hide the layer and paste the transparent image on top, it can then be saved as PNG.

Return to “Assets (and other stuff)”