Decorations won't float

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Cheeki
Posts: 12
Joined: Mon May 30, 2016 4:26 am

Decorations won't float

Post by Cheeki »

I'm trying to place a dead marine on the ground and no matter what I set it always falls a little bit through the floor and ends up looking dumb. How do I make the bottom of decorations actually rest on the floor? Setting gravity to 0 does nothing and I can't find anything else that would affect Z axis placement.
User avatar
Kappes Buur
 
 
Posts: 4200
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Decorations won't float

Post by Kappes Buur »

Open your map with Slade3.
Give your sprite(s) appropriate offsets.
User avatar
Cheeki
Posts: 12
Joined: Mon May 30, 2016 4:26 am

Re: Decorations won't float

Post by Cheeki »

So is there no way in GZDoom Builder to make a decoration not affected by gravity? I'd really like to avoid having to go into a different editor just for this one decoration to look right.
User avatar
Caligari87
Admin
Posts: 6241
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Decorations won't float

Post by Caligari87 »

You may be misunderstanding what's going on (forgive me if I presume). If your decoration height is at zero (0) then it is resting on the floor, according to physics calculations. Nothing "falls a little bit through" the floor. What you're seeing is a visual issue (mostly a GZDoom one, ZDoom usually isn't affected by this), where the sprite graphic being used for the decoration is not clipped correctly. See [wiki]OpenGL_preferences[/wiki] on the wiki for more details. Relevant section quoted here:
Adjust sprite clipping (Never/Smart/Always/Smarter)

The OpenGL renderer clips off sprites when they go "within" a floor or ceiling; whereas the software renderer overdraws them, a fact which has been willfully exploited to fake certain perspective effects. The result is that many sprites are abruptly cut off when they shouldn't be. The adjustment cheats by adjusting their offset so that they are less cut off.
  • Never: Offsets are not adjusted at all.
  • Smart: Offsets are only adjusted if they meet certain criteria.
  • Always: Offsets are always adjusted if they make the sprite sink in the ground.
  • Smarter: Offsets are adjusted in a wider range of cases than with "smart", including if they sink in the ceiling. The amount by which they are adjusted is scaled according to the overall height of the sprite. Very small sprites (such as POB2A0) are visible, contrarily to "smart", even if they are offset in the ceiling (such as CDRP[ABCD]0); and tall sprites (such as TGRNA0) do not seem to hover above the floor, contrarily to "always".
So, your options are:
  • Change your OpenGL options to adjust the sprite clipping to your liking.
  • Adjust that particular sprite offset yourself in Slade. If the sprite is in an IWAD, this may involve copying the sprite to your wad/pk3 or using [wiki]TEXTURES[/wiki], since you should never edit the IWADs
User avatar
Cheeki
Posts: 12
Joined: Mon May 30, 2016 4:26 am

Re: Decorations won't float

Post by Cheeki »

Thanks man, setting sprite clipping to "always" fixed the problem for me.
Locked

Return to “Editing (Archive)”