[GZDoom] Orient billboard sprites toward camera

Moderator: GZDoom Developers

Post Reply
User avatar
biospud
Posts: 206
Joined: Mon Oct 14, 2013 2:19 pm
Location: California, USA
Contact:

[GZDoom] Orient billboard sprites toward camera

Post by biospud »

Game sprites look much better in virtual reality when they are oriented toward the camera, rather than just being oriented perpendicular to the player view direction.

This way, when the player stops and looks around in different directions, the sprites remain mostly stationary, rather than spinning around crazily. So I added a new CVAR in GZ3Doom, "gl_billboard_faces_camera", to provide an option for this mode of sprite orientation.

And gzdoom could have the same option too, if you choose to acquire this pull request:
https://github.com/coelckers/gzdoom/pull/50

Sprites oriented toward camera, with gl_billboard_faces_camera = true:
Spoiler:
Traditional mode with sprites oriented perpendicular to view direction:
Spoiler:
User avatar
Major Cooke
Posts: 8214
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by Major Cooke »

This'll probably have to wait for the same reasons as mine does, but this actually looks pretty neat.

However if I recall correctly, don't you have some adjustments on ZDoom's side to add also?
User avatar
biospud
Posts: 206
Joined: Mon Oct 14, 2013 2:19 pm
Location: California, USA
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by biospud »

Major Cooke wrote:This'll probably have to wait for the same reasons as mine does, but this actually looks pretty neat.

However if I recall correctly, don't you have some adjustments on ZDoom's side to add also?
Yikes. I changed the same part of gl_sprite.cpp that your pull request did Major Cooke. It would be a yukky job just merging our two pull requests together. Well, I've got my feature in GZ3Doom, where I need it for the time being. I doubt I'll be pushing any true VR stuff into gzdoom in the next few months. Perhaps I'll work up another pull request later, when the temperature has cooled down in this part of the code.

I have no serious plans to add anything to the zdoom side at the moment. What are you referring to?
User avatar
Major Cooke
Posts: 8214
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by Major Cooke »

Ah. Mainly any sort of compatibility. Like, in that one, that has flags. +ROLLSPRITE for example.

Yeah. Until graf finds some way to safely draw sprites on both sides of a portal... Neither of these things is gonna happen for a while I'm afraid.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [GZDoom] Orient billboard sprites toward camera

Post by Graf Zahl »

Major Cooke wrote: Yeah. Until graf finds some way to safely draw sprites on both sides of a portal...

As it just so happens, I completed that part yesterday evening. I did it entirely with clipping planes so it'll automatically be applied to all sprite types.
User avatar
Major Cooke
Posts: 8214
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by Major Cooke »

OH SHIT! Okay, I'll update my pull request now! :mrgreen:
User avatar
Ral22
Posts: 531
Joined: Sun Sep 05, 2010 12:09 pm
Preferred Pronouns: He/Him
Location: The Fortress of Dr. Radiaki
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by Ral22 »

Question: Can this be applied as a flag on an actor, like FORCEXYBILLBOARD? In my opinion, sprites in skyboxes and some larger sprites benefit from always orienting to the camera, but in general gameplay with monsters and such, I prefer the other methods.
User avatar
Major Cooke
Posts: 8214
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by Major Cooke »

You know... That actually sounds like a good idea. I'll apply that to my rolling sprites submission.
User avatar
maseter
Posts: 170
Joined: Wed Apr 15, 2015 1:16 pm

Re: [GZDoom] Orient billboard sprites toward camera

Post by maseter »

Could this be expanded even further to do something like this?
Image
User avatar
Major Cooke
Posts: 8214
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [GZDoom] Orient billboard sprites toward camera

Post by Major Cooke »

That's what my rolling/flat sprites submission is for.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”