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.

Custom weapon sprite cutoff

Postby KVELLER » Tue Apr 19, 2022 3:27 pm

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 allExpand view
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
KVELLER
 
Joined: 09 Feb 2017

Re: Custom weapon sprite cutoff

Postby Enjay » Tue Apr 19, 2022 4:08 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Custom weapon sprite cutoff

Postby KVELLER » Tue Apr 19, 2022 4:28 pm

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!
User avatar
KVELLER
 
Joined: 09 Feb 2017


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests