Author Topic: Cockpit HUD Surfaces Starter Kit  (Read 12105 times)

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Cockpit HUD Surfaces Starter Kit
A gift from Diaspora. Seeing how DRADIS RTT has been tested, I feel general HUD to cockpit RTT is now ready to apply to other gauges. It's not an exhaustive proof of concept, but just enough to get modders to play with this feature.

I used Vasudan Admiral's Terran cockpit and Scooby's Banshee cockpit. (Scooby plz)





Extract into your Freespace2 installation and set the Launcher mod to cockpitmod. Run the included EXEs. Use either the Ulysses or the Myrmidon. The binaries are based off of fs2open/trunk revision 9263 without any modifications.

http://www.mediafire.com/?2xvyf7gq8k6v20h

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Cockpit HUD Surfaces Starter Kit
oh goodie, i can delete a massive swath of bugridden rtt script.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Re: Cockpit HUD Surfaces Starter Kit
That's awesome !!

 

Offline esarai

  • 29
  • Steathy boi
    • Minecraft
Re: Cockpit HUD Surfaces Starter Kit
I wanna adapt my fighters to use this, looks boss.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Cockpit HUD Surfaces Starter Kit
Finally. :yes: Can't wait to play around with that.

 

Offline Al-Rik

  • 27
Re: Cockpit HUD Surfaces Starter Kit
Whoaaa ! :eek:

That add's a lot of immersion to the game.
Congrats for adding this new function to a game engine that never ever had such a thing. That's 1337 skill ;)

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Cockpit HUD Surfaces Starter Kit
I wouldn't say that it was exclusively my 1337 skill that let this happen. :D

It was mostly a combination of a lot of efforts from different programmers over the years. Taylor had already written in framebuffer object support which let us have render to texture capabilities. Nuke's cockpit RTT scripts helped me prototype the feature before I was able to solidify the code structure and interfaces in the game engine.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Cockpit HUD Surfaces Starter Kit
good thing those scripts were useful to someone. scripting is an awesome place to prototype new engine features.

any chance of getting an on gauge draw scripting hook (render context sensitive of course, stuff could either end up being drawn to the hud or texture as per hud_gauges.tbl configuration), and a dummy gauge type that doesnt do anything (other that get used in aforementioned hook as a scripted gauge)?
« Last Edit: October 15, 2012, 04:29:13 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: Cockpit HUD Surfaces Starter Kit
Woooooo  :eek2:
I just found this thread.  I need to know how to implement this  :)
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Cockpit HUD Surfaces Starter Kit
Diaspora did it.. check their modpack.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 
Re: Cockpit HUD Surfaces Starter Kit
Just tried your tables with saga's engine build... no go,  I'll have to wait till i convert things over to a newer build.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Cockpit HUD Surfaces Starter Kit
Well, Saga locked and forked their build long before any of the features necessary for this made it into the official trunk. It's never going to work with their build, unless they decide to update.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: Cockpit HUD Surfaces Starter Kit
Ya, I'm going to have to someday rebuild/import  the most important tables from saga into the newer builds (weapons, ships, sounds).  Hardest part is one table effects another table effects another table... ugh
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 
Re: Cockpit HUD Surfaces Starter Kit
Yaaa got it to work... but I just noticed something: $Base: (1440, 800)   Thats ok if your running at that resolution, we need a way of automating this.
Also do you lose all your other hud display controls when this is active?
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Cockpit HUD Surfaces Starter Kit
what you can do is just make a separate gauge config with no resolution filters with your HUD displays defined in there.

For resolution specific gauges, just make with their respective resolution filters as usual. Kind of clunky, sorry.

 
Re: Cockpit HUD Surfaces Starter Kit
Wait..what? I'm a bit confused now. Is the display offset, display size and canvas size based on the screen resolution or the hud texture resolution?

edit: looks like some of it's  based on texture resolution. 

Correct me if I'm wrong but:
Display Size  = how big of the area in the texture this covers
Display Offset  = where the area in the texture starts at [top-left corner]
$Base = size of texture (i've noticed putting in a much smaller value will cause the hud to be displayed in the original location)
position = sorta an offset that gets used for the rendered hud (let's you pad the hud mesh)
canva size = not exactly sure what this does  :confused:  All i know is putting smaller numbers produces larger scaling values.   Is there any formula for this?


Also on another note (perhaps because i have a crummy GT610, but when the hud is visible i lose half my framerate.
« Last Edit: April 25, 2013, 03:44:48 am by Scooby_Doo »
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Cockpit HUD Surfaces Starter Kit
They will always be based off the HUD texture resolution. When defining a gauge to render to target, it will ignore base resolution.

 
Re: Cockpit HUD Surfaces Starter Kit
Also just learned that the uv area size of hud texture doesn't seem to matter much, which is a good thing and bad thing (I can squeeze more controls into the hud, but i have to redo the ship cockpit uv).

Still haven't found out how canvas size exactly works.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Cockpit HUD Surfaces Starter Kit
Canvas size defines the scale factor of your gauges before they are actually drawn to texture.

Say you have a 500x500 gauge but want to shrink it down to a 250x250 section on a texture. You set the Canvas Size to 500, 500 while the Display Size is set to 250, 250.

Say you have a 250x250 gauge but want to enlarge it up to a 500x500 section on a texture. You set the Canvas Size to 250, 250 while the Display Size is set to 500, 500

 
Re: Cockpit HUD Surfaces Starter Kit
Some of it's making sense.. still confused about other parts.

Let me get this right, let's say I have a player shield  thats coords on the texture are (0,767) and goes down to (256, 1024)... basically (256*256).
so...

Position:(0,0)
Canvas Size: (256,256)
Display Offset (0,767)
Display Size (256,256)

The result is a shield icon that's taking up less than 1/4 the actual area it's suppose to. In face i have to take Display size up to (550,550).  Any clue why?


On another note... there's +Center Recticle, but are there any other aiming controls?  Freespace has those curved arches on both sides (sorta like this: http://www.firingsquad.com/games/freespace-2/images/28.jpg)  And on that note, transparency, does this do anything for it or should the hud texture have transparent areas?
Edit: Nope that doesn't work, it makes the hud part invisible.  :blah:
« Last Edit: April 26, 2013, 02:56:00 am by Scooby_Doo »
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"