Aligning png sprites and hirestex scaling problem

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
fiend-o-hell
Posts: 18
Joined: Tue Jan 17, 2006 7:22

Aligning png sprites and hirestex scaling problem

Post by fiend-o-hell »

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?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

"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â„¢
fiend-o-hell
Posts: 18
Joined: Tue Jan 17, 2006 7:22

Post by fiend-o-hell »

oh i c... but i still have the same problem. No matter what offset i set it to, the sprite will still show up at the same place. Do you think the png sprite itself is the problem?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Make sure that the alignment cursor of XWE's graphic display is where you want it to be and then make sure it actually gets saved. I have aligned a considerable amount of sprites with this and all of them work fine.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

fiend-o-hell wrote:Do you think the png sprite itself is the problem?
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.

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.
fiend-o-hell
Posts: 18
Joined: Tue Jan 17, 2006 7:22

Post by fiend-o-hell »

Image

Image

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
User avatar
solarsnowfall
Persecution Complex
Posts: 363
Joined: Fri Aug 05, 2005 8:51

Post by solarsnowfall »

I've noticed this same problem, and I think it's most likely an issue with XWE.
fiend-o-hell
Posts: 18
Joined: Tue Jan 17, 2006 7:22

Post by fiend-o-hell »

ah good, then im not the only one. Ive tested regular doom palleted sprites the same exact way and it worked flawlessly. What could be the problem? I made a whole batch of cocodeamon sprites for nothing lol.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

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:

Code: Select all

remap cacob1 bacob1
remap cacob2b8 bacob2b8
remap cacob3b7 bacob3b7
remap cacob4b6 bacob4b6
remap cacob5 bacob5
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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

GZDoom uses DevIL to read true color PNGs. DevIL doesn't know anything about offsets so they aren't read. As Enjay said, convert them to a paletted format and the offsets can be used.
User avatar
solarsnowfall
Persecution Complex
Posts: 363
Joined: Fri Aug 05, 2005 8:51

Post by solarsnowfall »

Thanks for the tip.
fiend-o-hell
Posts: 18
Joined: Tue Jan 17, 2006 7:22

Post by fiend-o-hell »

Great, thanks!
fiend-o-hell
Posts: 18
Joined: Tue Jan 17, 2006 7:22

Post by fiend-o-hell »

just a word of advice, dont EVER post hi-res images inbetween hi_start and hi_end markers like the documantation says to remap sprites....
Locked

Return to “GZDoom”