Custom weapon sprite cutoff

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.
User avatar
KVELLER
Posts: 6
Joined: Thu Feb 09, 2017 12:50 pm

Custom weapon sprite cutoff

Post by KVELLER »

I have a custom DECORATE weapon with a firing animation comprised of high resolution sprites (scaled down with a TEXTURES lump), and the last frame gets cutoff at the top:
Screenshot_Doom_20220419_165805.jpg
Here's the sprite:
REBFD0.png
This is on GZDoom 4.7.1. Is there a limit to how big sprites can be on the screen or something like that?

This is its TEXTURES definition, if it helps at all:

Code: Select all

sprite REBFD0, 960, 454
{
	XScale 2.2
	YScale 2.2
	Patch REBFD0, -130, -80
}
You do not have the required permissions to view the files attached to this post.
User avatar
Enjay
 
 
Posts: 26722
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Custom weapon sprite cutoff

Post by Enjay »

It's the alignment of the patch inside your texture. You have shifted it vertically by 80 pixels - so 80 pixels are outside the "frame" of the texture.

Here is your sprite with the top 80 pixels cut off. It is cut off in the same place as the one in your screenshot.



(Perhaps counter-intuitively, a -ve offset of a patch inside a texture moves it up and a +ve one moves it down.)
User avatar
KVELLER
Posts: 6
Joined: Thu Feb 09, 2017 12:50 pm

Re: Custom weapon sprite cutoff

Post by KVELLER »

Enjay wrote:It's the alignment of the patch inside your texture. You have shifted it vertically by 80 pixels - so 80 pixels are outside the "frame" of the texture.
Ohh, I get it now! Silly me was using the patch origins as offsets instead of... y'know... the damn offset property.

Thanks a bunch!

Return to “Assets (and other stuff)”