GLDEFS to set actors' billboarding mode

Moderator: Graf Zahl

User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

GLDEFS to set actors' billboarding mode

Post by Gez »

There are many actors that look better with XY billboarding mode (notably most fireballs), and some that are completely broken if they don't have the Y billboarding mode (e.g. the Hexen chain decorations). Others can be left alone to use whatever is the user's preference.

I've been thinking that a way to selectively change the way the standard actors are displayed, without forcing that change on anyone, would be very useful. However, a DECORATE patch would have limitations since we can't update an actor's definition, only replace it altogether, which means also breaking attached dynamic lights, simple DEHACKED mods, and maybe other things. I thought that something simpler could be made in the GLDEFS lump.

So I made it. Here's how the syntax looks:

Code: Select all

Billboards
{
	Y
	{
		Barrel
		KeyGizmoYellow
		KeyGizmoGreen
		KeyGizmoBlue
		KeyGizmoRed
	}
	XY
	{
		KeyGizmoFloatYellow
		KeyGizmoFloatGreen
		KeyGizmoFloatBlue
		KeyGizmoFloatRed
		HereticImpBall
	}
}
Loading that as a GLDEFS lump will warn you that two of the actors don't exist (well, except in HPack) and the things work as expected, with the serpent statues remaining upright and the ball looking like a ball, and the dynamic lights still work if you load them, without having to duplicate them and therefore forcing them to be loaded alongside this.


What do you think, okay or not?
Last edited by Gez on Wed Feb 16, 2011 1:18, edited 1 time in total.
User avatar
NeuralStunner
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Re: GLDEFS to set actors' billboarding mode

Post by NeuralStunner »

I approve! A good idea all around. :)
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: GLDEFS to set actors' billboarding mode

Post by Graf Zahl »

Only if it's completely optional (as in a third option in the menu that explicitly enables it.
User avatar
NeuralStunner
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Re: GLDEFS to set actors' billboarding mode

Post by NeuralStunner »

Yes, as Dyn Lights and Brightmaps are, IIRC.
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: GLDEFS to set actors' billboarding mode

Post by Gez »

Graf Zahl wrote:Only if it's completely optional (as in a third option in the menu that explicitly enables it.
Would be two new options, since we'd need one that defaults to X and one that defaults to XY.

Alternatively, another menu entry ("Allow billboard definition" or something like that).
NeuralStunner wrote:Yes, as Dyn Lights and Brightmaps are, IIRC.
Dynamic lights can be toggled off, but I don't know that brightmaps can. Well, okay there's gl_brightmap_shader, but the menu to change it is not available on all computers. I know that even if I change it through the console, this doesn't affect brightmaps anywhere.

Also, while gl_lights works, gl_attachedlights looks like dead code. It's never checked anywhere else than in the menu.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: GLDEFS to set actors' billboarding mode

Post by Graf Zahl »

Hm, that shouldn't be dead.

As for the billboarding, the reason it needs to be switchable is that it doesn't work right with translucent 3D floors. Sadly that issue is not trivially fixable unless the entire translucency rendering is redone.
wtg62
Posts: 69
Joined: Fri Sep 24, 2010 22:33

Re: GLDEFS to set actors' billboarding mode

Post by wtg62 »

There should be 4 options: Any defined billboard (Stille defaultly Y billboard), Y Billboard, XY Billboard, and X Billboard (These will force every sprite into the billboard but I said all billboard to mean: Sprite is displayed on defined billboard no matter what)
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: GLDEFS to set actors' billboarding mode

Post by Gez »

what.
User avatar
Salad Viking
Posts: 40
Joined: Mon Aug 23, 2010 21:50
Location: A hot air balloon traveling over Chile

Re: GLDEFS to set actors' billboarding mode

Post by Salad Viking »

wtg62 wrote:There should be 4 options: Any defined billboard (Stille defaultly Y billboard), Y Billboard, XY Billboard, and X Billboard (These will force every sprite into the billboard but I said all billboard to mean: Sprite is displayed on defined billboard no matter what)
Um... you have to billboard on the Y-axis at least.

... That's all I've got.
wtg62
Posts: 69
Joined: Fri Sep 24, 2010 22:33

Re: GLDEFS to set actors' billboarding mode

Post by wtg62 »

I think I'm not being clear enough am I?
I'll remove that other option because it kind of would be useless.
Option 1:
Y Billboard
Option 2:
X Billboard
Option 3:
XY Billboard
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: GLDEFS to set actors' billboarding mode

Post by Gez »

Yeah, but the only things that actually exist are Y-billboarding and XY-billboarding, so I don't see why you'd want an option for X-billboarding as well. How would that work? What would it do?
Image
wtg62
Posts: 69
Joined: Fri Sep 24, 2010 22:33

Re: GLDEFS to set actors' billboarding mode

Post by wtg62 »

Yeah, but the only things that actually exist are Y-billboarding and XY-billboarding
Good point. Well lets all think about it. On Y-Axis Sprites rotate on the Y-Axis. On XY-Axis it rotates on Both. Now if there were an X-Axis wouldn't the sprite rotate on a X-Axis?
Know what I'm Saying?
I'm not sure anyone has thought about a Sprite rotating only on a X-Axis here.
Here is a link to some OpenGL website which descibes sprite bill boarding.
http://nehe.gamedev.net/data/articles/a ... article=19
It says sprites can be on a billboard rotating on a X, Y, or Z axis.
So it does exist.
Last edited by wtg62 on Fri Feb 18, 2011 1:33, edited 1 time in total.
User avatar
Salad Viking
Posts: 40
Joined: Mon Aug 23, 2010 21:50
Location: A hot air balloon traveling over Chile

Re: GLDEFS to set actors' billboarding mode

Post by Salad Viking »

Well, here's how billboarding works (I don't actually know the GL specs, so this is based on observation):
  • Y-billboarding, the default in GZDoom, makes sprites always face you horizontally, but not vertically, so it's like a sheet of paper standing up.
  • X-billboarding, optional in GZDoom, makes sprites always face you vertically, so, when combined with Y-billboarding, it's like a sheet of paper that's always face-side to you.
  • Z-billboarding, following the logical progression, means that sprites always rotate to you if you roll. Since GZDoom doesn't allow you to roll, it doesn't even matter if it's on or off.
  • XYZ-billboarding would hypothetically draw a sprite so it's always facing you from all angles, as if drawn to the screen instead of as a flat sheet in the 3D world.
  • If you disabled billboarding, the sprite would look like a sheet of paper standing up that always faces one direction. If you looked at it side-on, it would be invisible, since it's completely flat.
Any combination of billboarding that lacks the Y-axis would be pretty much useless. I can't think of any point to disabling it, so it's not worth the effort. We're fine with just Y- and XY-billboarding.
User avatar
Enjay
Developer
Developer
Posts: 4723
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: GLDEFS to set actors' billboarding mode

Post by Enjay »

I wonder if a sprite - probably a 16 angle sprite - for a fixed decoration of some sort - might look better if the various "bits of paper" always faced the same direction rather than following you around? I think that it'd be similar to putting a bunch of textures on an asterisk shaped arrangement of lines. That does work for decorations like trees so... maybe.
User avatar
Salad Viking
Posts: 40
Joined: Mon Aug 23, 2010 21:50
Location: A hot air balloon traveling over Chile

Re: GLDEFS to set actors' billboarding mode

Post by Salad Viking »

Ehh, I think you're figuring about it wrong. With no billboarding, a sprite would appear like a midtexture on a two-sided linedef, but I suppose it would also face the direction of the actor it appears on. Also, since it's flat and you can't see the sprite side-on, the only angles that could be useful are the front and back angles. A 16-rotation sprite would be pointless if you couldn't see the sides.

The only thing you could possible do with this is if you wanted to make a very surreal mod where the enemies you fight are literally thin as paper, or maybe if you wanted to use the sprites in place of midtextures. There really aren't any practical applications of disabling billboarding.
Locked

Return to “Closed Feature Suggestions”