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.