XerXesCZ 89 Posted August 17, 2019 Hi everyone! First of all, I want to say that I've done my research on this topic before I've decided to post a topic of my own - but sadly either I didn't understand it or it wasn't the thing I was looking for. My question is; how I display a custom picture on in-game PC screen? Basically, I have a setup which is shown in image below. I understand that for a custom image I want to show on the screen I need to convert it to paa format, but I don't know the code needed to show it on the screen. Next question is a little bit trickier; I want to achieve a "security camera surveillance feed" on on the double screens. I understand it has to do something with PIP - basically I place object, initialize camera somehow from there and then show it on the screen. I'm totally lost here. The thing is, when someone posts a code I can "understand" basically what it does and why, or do my research to parts I don't understand. However, sadly for now I lack the skill necessary to put it together on my own. Any help will be greatly appreciated! Share this post Link to post Share on other sites
JohnKalo 657 Posted August 17, 2019 The image can also be in a .jpg format actually. As to how to place the custom image on a screen, double click on the screen and open it's panel. Towards the end there is a tab about which texture it has showing as a wallpaper. That tab has a path. Change that path so as to show your image and all done. Apart from that, for the "security camera surveillance feed" it does need code. This post can help: And in general such questions should go: https://forums.bohemia.net/forums/forum/154-arma-3-mission-editing-scripting/ 3 Share this post Link to post Share on other sites
XerXesCZ 89 Posted August 17, 2019 Thanks for your answer! 2 hours ago, JohnKalo said: And in general such questions should go: Oh, I am aware of that. I don't even known how this happened, probably was thinking about other things. I have reported my post. Share this post Link to post Share on other sites
JohnKalo 657 Posted August 17, 2019 As for code to the camera feed here you go via an older post from @Grumpy Old Man: tv setObjectTexture [0, "#(argb,512,512,1)r2t(piprendertg,1)"]; _pipcam = "camera" camCreate [0,0,0]; _pipcam setVectorDirAndUp [[0,0.66,-0.33],[0,0.33,0.66]]; _pipcam cameraEffect ["Internal", "Back", "piprendertg"]; _pipcam camSetFov 0.4; _campos = getposatl car; _campos set [2,30]; _pipcam setpos _campos; tv is the name of the screen whereas car is where the camera is attached to. 30 is the height of the camera in meters. To call the above place it in a nameOfScript.sqf file and then call it like: execVM "nameOfScript.sqf"; 3 1 Share this post Link to post Share on other sites
Dedmen 2714 Posted August 19, 2019 On 8/17/2019 at 4:30 PM, JohnKalo said: And in general such questions should go Fixed o7 1 Share this post Link to post Share on other sites
wogz187 1086 Posted August 19, 2019 @XerXesCZ, This little module shows how to set up two different cameras and display them on two different screens (in this case on one object). There are no "scripts" it's all in the mission init.Drive Link Download: example This is what the camera creation looks like cam = "Camera" camCreate (pole1 modelToWorld [0,0,0]); // Names and creates the camera at the object "pole1" with additional co-ordinates [x,y,z] cam cameraEffect ["internal","back","rtt"]; // creates "Real Time Terminal" cam camSetTarget pole3; // sets camera target cam camCommit 0; // allows time to acquire target (for smooth transitions), no time = snap to To display this on the object paste into the Object Attributes "Texture 0" field, #(argb,512,512,1)r2t(rtt,1.0) That "Texture code" represents the (default alpha, RGB values), "Render to Terminal" (name of real time terminal, # aspect ratio) To change the current texture of the object if you want a default screen or switch to another camera name the monitor, monitor1 SetObjectTexture [0,"defaultSCREEN.jpg"]; or monitor1 SetObjectTexture [0,"#(argb,512,512,1)r2t(rtt1,1.0)"]; // notice "rtt1" instead of "rtt" Does that help? 4 Share this post Link to post Share on other sites
stburr91 1009 Posted August 19, 2019 32 minutes ago, wogz187 said: @XerXesCZ, This little module shows how to set up two different cameras and display them on two different screens (in this case on one object). There are no "scripts" it's all in the mission init.Drive Link Download: example This is what the camera creation looks like cam = "Camera" camCreate (pole1 modelToWorld [0,0,0]); // Names and creates the camera at the object "pole1" with additional co-ordinates [x,y,z] cam cameraEffect ["internal","back","rtt"]; // creates "Real Time Terminal" cam camSetTarget pole3; // sets camera target cam camCommit 0; // allows time to acquire target (for smooth transitions), no time = snap to To display this on the object paste into the Object Attributes "Texture 0" field, #(argb,512,512,1)r2t(rtt,1.0) That "Texture code" represents the (default alpha, RGB values), "Render to Terminal" (name of real time terminal, # aspect ratio) Does that help? I saw you post this in the other thread, but I'll respond here. I downloaded your example mission, and it works perfectly. However, I was extremely confused because I couldn't figure out how you were creating the cameras. I looked in the mission folder, but there is no init.sqf file showing up there, only the mission.sqm file is in there. It's really weird that I can't see an init file in the mission folder, but the mission still works. 2 Share this post Link to post Share on other sites
wogz187 1086 Posted August 19, 2019 @stburr91, Super-sorry for the confusion! The cameras are initialized in the Scenario Attributes General Init field-- right in EDEN. The code there can be copied out and put into a script instead if that serves your purpose. 3 1 Share this post Link to post Share on other sites
stburr91 1009 Posted August 19, 2019 7 minutes ago, wogz187 said: @stburr91, Super-sorry for the confusion! The cameras are initialized in the Scenario Attributes General Init field-- right in EDEN. The code there can be copied out and put into a script instead if that serves your purpose. LoL, ok, I was wondering how in the world the mission was working when I couldn't find how you were creating the cameras. Thanks for the example mission, it's very helpful. 4 Share this post Link to post Share on other sites
XerXesCZ 89 Posted August 20, 2019 Thanks to all for your help, this was little tricky for me! Now is everything working as it should. I was aware of the script by @Grumpy Old Man, but to be honest wasn't quite sure what to do next with it. Thanks to fool-proof anwers in this thread I was able to solve it, and even managed to learn something new! Thanks again! 4 Share this post Link to post Share on other sites