PeterP Posted November 2, 2012 Share Posted November 2, 2012 (edited) The Problem: >> http://forums.eagle.ru/showpost.php?p=1498124&postcount=6 Summary : When you use a HUD that is projected as a "indicator_type = indicator_types.COLLIMATOR" you can't use it in a stereoscopic 3D projection that is using a third party stereoscopic plug-in. The solution: Draw it as "= indicator_types.COMMON" and 'push it' far out in the Z axis, so you simulate a focus that is set to 'infinity'. What follows is a demo using the Fixed Gun-sight (Gyro isn't working) of the P-51D to show you how a HUD has to be drawn so it is usable in stereoscopic 3D. See attached files. What has been done: Inside the cockpit the fixed Gun-sight looks as usual but now it is Drawn 100 meters flooding in front. There are two pre-sets for testing. One that has helping cues On for debugging and one that is that is working Demo for a HUD that works in stereoscopic 3d. The things that I have done: >> DCS WorldModsaircraftsP-51DCockpitScriptsGunsight_K14IndicatorK14_definitions.lua I added -- Global_HUD_Scale is ~100 meters > see also K.14_page.lua Global_HUD_Scale = 150and edited element.init_pos = {0.0, 0.0, Global_HUD_Scale * 1000}--init_pos > 15000~10m element.init_rot = {0, 0, 0}--init_rot>> DCS WorldModsaircraftsP-51DCockpitScriptsGunsight_K14IndicatorK14_init.lua indicator_type = indicator_types.COMMON --indicator_types.COLLIMATOR >> G:Program FilesEagle DynamicsDCS WorldModsaircraftsP-51DCockpitScriptsGunsight_K14IndicatorK14_page.lua fixed_cross = AddHUDK14TexElement("fixed_Cross", {{-5* Global_HUD_Scale, -5* Global_HUD_Scale}, {-5* Global_HUD_Scale, 5* Global_HUD_Scale}, {5* Global_HUD_Scale, 5* Global_HUD_Scale}, {5* Global_HUD_Scale, -5* Global_HUD_Scale}}, {tex_units_k14_X * 295, tex_units_k14_Y * 19, tex_scale_k14_X / Global_HUD_Scale, tex_scale_k14_Y / Global_HUD_Scale}, {{"K14_draw_sights", FIXED_CROSS}, {"K14_fixedSightLightness"}}, {0.0, ZSL, 0.0}, {0.0, 0.0, 0.0}, nil, HUD_DEFAULT_LEVEL ) fixed_cross.isdraw = truedid the same in 'fixed_reticle' and 'AddHUDK14TexElement' >> DCS WorldModsaircraftsP-51DCockpitScriptsmainpanel_init.lua Z_test = { near = 0.05, far = 150.0,--4.0, <<unit in meters - must be at least draw distance of HUD } -------------- The outcome is a working Fixed Gun-sight that is working flawless in stereoscopic 3D. The wing-span diamond is not working (up to now) . If you know how - please post .- I'm too limited with my time to spend hours for debugging... I hope that people from third party's or ED will jump in and help me out to make the HUD's of current modules working in 3d. And if not - I just hope that you will prepare your HUD in a similar way like it is done in this demo so your HUD will be working in the future even if they are drawn in true 3D. >>> Please read this thread http://forums.eagle.ru/showthread.php?p=1498124#post1498124 And there are more devices coming up in the near future >> Hey DCS DEVS... Oculus Rift! ...yes - using indicator_types.COLLIMATOR seems to be the "easy" way... but this leads only to the dark side....3D HUD Demo for P-51D.zip Edited October 30, 2013 by PeterP Link to comment Share on other sites More sharing options...
Ells228 Posted November 2, 2012 Share Posted November 2, 2012 How does it look in 2D? Link to comment Share on other sites More sharing options...
PeterP Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) The same as before - but now the 3D plug-in will have the info to draw the right convergence for the HUD. Please use the demo files for a test. Edited November 2, 2012 by PeterP Link to comment Share on other sites More sharing options...
lefuneste01 Posted March 9, 2013 Share Posted March 9, 2013 Hello Peter I discovered this post after I made the same tests with the init_pos variable. But this way is not working for the part of the HUD that most need it: the piper (canon, shkval indicator,...). Maybe the zcomponent set using init_pos is overwritten by the controller used to set the position of the HUD element. I wonder if it should be possible to continuously modify the z value of the controler using a fake device. It should also be needed to scale the x and y position of the piper by the same method... The problem is that I am a newbee in lua and DCS... Is there really a controler used to set the position of the cursor ? How can I read and modify its values ? P8700K @4.8 GHz, 3080ti, 32 GB RAM, HP reverb Pro. I spend my time making 3dmigoto VR mods for BoS and DCS instead of flying, see https://www.patreon.com/lefuneste Link to comment Share on other sites More sharing options...
lefuneste01 Posted March 17, 2013 Share Posted March 17, 2013 (edited) I made a fake device, but did not succed in trapping the position of the piper in BS... And unfortunatly the HUD position of the piper, when moved forward, did not move in accordance with the shkval field of view. I tried to change a lot of things, but nothings works ! It seems that the coordination piper on HUD / shkval field of view is not depending of lua settings (or I did not find them !) Edited March 17, 2013 by lefuneste01 P8700K @4.8 GHz, 3080ti, 32 GB RAM, HP reverb Pro. I spend my time making 3dmigoto VR mods for BoS and DCS instead of flying, see https://www.patreon.com/lefuneste Link to comment Share on other sites More sharing options...
lefuneste01 Posted April 1, 2013 Share Posted April 1, 2013 I made it for DCS world BS2 : see here P8700K @4.8 GHz, 3080ti, 32 GB RAM, HP reverb Pro. I spend my time making 3dmigoto VR mods for BoS and DCS instead of flying, see https://www.patreon.com/lefuneste Link to comment Share on other sites More sharing options...
PeterP Posted June 30, 2013 Author Share Posted June 30, 2013 OK - seems that 'all' issues are fixed ! Have a look look how a solution for your Third-party project can look like: They know that 3DVISION/stereoscopic 3D display is great with DCS (full immersion, better altitude feeling,..) but has some drawbacks: HUD/Gunsight collimated on HUDglass and not on infinite, making nearly impossible to aim Fixed for DCS world/Ka-50 Fixed for DCS World/A10-C Work in progress for P51-D (but I am not sure that it is needed, as the gunsight is not collimated on K14 glass) To do for UH1-H Not possible to mod for SU25-T/FC3 planes [*]Labels in 2D and at screen level, and so hardly readable Fixed (although not exactly at the right depth) [*]3D vision not available in Full screen mode, making softth unusable workaround (but maybe the convergence is not as good as in windowed mode) [*]Cursor in 2D at screen level, so not usable to click switch in the cockpit Do not know how to modify that. If you know a shader used for the cursor...Today I have mapped a button to switch 3DVsion ON/OFF on my joystick... Many thanks to PeterP, I started my mods by using his works (And I made my HUD mods compatible with his wonderfull kneeboard). Link to comment Share on other sites More sharing options...
WildBillKelsoe Posted June 30, 2013 Share Posted June 30, 2013 peter, are you saying that if I press F1 (cockpit view) I get an outside view that is collimated to range set on the twist grip? meaning I don't physically have to look into the cockpit glass and just use the stick to put it on the target? what is the purpose of this? I don't own any 3D system. Maybe I'm in the wrong mod? AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow. Link to comment Share on other sites More sharing options...
PeterP Posted June 30, 2013 Author Share Posted June 30, 2013 (edited) peter, are you saying that if I press F1 (cockpit view) I get an outside view that is collimated to range set on the twist grip? meaning I don't physically have to look into the cockpit glass and just use the stick to put it on the target? what is the purpose of this? I don't own any 3D system. Maybe I'm in the wrong mod? no - you got it fully wrong - sorry. The picture is taken while debugging and to show where the piper is placed in the z-orientation - the piper is not visible from outside the cockpit and when leaving the reflector on normal usage. Please Read again - or simply try the files - than you will understand. - and if you don't use a stereoscopic display/output- don't bother at all. Edited June 30, 2013 by PeterP Link to comment Share on other sites More sharing options...
BrunoDerRabe Posted July 21, 2013 Share Posted July 21, 2013 (edited) Hope I am not mixing things up. But this thread encourages me to add some knowledge to a related thread: http://forums.eagle.ru/showthread.php?p=1818638&posted=1#post1818638 Edited July 21, 2013 by BrunoDerRabe Link to comment Share on other sites More sharing options...
Recommended Posts