Jump to content

Recommended Posts

Posted

So I figured it would be good to start a thread about creating a HUD since I'm spinning my wheels on a couple issues. Here's what I'm trying to do:

 

1) Create a simple hud that has heading, altitude, and speed.

2) Create a hud that can change from Air to air, air to ground, navigation.

 

So I was using the wunderluft example and when I get in the cockpit I hit ALT-F1 to remove everything expect the HUD and kneeboard. This is what I've been working with so far.

 

So looking at the code the HUD references TEST_PARAM from test_devices.lua. So I started by seeing if I can pull other data. I found the list of all the getXXXXX and was able to change it from mac number to speed, altitude, and heading.

 

I then went into test_devices.lua and added new param so each one has it's own. I then went into the indicator_page.lua and added the new param and configured them to show where I wanted. So now I HUD that has speed, altitude, and heading.

 

But here's where I am at a loss. Currently when I got into it, I see a "missing texture" where the HUD is. Is there a generic texture I can use there or is it a special one I need? Looking at the indicator_page.lua file it looks for "Bazar/Textures/AvionicsCommon.tga" but I don't see in that in there. I looked for similar file in the A-10C folder and the P-51 folder with no luck.

 

Also, is it possible for it not to display the kneeboard in that view? Is that a setting somewhere?

 

Once I have that all nicely configured, how would I go about creating the different modes? I was looking at the A-10C HUD folder, but that seems more complex then I need it. The SU-25, which is similar to what HUD I would like to replicate - doesn't have a cockpit folder.

 

So I figured we could all help each other out in creating a HUD. I'm willing to help expand the wunderluft demo to have a better HUD, but need some help from the community.

Coder - Oculus Rift Guy - Court Jester

Posted

Spiderpig,

The HUD symbology for the a-10 can be found in DCS World/Mods/Aircraft/A-10c/cockpit/resources/indication textures (that path is from memory and is probably slightly wrong).

They're .tga files and basically have all the symbology crammed onto one image. (They're alpha transparencies as well, so they'll look blank unless you view the alpha channel.)

I guess the engine chops that image up an the fly to render the right symbol where the .lua files tell it too. If you edit those images (most importantly the alpha channel) you will obviously see a change in sim.

Probably not the most useful info but what the heck.

 

Rabbit

System specifications: Computer, joystick, DCS world, Beer

Posted (edited)

I'll test it out and let you know. Thanks.

 

EDIT: So grabbed A-10C hud tga and moved it to other location and renamed it. Opened it up and it basically letters where the hud is but it is working. So now I gotta find a program I can edit the TGA.

 

Any clue on the kneeboard?

Edited by roiegat

Coder - Oculus Rift Guy - Court Jester

Posted

Adding the blank.tga file I created that helped the situtation.

 

 

Now I'm trying to figure out where that map grid comes from in the ALT-F1 view. Normally in the P-51 it would have the map - this just has an annoying orange grid. Will try to find it!

blank.rar

Coder - Oculus Rift Guy - Court Jester

Posted

The blank file works ok....just can't find out where the map gets called from in the ALT-F1 view. Other than that - the first hud version is pretty complete.

Coder - Oculus Rift Guy - Court Jester

Posted

Alt-F1 changes nothing as far as how the indicator is displayed. Indicators which are defined as render_purpose.HUD_ONLY_VIEW in their init.lua will render to the HUD only view. (No duh, Aaron...)

Posted

the Orange Grid is a Poly that's Drawn (w/ Texture missing), it's in the indicators section of the device _init.lua

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Posted

The answer's kind of already in the thread, but the red square is courtesy of the radar device, which contains an indicator. The green square is in the base_page.lua of the HUD indicator. Turn off the grid and show_masks flag.

Posted

Best thing to do is turn off all indicators, and re-enable them one at a time. then remove or re-do the one thats bringing in the missing texture squares.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Posted

Well figuring it was the radar I went into the radar section and commented out the AddGrid line and it's working fine.

 

I've been able to write some code to detect if gears, flaps, and canopy are open.

 

Today's issue is that the heading is showing up as a number from 0-6. I"m trying to figure out how to convert it to the actual angle. Going to see if I can work out the math on it today sometime.

Coder - Oculus Rift Guy - Court Jester

Posted
Well figuring it was the radar I went into the radar section and commented out the AddGrid line and it's working fine.

 

I've been able to write some code to detect if gears, flaps, and canopy are open.

 

Today's issue is that the heading is showing up as a number from 0-6. I"m trying to figure out how to convert it to the actual angle. Going to see if I can work out the math on it today sometime.

 

It's in radians. (2*pi) Not too complicated!

Posted

I don't think the number are coming up right. So the number seems to go from 0 to 6. So given 2*pi lets look at the maximum of 6:

 

6*2=12

12*3.1415926=37.69

 

So it doesn't seem logical. Is there maybe a way for the sim to display radiants instead of a float that I'm using right now?

 

Also, In the wunderluft example there was a gun reticle in there...while it's still in the code - it actually never shows up. Do I need to set something to activate it, or should it show up all the time?

Coder - Oculus Rift Guy - Court Jester

Posted

2*pi is a complete circle, where pi = 180 degrees. (south.) For example, 1.5*pi is 270 degrees... do the math and conversions for yourself to verify! Multiply the value in radians by (180/math.pi) to convert to degrees. If you have further trouble with radians as a concept, Google it up, there are some great websites out there with good explanations!

 

Variables in LUA do not have a type, so there's no such thing as an integer or float... it's all one (sometimes convenient and sometimes frustrating) big party.

 

About the gun reticle... not sure. Use it as a conceptual example, but assume that the actual activation and portrayal of the reticle involve P-51 DLLs. That's what I did.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...