Notices

Reply
 
Thread Tools Display Modes
Old 06-13-2012, 05:11 PM   #1
PeterP
Veteran
 
PeterP's Avatar
 
Join Date: Mar 2009
Location: Germany / UTC+1
Posts: 5,174
Reputation power: 97
PeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to behold
Lightbulb How To :HUD Export A10C DCS-World for Real HUD

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: \Mods\aircrafts\P-51D\Cockpit\Scripts\Gunsight_K14\Indicator\K14_ini t.lua
File path Ka-50: \Mods\aircrafts\Ka-50\Cockpit\Scripts\HUD_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 World\Mods\aircrafts\A-10C\Cockpit\Scripts\HUD\Indicator\HUD_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":

Code:
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\n")
         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:


To get everything of the HUD displayed you need to edit the DCS World\Mods\aircrafts\A-10C\Cockpit\Scripts\HUD\Indicator\HUD_base_page.lua

Starting at line #3 from this:

Code:
SymbologyBox_sizeX = 90
SymbologyBox_sizeY_min = -215 
SymbologyBox_sizeY_max = 167
To this:


Code:
SymbologyBox_sizeX = 160
SymbologyBox_sizeY_min = -225
SymbologyBox_sizeY_max = 225
Voilà!:


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.
Quote:
_ = 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:




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





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 \Scripts\Aircrafts\Ka-50\Cockpit\ABRIS

Line #11
ON Hud Only View:
Code:
purposes      = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}
OFF:
Code:
purposes      = {render_purpose.GENERAL}

Shkval

Edit SHKVAL_init.lua in folder DCS Black Shark 2\Scripts\Aircrafts\Ka-50\Cockpit\SHKVAL

Line #13
ON in Hud Only View:
Code:
purposes      = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}
OFF:
Code:
 purposes      = {render_purpose.GENERAL}

CautionLights

Edit CautionLights_panel.lua in folder DCS Black Shark 2\Scripts\Aircrafts\Ka-50\Cockpit\Caution_lights_indicator

Line #2
ON Hud Only View:
Code:
purposes      = {render_purpose.HUD_ONLY_VIEW}
OFF:
Code:
purposes      = --{render_purpose.HUD_ONLY_VIEW}
A-10c

MFCDs
Edit MFCD_init.lua in folder \Scripts\Aircrafts\A-10C\Cockpit\MFCD\indicator

Line #16
ON in Hud Only View:
Code:
purposes      = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW}
OFF:
Code:
 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 :

Quote:
Originally Posted by PeterP View Post


This is how you render a black square inside DCS:
(check the negative width/height ...and it has no impact on FPS)



...and here is a example in which kind of setting it can be very useful:
>>>> http://forums.eagle.ru/showthread.ph...80#post1490580


edit:

Quote:
Originally Posted by PeterP View Post
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.
__________________


Last edited by PeterP; 08-03-2012 at 05:36 AM.
PeterP is offline   Reply With Quote
Old 06-13-2012, 09:20 PM   #2
Duckling
Member
 
Join Date: Jan 2006
Location: Sweden
Posts: 484
Reputation power: 12
Duckling has a spectacular aura about
Default

Thanks PeterP
Great work and highly appriciated.
__________________
- - - -
My HOGBOX A-10A amateurish Pit building site : www.strandedduckling.com
Duckling is offline   Reply With Quote
Old 06-13-2012, 10:15 PM   #3
hassata
Veteran
 
hassata's Avatar
 
Join Date: Feb 2005
Location: Black Hole Sun
Posts: 3,574
Reputation power: 115
hassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud ofhassata has much to be proud of
Default

Sick. The cockpit makers thank you.
__________________
hassata is offline   Reply With Quote
Old 06-13-2012, 10:58 PM   #4
Deadman
Veteran
 
Deadman's Avatar
 
Join Date: Jul 2005
Posts: 3,728
Reputation power: 54
Deadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to behold
Default

Great work on the HUD export!!! 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.
__________________
CNCs and Laser engravers are great but they can't do squat with out a precise set of plans.
Deadman is offline   Reply With Quote
Old 06-14-2012, 12:04 AM   #5
PeterP
Veteran
 
PeterP's Avatar
 
Join Date: Mar 2009
Location: Germany / UTC+1
Posts: 5,174
Reputation power: 97
PeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to beholdPeterP is a splendid one to behold
Default

Quote:
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 -
Spoiler:


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...
__________________


Last edited by PeterP; 06-14-2012 at 07:37 AM.
PeterP is offline   Reply With Quote
Old 06-14-2012, 01:59 AM   #6
rocketeer
Member
 
rocketeer's Avatar
 
Join Date: Apr 2005
Location: California
Posts: 576
Reputation power: 16
rocketeer is just really nicerocketeer is just really nice
Default

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?
__________________
My A10C cockpit thread
rocketeer is offline   Reply With Quote
Old 06-14-2012, 03:10 AM   #7
Deadman
Veteran
 
Deadman's Avatar
 
Join Date: Jul 2005
Posts: 3,728
Reputation power: 54
Deadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to beholdDeadman is a splendid one to behold
Default

You might want to check out reply 9 then. I all so don't know of any sane person building a pit
__________________
CNCs and Laser engravers are great but they can't do squat with out a precise set of plans.
Deadman is offline   Reply With Quote
Old 06-14-2012, 04:16 AM   #8
Gremlin77
Member
 
Gremlin77's Avatar
 
Join Date: Dec 2011
Location: Germany, Augsburg
Posts: 295
Reputation power: 5
Gremlin77 will become famous soon enough
Default

nice work, thank you
Gremlin77 is offline   Reply With Quote
Old 06-14-2012, 06:49 AM   #9
avlolga
Member
 
Join Date: Sep 2011
Location: Israel,Haifa
Posts: 338
Reputation power: 6
avlolga is a jewel in the rough
Default

Great work PeterP,
Many thanks!!!
avlolga is offline   Reply With Quote
Old 06-14-2012, 06:51 AM   #10
FoxDelta
Junior Member
 
Join Date: Jun 2012
Location: LOXZ
Posts: 12
Reputation power: 0
FoxDelta is on a distinguished road
Default

perfect work, THX
FoxDelta is offline   Reply With Quote
Reply

Tags
hud export

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:38 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.