AmericanFAC 1 Posted March 12, 2013 So I have the basic understanding of how to make the PiP show up on screen with modules in the editor, but I cannot figure out how the vehicles are doing it. To me it reads as if it their should be a variable that is the "Eye" for the pip camera, a variable for the direction of the camera, and then the thing it renders on. So after debpoing the A3 files, specifically the Humvee vehicle I noticed this code that was called during the init class for the base humvee. class RenderTargets { class Driver_display { renderTarget = "rendertarget0"; class CameraView1 { pointPosition = "PIP0_pos"; pointDirection = "PIP0_dir"; renderVisionMode = 0; renderQuality = 2; fov = 0.7; }; }; }; So pip1_pos and pip1_dir are memory points in the model is is calling to. And here I have them placed But my issue is the render target, I assumed it wanted me to make a selection for the screen in the 0.000 and pilot lods called rendertarget0. Didn't work. Afterwards I did some digging around in the files and found #(argb,512,512,1)r2t(rendertarget0,1.0) as a material for the hunter.p3d. So I tried making a rvmat with a stage that referred to that, then applying that material to the screen selection. I'm guessing this is more of a scripting thing, than a modelling issue, and this is what the code I ahve so far looks like class acc_ipip : ItemCore { scope = 2; displayName = "Ipip"; picture = "\A3\weapons_F\Data\UI\gear_acco_aco_CA.paa"; model = "*****\ipip.p3d"; descriptionShort = "ICU"; usePip = 1; class ItemInfo : InventoryflashlightItem_Base_F { mass = 2; RMBhint = "Thermal Imagery"; modelOptics = "\A3\Weapons_F\empty"; optics = 1; class RenderTargets { class Gunner_display { renderTarget = "rendertarget0"; class CameraView1 { pointPosition = "PIP0_pos"; pointDirection = "PIP0_dir"; renderVisionMode = 0; renderQuality = 2; fov = 0.7; }; }; }; }; }; But it doesn't work, however, what it does do is draw 4-5 shadows on the ground evenly spaced from me in the shape of the attachment If anyone else has any discoveries, it'll be greatly appreciated. Share this post Link to post Share on other sites
Messiah 2 Posted March 12, 2013 (edited) you may need to ask yourself whether weapons can use PIP? Weapons in ArmA have a history of not being as versatile as vehicles in terms of animations and other bells and whistles, this may be a similar thing. Try making PIP work on something more basic, like a square box, to see if it's an issue with your code, or simple another 'weapons cannot do that' engine limitation. and additionally you're adding i as a proxy item, and again, historically proxy items have had issues with transfering things such as animated parts across to the host model, so if it does work on a weapon, it may then be a proxy limitation. Edited March 12, 2013 by Messiah Share this post Link to post Share on other sites
rstratton 0 Posted March 12, 2013 apply this #(argb,512,512,1)r2t(rendertarget0,1.0) as texture not material. but id be real suprised if rtt worked on weapons Share this post Link to post Share on other sites
granQ 293 Posted March 21, 2013 (edited) anyone got PiP to really working? I done the steps, one a vehicle.. Model.cfg = find no reference in bis vehicles, so check .p3d = Got an area with #(argb,512,512,1)r2t(rendertarget0,1.0) as texture, No rvmat? and mempoints for the camera. Still no function :( EDIT. Not sure this is the trick, but everything worked like instantly when I used a "create box" and then deleted all other sides except one. Also had to flip the face around to make the camera right, but now its working.. so anyway, don't use insert+F6 if you have problem. Use a "create box".. Edited March 21, 2013 by granQ 1 Share this post Link to post Share on other sites
Sealife 22 Posted March 21, 2013 Yeah dont use f6 because then No UV and it needs it to renderthe pIp on ;) download the TOH helicopter example it has everything there cpp/.cfg and model showing memory point and and how macro texture refference relate (Rendertarget_x in the macro is relevant) 1 Share this post Link to post Share on other sites
KevsNoTrev 44 Posted March 21, 2013 I don't mean to jump in on this thread without useful info, but could this be a potential for the cornershot Pistol? http://www.strategypage.com/military_photos/corner.aspx I realise someone would have to create the weapons but the PiP would work the same way right? thanks. 1 Share this post Link to post Share on other sites
Messiah 2 Posted March 21, 2013 In principle, yes, however if you read the entire thread we'd already discussed it briefly - ArmA/OFP has a history of weapons lacking certain features that work on vehicles and units (hiddenselections, animations, proxies, lights) Some were fixed/added as the series evolved (animations A1(?), lights (OA) proxies (A3)), some remain lacking (hiddenselections), and something about PiP makes me think it just isn't going to work on a weapon. But, looking forward to being wrong :) Share this post Link to post Share on other sites
KevsNoTrev 44 Posted March 22, 2013 In principle, yes, however if you read the entire thread we'd already discussed it briefly Caught on second re-read, cheers. Share this post Link to post Share on other sites
bad benson 1733 Posted March 26, 2013 (edited) i'm trying to get this to work too. can someone upload the TOH sample model please? the wiki link doesn't work for me. Edited March 26, 2013 by Bad Benson 1 Share this post Link to post Share on other sites
Messiah 2 Posted March 26, 2013 PiP in general or cornershot? The vehicle config guide has a useful section in it: https://community.bistudio.com/wiki/Arma_3_Cars_Config_Guidlines#Picture_in_Picture_for_screens_and_mirrors 1 Share this post Link to post Share on other sites
Jynx 10 Posted April 7, 2013 is there a way of calling the camera view from a vehicle to use in a pip dialog? Share this post Link to post Share on other sites
malakdecaen 3 Posted April 14, 2013 is there a way of calling the GPS or MAP ? 2 Share this post Link to post Share on other sites
j0nes 194 Posted June 26, 2013 Im actually creating a cornershot for a weapons pack and the PIP in the config file only works in cfgvehicles. but the way I think it will work is naming the screen "rendertarget0" and then either add an init eventhandler to the weapon... if thats even possible, or go and add it to the "man" base class with a condition of hasweapon or something. then call it through a script with: ["rendertarget0",weapon selectionposition "camera"] call BIS_fnc_PIP; now this is just a shot in the dark. ill let you know what happens when I continue testing. but it might help 1 Share this post Link to post Share on other sites
apocalypex 13 Posted September 5, 2013 (edited) Set a hiddenselection on the texture you want to turn to PiP. Create a camera and use setObjectTexture to "#(argb,256,256,1)r2t(rendertarget0,1.0)". Example _cam = "camera" camCreate [getpos player select 0, getpos player select 1, (getpos player select 2) + 10]; cam_offset = [-0.18,0.08,0.05]; cam_cam camSetFov 0.6; _cam camSetTarget player; _cam camCommit 2; "rendertarget0" setPiPEffect [3, 1, 0.8, 1, 0.1, [0.3, 0.3, 0.3, -0.1], [1.0, 0.0, 1.0, 1.0], [0, 0, 0, 0]]; _cam cameraEffect ["INTERNAL", "BACK","rendertarget0"]; _obj setObjectTexture [0,"#(argb,256,256,1)r2t(rendertarget0,1.0)"]; Hope this helps. Edited September 5, 2013 by Apocalypex added code tags 1 Share this post Link to post Share on other sites
petracephas 29 Posted November 16, 2013 Great post guys. I got it working, but I'm having problems aligning it with my gunners view. Any suggestions? 1 Share this post Link to post Share on other sites