Jump to content

How To :HUD Export A10C DCS-World for Real HUD


Recommended Posts

For all that are thinking about to build a real HUD for their cockpit:

 

 

I took the time to look again on a old personal problem of mine (Support to Export the HUD -Please!) -

 

Encouraged by some postings/pictures of sleepara in this thread..http://forums.eagle.ru/showthread.....I decided to revisit this problem again (The pity is that Sleepara didn't told anything about the "how-to" ...)

 

.

 

And now I think I got something figured out that you can call "robust".:)

 

 

Sleepara's HUD :

 

Some important notice ahead:

I assume you know what you are doing by using this instruction and you are not a novice editing lua files.

If this is not the case - start your practice here:Dummies Guide for the “MonitorSetup.lua“

 

This HUD-view-port export will only work satisfying if you don't want to use the in-cockpit collimated HUD any-more and Have a static view/projection of the Hud-only-view ! -

 

So If you don't have a projector for it and still want to use TrackIR:

Don't waste your time !!

- just don't even try to make the edits ,

as the in-cockpit HUD will not be collimated and usable any-more.

 

And: Don't blame me for not making backups -

and turning your installation FUBAR !

 

 

Edit: Updated this post to reflect the chages that came with DCS World 1.2.0

Here is also a file package for simple Copy'N'Paste for DCS World 1.2.0

I attached my working files Including a instruction and a demo monitorsetup-lua.

>>> http://files.digitalcombatsimulator.com/en/208117/

 

 

 

 

There is maybe a more "elegant" way (if you know how - please share it with us!)- but this is what I found out up to now - and most important : It works!:)

 

When you follow the instruction closely,

the HUD can be placed anywhere inside you in-gamreselution in any size and no HUD is visibile in the HUD-only view, but the HUD-export will still stay visibile.

 

This is how it's done :

 

 

BTW: This works almost the same for the Ka-50/P-51D

File path P-51D: ModsaircraftsP-51DCockpitScriptsGunsight_K14IndicatorK14_init.lua

File path Ka-50: ModsaircraftsKa-50CockpitScriptsHUD_init.lua

..well , you will have to experiment with the SymbologyBox_size in the *_base_page.lua of the different modules.

 

 

Do this edits to your DCS WorldModsaircraftsA-10CCockpitScriptsHUDIndicatorHUD_init.lua

 

Change line #4 from this:

 

indicator_type = indicator_types.COLLIMATOR

 

to this:

 

indicator_type = indicator_types.COMMON

 

 

 

 

and add this after line #7 so you can view this export by using A10_HUD in your "MonitoSetup.lua":

 

local x_size         = 1
local y_size         = 1

function update_screenspace_diplacement(zoom_value)
   local default_width  = 0.5 * LockOn_Options.screen.height + (64 * zoom_value)
   if default_width > LockOn_Options.screen.height then
      default_width = LockOn_Options.screen.height
   end
   
   --if default_width > 0.5 * LockOn_Options.screen.width then
   --   default_width = 0.5 * LockOn_Options.screen.width
   --end
       
   local default_height = (y_size/x_size) * default_width
   local default_y      = LockOn_Options.screen.height - default_height
   local default_x      = LockOn_Options.screen.width  - default_width
  
   dedicated_viewport           = {default_x,default_y,default_width,default_height}
   dedicated_viewport_arcade = {default_x, 0        ,default_width,default_height}
end
--]]

update_screenspace_diplacement(0)    

function set_full_viewport_coverage(viewport)

  dedicated_viewport          = {viewport.x,
                               viewport.y,
                               viewport.width,
                               viewport.height}
  dedicated_viewport_arcade = dedicated_viewport
  purposes                  = {render_purpose.GENERAL,
                               render_purpose.HUD_ONLY_VIEW,
                               render_purpose.SCREENSPACE_OUTSIDE_COCKPIT,
                               render_purpose.SCREENSPACE_INSIDE_COCKPIT} -- set purposes to draw it always 
  render_target_always = true
end
--]]
-- try to find assigned viewport
local multimonitor_setup_name =  "Config/MonitorSetup/"..get_multimonitor_preset_name()..".lua"
local env = {}
     env.screen = LockOn_Options.screen
local f = loadfile(multimonitor_setup_name)
if      f     then
     setfenv(f,env)
     pcall(f)
     
     local vp = nil
     vp = env.A10C_HUD
     
     if vp ~= nil then
        dbg_print("ok we have directly assigned viewport to MFCD
")
        set_full_viewport_coverage(vp)
     end       
end

Now it will look similar like this when A10_HUD is defined as a view-port.

Well - some parts are still missing/cut off:

Screen_120613_174417.jpg

 

To get everything of the HUD displayed you need to edit the DCS WorldModsaircraftsA-10CCockpitScriptsHUDIndicatorHUD_base_page.lua

 

Starting at line #3 from this:

 

SymbologyBox_sizeX = 90
SymbologyBox_sizeY_min = -215 
SymbologyBox_sizeY_max = 167

To this:

 

 

SymbologyBox_sizeX = 160
SymbologyBox_sizeY_min = -225
SymbologyBox_sizeY_max = 225

Voilà!:

Screen_120613_162458.jpg

 

Just keep in mind that the A10_HUD export will be greater than defined in you "Monitorsetup.lua" at around 20%.

See the lua below -

I use 602x602 as HUD-size but it covers almost all 700x700.

 

Here is the "MonitorSetup".lua that I used for the example above .

Used resolution was 1400x700 windowed.

_ = function(p) return p; end;

name = _('Camera+A10C_HUD);

Description = 'camera and A10_HUD on the right '

Viewports =

{

Center =

{

x = 0;

y = 0;

width = screen.width * 0.5;

height = screen.height;

viewDx = 0;

viewDy = 0;

aspect = screen.aspect * 0.5;

}

}

 

A10C_HUD =

-- ratio 1:1

{

x = screen.width * 0.535;

y = screen.height * 0.07;

width = screen.width * 0.43; -- 602 on a screen.width of 1400

height = screen.width * 0.43; -- 602 on a screen.width of 1400

}

 

UIMainView = Viewports.Center -- use "Viewports.A10_HUD" to have the GUI in the HUD space

Now you only need a projector and a Fresnel lens - a glass - some time -and you have your own working HUD.

 

 

Some tips to set it up and calibrate:

 

1.Use a pico-projector or a small bright lcd and a Fresnel-lens - so you get a linear projection of the HUD. (> focused to infinity)

Display it on a 45° glass in your eyesight.

 

2.Than start DCS with the unedited files in HUD-Only view.

Make a screen-shoot of the HUD-Only image while the HUD is visible.

 

3. than display this HUD-only view over the output of your "outer-world" projection.

 

While at the same time having the export of the Hud visible.

 

4.Than tweak the image of the export as long as it will match absolutely with this screen-shot.

 

 

Build it very sturdy so you cant move the HUD-projector.

 

-Ready!

 

This image is meant to give you a little idea what I'm talking about:

HUD-export1.jpg

 

 

 

And here is some more inspiration so you get a idea what I mean when I say "low-cost":

 

and some more:

 

http://www.viperpits.org/smf/index.php?topic=5895.0

 

hudparts.jpg

 

 

 

Here is a instruction how to switch off the MFCD/Abris/Skval in the Hud-Only-view:

 

Ka-50

 

ABRIS

Edit ABRIS_init.lua in folder ScriptsAircraftsKa-50CockpitABRIS

 

Line #11

ON Hud Only View:

purposes      = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}

OFF:

purposes      = {render_purpose.GENERAL}

Shkval

Edit SHKVAL_init.lua in folder DCS Black Shark 2ScriptsAircraftsKa-50CockpitSHKVAL

 

Line #13

ON in Hud Only View:

purposes      = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}

OFF:

purposes      = {render_purpose.GENERAL}

CautionLights

Edit CautionLights_panel.lua in folder DCS Black Shark 2ScriptsAircraftsKa-50CockpitCaution_lights_indicator

 

Line #2

ON Hud Only View:

purposes      = {render_purpose.HUD_ONLY_VIEW}

OFF:

purposes      = --{render_purpose.HUD_ONLY_VIEW}

A-10c

 

MFCDs

Edit MFCD_init.lua in folder ScriptsAircraftsA-10CCockpitMFCDindicator

 

Line #16

ON in Hud Only View:

purposes      = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}

OFF:

purposes      = {render_purpose.GENERAL}

__________________________________________

Edit:

 

This relates and will come handy if you want to build your own pit with a real HUD while keeping the overall render small :

 

 

 

This is how you render a black square inside DCS:

(check the negative width/height ...and it has no impact on FPS)

 

BlackSquare.jpg

 

...and here is a example in which kind of setting it can be very useful:

>>>> http://forums.eagle.ru/showthread.php?p=1490580#post1490580

Screen_120625_201015.jpg

 

 

 

edit:

 

BTW:

 

After alto of thinking I came to the conclusion that it is possible to use a HUD export while also using Track-IR to pan your view.

 

Here is the theory:

 

Build your pit with a working HUD and just ad a great enough center-deadzone to the TrackIR.

So you will always have a 100% alignment to the real HUD when looking straight forward.

I hope you get my point.

 

The outcome is a static view at around 20° head-movment forward - so that your HUD will always matches with the "outside" - but you will be able to look to the sides when going over the Deadzone of the TrackIR limit.


Edited by PeterP
  • Like 2

Link to post
Share on other sites
I think you can remove the first surface mirror and the lens if i recall correctly the guys at VP got it to work with just an LCD.
This depends highly on your HUD distance to the screen/projection.

When you so close to the monitor like on the schematic image , you sure good to go with only a 45° reflection.

But if you have a greater distance you will have to use some sort of lens to compensate the difference - so that you have both at the same time in focus.

 

 

Just have a look again -

 

 

hudparts.jpg

 

C+K+L1 are almost identical to S - so you get probably away without a lens if you are lucky.

 

But if this varies you will need a lens to compensate this.

And as we are living in the 21th century and projectors are common and relative cheap now - you will have to use a lens in most cases.

... no mental healthy person would build a pit+HUD just to put a LCD on the nose...:)


Edited by PeterP

Link to post
Share on other sites
This is awesome.

 

You mentioned in another thread about the HUD being not correct in 3D projection. If we were to export the HUD this way then we can enjoy DCS in 3D and also have a working HUD right?

 

Right !

- but than you don't get away with a lens that set the focus to the surface of the screen/projection- you have to set the focus to infinity after you have calibrated it.

This is a easy job and will not make the construction more complicated.- the used lens just need a little more distance to the HUD-lcd/projection.

 

BTW: here is the corresponding thread/posting where I illustrated the problem with a 3D plugin:

http://forums.eagle.ru/showthread.php?p=1438334#post1438334


Edited by PeterP

Link to post
Share on other sites
  • 3 weeks later...

This relates and will come handy if you want to build your own pit with a real HUD:

 

>>>Cockpit tub view

 

I collected all info I could find in this thread:

Cockpit Hud (Blackshark/A-10C) and hopefully soon fc2 - Page 9 - ED Forums

regarding a "cockpit-less" view and did made a package with a pre-set that will enable it like in this Vid:

 

 

As I wrote in my last posting :

You will be able to look through the cockpit and see the gun/gears/outer world - but I think this is much better as flying without wings at all.

 

 

You will have to use "3.For Pit-Builders - Cockpit and MFCDs in Cockpit OFF"

 

 

All credits belong to trigen .

 

 

Download "all Exports in DCS-A10 1.1.1.1 and 1.1.2.1 + Tub view Cockpit-Builders.zip":

http://files.digitalcombatsimulator.com/en/145724/

[/url]

 

Note: This files will work also for 1.1.1.1

 

And this maybe too:

 

 

This is how you render a black square inside DCS:

(check the negative width/height ...and it has no impact on FPS)

 

BlackSquare.jpg

 

...and here is a example in which kind of setting it can be very useful:

>>>> http://forums.eagle.ru/showthread.php?p=1490580#post1490580

Screen_120625_201015.jpg


Edited by PeterP

Link to post
Share on other sites

PeterP I am terribly sorry for not helping you with the HUD extraction...today is the first day i ever visited this forum since we spoke for the last time.

I am glad to see that you made it very good job. I was away building my pit mate...i think i lost all my friends during the process hehe...check this link out its almost complete....http://forums.eagle.ru/showthread.php?t=90825

  • Like 1
Link to post
Share on other sites

No problem at all :)

Finding all the functions myself was most of the >FUN < for me :D ! (only took me two days of thinking/trying :))

 

So I hope that positing #12 will be of some use for you!:)

 

And when you find some time it would be very nice to give us maybe a video how your HUD works and how you calibrated it - as many think it is a really hard job. - so they get a little enlighten by your example that it is much easier as they think. :)

 

 

And maybe also subscribe to this thread:

As we try to nail down how to get a 360° projection for DCS in a small squared room:

>>> The Cube

 

Edit: This is a schematic image of sleepara's HUD - keep special notice to choose also a clear material that has also one "primary" reflective side.So - you don't have a blurred reflection.

Here's my setup...eXWti.jpg

 

Just one addition:

 

Folks with a grater distance to the "outer-world" projection will sure have to place a lens/Fresnel-lens between the two mirrors - to get both projections at the same time in focus. - this really depends on your individual settings.

 

 

On this image you can see that the way of the reflected HUD image is almost the same as to the projection - so Sleepara don't have to use a additional lens at all. - just as I explained in this posting >>> #5

fkabG.jpg

 

The HUD is projected over a special single front side transparent glass .

It is 100% functional even in a highly lit room! whether its evening or morning it produces the same image! I PROMISE to post a movie in couple o weeks when my graphics card arrives.

 

... about the glass...I got it from the local "Glazier"...that's how u call a guy that custom builds windows?...just look for a reflective window or semi reflective window at the local shop. it must have one reflective side which reflects from the surface itself in contrary of a mirror which makes the reflection travel through the entire mirror thickness (for example 2mm thick or 5mm thick mirror )

Edited by PeterP

Link to post
Share on other sites

Oh PeterP oh PeterP my dear friend! Just when I thought that I can finally rest in peace, you throw the 360* pit "bomb" at me ...not mentioning the force feedback stick link you sent me....:doh:

the 360* pit is definitely my dream!!!!!!!

Link to post
Share on other sites

I just tried exporting the HUD onto my touchscreen and it works great... I am not planning on building a full blown pit (yet) but when I do it will so kick ass to have working HUD along with all the switches, instruments etc :thumbup:

 

Now all I need is to get my house build, get my cave....ahem.... room... and get some MiG in DCS

  • Like 1

No longer active in DCS...

Link to post
Share on other sites

Thank you Kuky for trying my instruction out - and giving me the confidence that it also make some sense to others what I have written! :)

 

@sleepare

 

Are you using the same approach that I have found out or did you use a more elegant way?

Link to post
Share on other sites

Actually I am using the same approach. I had it exported in a similar fashion and enlarged the hud box as you but there is still something that is bothering me. I calibrated the size of the hud to match the IN COCKPIT hud size and everything was perfect , but then I sold my graphics card so basically now i'm grounded...anyways what is bothering me is the way the physical external hud i use actually correlates with the game projection. I played it for a while but i was never satisfied with the precision of tracked targets and gun strafing...it was 95% accurate. I must bring it to perfection when my gtx 680 arrives.

 

P.S. i did not use the code after line 7 as you posted ... what was the reason you decided to embed it there?


Edited by sleepara
Link to post
Share on other sites
I played it for a while but i was never satisfied with the precision of tracked targets and gun strafing...it was 95% accurate. I must bring it to perfection when my gtx 680 arrives.

 

 

Just one Thought:

 

As you don't use a lens at all :

re-check if your Distance "a" is the same as "c" +"d".

 

And make also sure that the dimensions of the 19" lcd Hud picture is the same size as it will appear on the projection without the export.

 

If not - you will have to rearrange the mirrors/HUD-Lcd to shorten or longer the distance until c+d = a.

 

When this will match up you should have a 100% match and the HUD will work like it should when using the Gun-piper and the sensor-markers.

 

... and I hope I don't have to mention it, but I do it anyway for the sake of clarity:

 

Once you know the FOV you have to use - set it in "stone" in the defaultsnapview.lua and don't change it during a flight. :)

 

 

 

HUD-size.png

 

Edit:

 

P.S. i did not use the code after line 7 as you posted ... what was the reason you decided to embed it there?

Well , it is the standard procedure to give a Cockpit device a working definition to make it working as a export in the "MonitorSetup.Lua" file.

 

Many other avionic-displays need it to work properly as a export- so this was the first step that I made to the Hud_ini.

 

I never tried it without this edit...

Hmm...I will have a look.

 

Thanks for pointing this out! Will edit Post #1 when I made a successful test. :)


Edited by PeterP

Link to post
Share on other sites

Yeah i totally dig you mate you are absolutely right but i think that there is another thing that must be taken into consideration. our human eyes converge on the hud making double vision of projection in the back. i think that this is the problem . what do you think? u were right about the distance thing it actually may remedy the issue but it will never entirely go away. have you ever seen a real hud and the way it locks on things?

 

p.s. I have locked the FOV it was a must you are right...


Edited by sleepara
Link to post
Share on other sites

Yes- two times some years ago (at the ILA) during a meeting with some guys of the "Institute für Luft- und Raunfahrt - TU-Berlin " - In F4-Phantom cockpit trainer that had a working HUD.

- You really can't compare a real HUD to a Sim-Hud in depth-projection - as the HUD of a Real plane is focused to infinity (around at least 300 feet in from of you) - and we only have to set the focus to our projection surface.

 

- so we should have it much more simpler.

I already "toyed " around with it using a iPad as HUD-Export and some sheets of acrylic.

Just to get some kind of "proof of concept"...;)

 

I plan making some really working things upcoming winter .

 

So: all what I'm saying relies in my understanding in physics/optics and more or less common sense ;) ...well, my academical degree in mathematics helps also some times.

 

Edit:

and I do all this kind of research in DCS just to be prepared when I finally start building my own full 360° pit . So I have already all answers to most common problems I will face.

 

I kinda dislike the idea to spend a lot of money/time just to make some "experiments" - I hope you get my point :)


Edited by PeterP

Link to post
Share on other sites
by the way why did you end up assigning ~620 by ~620 for hud size?

 

There is no particular reason!:) It is only for demonstration...

 

It worked quite well in my example video I made .

 

I used a windowed res of 1400x700 for the vid - so 620 filled up the right side of the in-game render. :)

Link to post
Share on other sites
Yeah i totally dig you mate you are absolutely right but i think that there is another thing that must be taken into consideration. our human eyes converge on the hud making double vision of projection in the back. i think that this is the problem . what do you think? u were right about the distance thing it actually may remedy the issue but it will never entirely go away.

 

Hi Sleepara,

 

I spend some time thinking about the problems you describe...

..and after I ruling out all possibility I came to the conclusion that your build is not precise enough up to now .

That can be the only possible reason why you experience a slightly false alignment.

 

 

You sure have to re-check and rearrange the distances of mirrors/lcd/ and their positioning to your projection surface.

 

Some of this relations of "A","B" and/or "D" -like shown on the following schematic drawing- must be not right in your build.

 

If this isn't not done with high care and there is only a slightest non-alignment you sure experience what you describe here:

I played it for a while but i was never satisfied with the precision of tracked targets and gun strafing...it was 95% accurate.
So please check again all measurements and keep special attention that everything correspondent with this image. Otherwise you can't expect a 100% alignment without using some lenses that compensate it.

Also recheck that the physical size of your HUD-export is exactly the same as the one of the HUD you would see if it is drawn in the in-cockpit view :

HUD-3d-sh.jpg

 

A = distance of the LCD to first mirror measured in the center.

B = Distance of the Mirrors to each other and also LCD surface to projection surface

D = size of HUD - must be the same like the in-cockpit render without export.


Edited by PeterP

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...