Flat sprites on GL.

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
DoomDude2009
Posts: 51
Joined: Mon May 11, 2009 6:02 pm
Location: Mars City HQ

Flat sprites on GL.

Post by DoomDude2009 »

While on GL rendering, is there any way to prevent sprites from looking flat when you look at them from above? :x
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Flat sprites on GL.

Post by Gez »

[wiki=File:BillboardAxes.png]Billboarding[/wiki]

Of course, both possible results look like crap.
User avatar
Enjay
 
 
Posts: 27117
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Flat sprites on GL.

Post by Enjay »

It is really only useful for projectiles - and in particular round ones.

You should also be aware that XY billboarding will mean that sprites ignore the lighting under 3D floors and they will take their lighting information from the main sector (usually above the 3D floor) instead. With bright projectiles, this is not an issue as they are always fullbright anyway.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Flat sprites on GL.

Post by Xaser »

Enjay wrote:You should also be aware that XY billboarding will mean that sprites ignore the lighting under 3D floors and they will take their lighting information from the main sector (usually above the 3D floor) instead.
I'm intrigued -- why is this? Normally I wouldn't think that billboarding would have anything to do with sector lighting.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: Flat sprites on GL.

Post by Ceeb »

Gez wrote:[wiki=File:BillboardAxes.png]Billboarding[/wiki]

Of course, both possible results look like crap.
Ah yes, because you know everything. :glare:
Enjay wrote:You should also be aware that XY billboarding will mean that sprites ignore the lighting under 3D floors and they will take their lighting information from the main sector (usually above the 3D floor) instead. With bright projectiles, this is not an issue as they are always fullbright anyway.
That... Would explain the problem I'm having. :P
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Flat sprites on GL.

Post by Project Shadowcat »

Ceeb wrote:
Gez wrote:[wiki=File:BillboardAxes.png]Billboarding[/wiki]

Of course, both possible results look like crap.
Hey, he's right. Either you're fighting a piece of animated paper or something fighting in your HUD. The different method of looking around in GZDoom demands models.
User avatar
phi108
Posts: 976
Joined: Sat Dec 01, 2007 6:28 pm

Re: Flat sprites on GL.

Post by phi108 »

I think there's a DECORATE feature (maybe added by torr) that forces Y or XY billboarding in GL mode. If so, it makes sense to force XY for all torches and hanging corpses and most decorations, and force Y billboarding for all fireball projectiles and stuff. Monsters, it's the users preference.
Would this be a useful thing to have added to all default stuff in Gzdoom.pk3?

EDIT: Found the flags:



FORCEYBILLBOARD (OpenGL only: not supported by ZDoom)
Added for GZDoom and Skulltag compatibility. Forces the actor's sprite to "billboard" to the screen on the Y-axis when using the OpenGL renderer. Does nothing in ZDoom.

FORCEXYBILLBOARD (OpenGL only: not supported by ZDoom)
Added for GZDoom and Skulltag coampatibility. Forces the actor's sprite to "billboard" to the screen on the X- and Y-axes when using the OpenGL renderer. Does nothing in ZDoom.
User avatar
Enjay
 
 
Posts: 27117
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Flat sprites on GL.

Post by Enjay »

Xaser wrote:I'm intrigued -- why is this? Normally I wouldn't think that billboarding would have anything to do with sector lighting.
Over at DRD Graf Zahl wrote:X/Y billboarding ignores 3D-floors because as the code is written it won't work and to be honest - so far it has been ultra-low priority to implement it. This particular issue was my main motivation that I never did it before. It's only in because I got the code from Skulltag.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Flat sprites on GL.

Post by Gez »

Ceeb wrote:Ah yes, because you know everything. :glare:
Got a problem with that? Any way you cut it, a horizontal view of an enemy is going to look wrong when seen from above or below.

There are some things that work okay when billboarded on the Y axis (such as hanging ropes or other tall but thin things). There are some things that work okay when billboarded on the XY axes (such as fireballs and other round things). But most things will simply look wrong. You'd need to have vertical rotations as well to salvage the sprite system in a full 3D environment.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Flat sprites on GL.

Post by Graf Zahl »

DoomDude2009 wrote:While on GL rendering, is there any way to prevent sprites from looking flat when you look at them from above? :x

Here's the big secret:

Sprites *ARE* flat! So all you can do is trying to hide this fact which often looks worse than doing nothing.
User avatar
Lord_Z
Posts: 189
Joined: Sun Jun 15, 2008 2:11 pm
Location: Temporal Singularity

Re: Flat sprites on GL.

Post by Lord_Z »

Graf Zahl wrote:So all you can do is trying to hide this fact which often looks worse than doing nothing.
Yeah but it is a lot easier to see what you are looking at if the sprites are always facing you, especially if you using mouse look.
User avatar
Enjay
 
 
Posts: 27117
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Flat sprites on GL.

Post by Enjay »

Personally, I'd much rather have the sprites appear paper thin when looking down on them rather than have them "lie down" - regardless of whether they are easier to see or not.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Flat sprites on GL.

Post by Xaser »

I prefer the flat-paper method (Y) myself for the same reason. I'd rather see the flatness than watch decorations magically fall over and enemies walk flat on their stomachs. Makes for some funny screenshots, though. ;)

A thought: Shouldn't round projectiles in Doom have +FORCEXYBILLBOARD on by default? Imp balls, plasma balls, and all that, I see no reason to have them show up as paper by default.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Flat sprites on GL.

Post by Gez »

Yeah, they could. Just like things like [wiki=Classes:SkullHang70]this[/wiki] or especially [wiki=Classes:ZChainBit64]that[/wiki] could have +FORCEYBILLBOARD because they'll look really, really wrong with an XY billboard.
User avatar
Enjay
 
 
Posts: 27117
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Flat sprites on GL.

Post by Enjay »

Xaser wrote:A thought: Shouldn't round projectiles in Doom have +FORCEXYBILLBOARD on by default? Imp balls, plasma balls, and all that, I see no reason to have them show up as paper by default.
I'm going to go for no. Why? Sure it works fine with a unmodified Doom but as soon as you load a mod that changes the fireball to something else (eg via dehacked) then it would look wrong. The default should be the behaviour that is closest to the original (OK, I know that you can't look up or down in the original) and if anyone wants they could load a patch to force XY billboarding of certain items.
Post Reply

Return to “General”