Aligning png sprites and hirestex scaling problem
Moderator: Graf Zahl
-
- Posts: 18
- Joined: Tue Jan 17, 2006 7:22
Aligning png sprites and hirestex scaling problem
i can't seem to align my png sprites at all. I hit 'apply align' in the xwe beta and when i test it out on gzdoom 1.04, the sprites are always below the floor. When i check back on xwe, the png stays at 0x0, So i tried messing around with the offsets which didnt work. Also, Im also having problems defining and scaling high resolution sprites. I enter in all the right perameters and everything in the hirestex lump, but it does nothing. Is that do to putting the sprites inbetween the start and end markers?
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
"Apply align" only applies the offsets you have selected - it does't auto align sprites or anything. Try setting offsets of X=half the sprite's width and Y=the full height of the sprite (those should be reasonable values to start with) select apply align then load your WAD into GZDoom. Works for meâ„¢
-
- Posts: 18
- Joined: Tue Jan 17, 2006 7:22
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Shouldn't be, but if you like, you can attach it, I'll offset it and you can inspect it with XWE to see how it appears.fiend-o-hell wrote:Do you think the png sprite itself is the problem?
Oh, or course the other option is to use Randy's setpng command line tool that I think Graf links to from the download page.
-
- Posts: 18
- Joined: Tue Jan 17, 2006 7:22


Hmm same results. Below is a test wad with the sprites. The sprites also sputter around when your facing them in different positions which seems odd to me because im 100% positive those are all titled right.
BTW, isnt setpng already integrated into xwe?
BTW2, if it can be done at all, can u expain to me how i can scale highres sprites by defining them in the hirestex lump.
- Attachments
-
- recall1.rar
- (111.8 KiB) Downloaded 78 times
- solarsnowfall
- Persecution Complex
- Posts: 363
- Joined: Fri Aug 05, 2005 8:51
-
- Posts: 18
- Joined: Tue Jan 17, 2006 7:22
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Right, on playing the WAD, I think the jumping side to side is because the offset is simply being ignored by GZDoom (rightly or wrongly - I don't know). The graphic is being centred on one of its edges and the fact that it is a mirrored sprite probably accentuates this. Anyway, I tried the following:
Extracted your graphics, used setpng to give them the required offsets and put them back in the WAD. No improvement. Not XWE's problem.
Altered and saved the graphics with PSP to destroy the offset info and repeated the above. Still no improvement. Definitely not XWEs problem.
Removed the hi-restex lump and did the scaling via decorate. The sprite still jumped around.
Reduced the sprites to 256 colour paletted PNG images, set translucency in PSP, set offsets in XWE and voila: it looked fine.
Finally, I extracted your original graphics again, renamed them (baco instead of caco) threw them into my fixed wad with the following hirestex lump:
And your hi-colour sprites were used and looked fine - taking their size and offsets from the correctly set up paletted PNG graphics already in the file.
So, it seems that GZDoom is not using the offset information from PNGs in the format you provided. This may or may not be correct behaviour. It does, however, take sizes and offsets from graphics they are mapped to in hirestex. That certainly is correct behaviour.
For my money, I didn't notice any appreciable loss in quality when reducing the sprite to paletted images, so I'd just use them like that unless you want built in translucency which seems to be much harder/impossible with paletted images. I don't know if GZDoom is supposed to get offset info from images in your format, but it would certainly make sense for it to, if such a thing is possible.
Extracted your graphics, used setpng to give them the required offsets and put them back in the WAD. No improvement. Not XWE's problem.
Altered and saved the graphics with PSP to destroy the offset info and repeated the above. Still no improvement. Definitely not XWEs problem.
Removed the hi-restex lump and did the scaling via decorate. The sprite still jumped around.
Reduced the sprites to 256 colour paletted PNG images, set translucency in PSP, set offsets in XWE and voila: it looked fine.
Finally, I extracted your original graphics again, renamed them (baco instead of caco) threw them into my fixed wad with the following hirestex lump:
Code: Select all
remap cacob1 bacob1
remap cacob2b8 bacob2b8
remap cacob3b7 bacob3b7
remap cacob4b6 bacob4b6
remap cacob5 bacob5
So, it seems that GZDoom is not using the offset information from PNGs in the format you provided. This may or may not be correct behaviour. It does, however, take sizes and offsets from graphics they are mapped to in hirestex. That certainly is correct behaviour.
For my money, I didn't notice any appreciable loss in quality when reducing the sprite to paletted images, so I'd just use them like that unless you want built in translucency which seems to be much harder/impossible with paletted images. I don't know if GZDoom is supposed to get offset info from images in your format, but it would certainly make sense for it to, if such a thing is possible.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
-
- Posts: 18
- Joined: Tue Jan 17, 2006 7:22