How do I downscale my weapon sprite on Slade etc.?

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.

How do I downscale my weapon sprite on Slade etc.?

Postby MiMaDM » Sun Jan 30, 2022 2:27 pm

Hey hey all I just finished a placeholder image for my gun and it looks pretty big on Slade, I have seen high resolution weapons in wads so I think there is a way to scale them down.
Could anyone help?
[imgur]https://imgur.com/a/J3ydyCg[/imgur]
MiMaDM
 
Joined: 18 Apr 2021
Discord: MiMaDM#6663
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: How do I downscale my weapon sprite on Slade etc.?

Postby Blue Shadow » Mon Jan 31, 2022 12:17 am

The TEXTURES lump can be used for that. There's also a brand-new, much more convenient feature (currently only available in development builds) that allows you to do the scaling from the weapon's code, via the use of Weapon.WeaponScaleX and Weapon.WeaponScaleY properties.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: How do I downscale my weapon sprite on Slade etc.?

Postby Sir Robin » Mon Feb 07, 2022 9:16 pm

Did you get it to work? I do this myself, just as Blue Shadow suggested, in the textures lump. I am ripping graphics from an old game, that game has a display of 172x112 So I have to scale all the sprites up to fit on the virtual 320x200 screen for the weapons hud. You can use the same technique to scale your down.

Here's what one of my sprite frames looks like:
Code: Select allExpand view
sprite UWAAB0, 50, 57 // Weapon=Sword hand=right skin#=0
{
   XScale 0.5375
   YScale 0.56
   offset -11, -55
   patch "patches/uw1/weapons.gr/weapons.gr.i0.wp0.png", 0, 0
}

Note that the scale is inverted - a value of less than 1 will enlarge the sprite, a value greater than 1 will shrink it
Note that the offsets are also scaled. So for example if your sprites are drawn for 640x480, make the offsets relative to that resolution also, and they will be scaled along with the sprite.

To view these in Slade, make sure you have Offset type set to HUD (at the bottom left) and Apply Scale is checked (at the top right)
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests