Jump to content

Recommended Posts

Hey guys,

 

I am currently working on a mission that would feature some kind of a "command center" (for the lack of better description...) which would have a few screens. Those screens have been set up to receive a texture captured from a camera attached to a uav (to be precise, the Pelter drone from the new Contact DLC). I have used a script kindly provided by @killzone_kid which I have only adjusted for the other drone type and basically looks like this - this is repeated for 12 screens in the init.sqf:

	laptop1 setObjectTexture [0, "#(argb,512,512,1)r2t(uavrtt1,1)"];
	cam1 = "camera" camCreate [0,0,0];
	cam1 cameraEffect ["Internal", "Back", "uavrtt1"];
	cam1 attachTo [pelter1, [0,0,0], "PiP1_demining_pos"];
	addMissionEventHandler ["Draw3D", {
		_dir = 
			(pelter1 selectionPosition "PiP1_demining_pos") 
				vectorFromTo 
			(pelter1 selectionPosition "PiP1_demining_dir");
		cam1 setVectorDirAndUp [
			_dir, 
			_dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
		];
	}];

20190813213757-1.jpg

 

The UAV feeds are being thrown on the screen in sequence one by one. This is how it looks in a test environment with 12 machines - you can see that the last four laptops turn black and show no feed. When I deleted the part of the script responsible for the first laptop, the 9th one worked fine so again - no more than 8 at once.

 

I have two issues with it:

- Obviously, I can display no more than 8 feeds at once - any more than that will appear as black screen - similarly, when opening the uav terminal, the turret control window will also appear black/blank. I do not mean to complain, but do you think this is an engine/performance limitation of some kind and there's no way around it?

- Will this effect even be global to other players or only local (I fear the latter)? If local, is there a way to display this kind of effect globally to such a scale in a multiplayer environment?

 

I appreciate all the feedback on this topic.

 

Thanks a lot in advance!

Adam

  • Like 1

Share this post


Link to post
Share on other sites

@Dj Rolnik (Adam),

Nice test rig. I think you might be treading new ground.
 

Quote

"... Obviously, I can display no more than 8 feeds at once...", "... engine/performance limitation of some kind and there's no way around it?"

Consider your test rig is in VR. Make a real world test with 4 cameras before going any further. Under certain conditions two active camera feeds can cause significant performance loss. Typically, when one or more cameras are distant to each other, and consider how the world geometry is rendered-- little bits around the player are rendered and the rest is not. Each time you add a new camera, it adds a new "sight cone" to render. Like split-screen on a console (ugh).

I can't tell you how it will perform but I would caution you to try four despondent and simultaneous cameras in a world-map before trying any more than that.
 

Quote

If local, is there a way to display this kind of effect globally to such a scale in a multiplayer environment?

Good question.

Share this post


Link to post
Share on other sites

Thanks for your response @wogz187.

I have actually decided to create this test scenario as I have initially started placing those cameras in a real mission scenario. There, I have noticed that some of them do not to work so thought that I try to isolate the issue as I could have made some mistakes in the script. I have also placed around 10 cameras in the mission.

 

So as it turns out the script was just fine but again, there seems to be a kind of limitation on the render-to-texture feature.

I couldn't help but dig a bit more and I found the below thread from about a year ago. I am not sure if this is the same thing exactly, but they also mention that there is apparently some limit as to how many of those textures can be displayed at once.

 


This seems unconfirmed to me though. Either way, the original questions remain:
Is there any way around it to make more of those screens?
Will this effect be visible to other players in MP?

Thanks!

  • Like 1

Share this post


Link to post
Share on other sites
37 minutes ago, Dj Rolnik said:

So as it turns out the script was just fine but again, there seems to be a kind of limitation on the render-to-texture feature.

 

I ran into this limitation a while ago during stress-testing this:

 

I think you're just gonna have to work around as best you can with some creative mission design.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @beno_83au, it sure looks like limitation of some sort now that you mentioned trying this in the past. Too bad we can only work with as many as 8 but again - don't want to complain. It's still great that we have such feature in the first place.

 

I am still kind of uncertain on the aspect of locality of the view, as in who will see what in MP environment, but I guess I will just try it out with a few chaps.

 

Thanks a lot for help!

Share this post


Link to post
Share on other sites

Yeah sorry, mine is all done locally as I was trying to "reflect" from a player's position/POV, so it all needed to be done locally anyway.

Share this post


Link to post
Share on other sites
On 11/1/2021 at 2:31 AM, WarhammerActual said:

Hi , is this MP compatible ? 

Yep, used this in my mission a few times, but the screen loads locally to each player.

Share this post


Link to post
Share on other sites
2 hours ago, Dj Rolnik said:

Yep, used this in my mission a few times, but the screen loads locally to each player.

Awesome, Thank you very much

Share this post


Link to post
Share on other sites

So my players can only see the belly of the UAV I have placed down, not the actual camera feed.. Any thoughts on what can be changed  so they can actually see the air to ground camera feed in real time? Thank you 

Share this post


Link to post
Share on other sites
On 11/2/2021 at 10:36 PM, WarhammerActual said:

So my players can only see the belly of the UAV I have placed down, not the actual camera feed.. Any thoughts on what can be changed  so they can actually see the air to ground camera feed in real time? Thank you 

 

I believe that you would probably have to attach the camera to a different memory point on the UAV you're using. You would have to find it in the config for that specific UAV. For the peltors that I used in the example above it was "PiP1_demining_pos" which is the rotary arm. The thing is, in this drone that point is attached to a moving arm and thus can be somewhat directed to where you wanna look at - I am not sure if that's the same for flying UAVs. As in, they may not have a memory point which looks in the direction that the uav operator is using.

 

I think that you can kind of work aroud it with this:

	screen3 setObjectTexture [0, "#(argb,512,512,1)r2t(uavrtt3,1)"];
	cam3 = "camera" camCreate [0,0,0];
	cam3 cameraEffect ["Internal", "Back", "uavrtt3"];
	cam3 attachTo [cone3, [0,0,0]];
	cam3 camSetTarget pen3;
	cam3 camSetFov 0.45;
	cam3 camCommit 0;

I used this for static cameras which transmit the feed that looks from the position of cone3 to pen3 and transmit image uavrtt3. In your case, you could technically use the drone as the source and a player or anything as the target and I think it should work, but then again it's only fixed for that specific target. It really depends on what you're trying to achieve.

 

Share this post


Link to post
Share on other sites
4 hours ago, Dj Rolnik said:

. It really depends on what you're trying to achieve.

 

Thank you , what I am trying to do is have a player control a drone , in a multiplayer game . They control the vehicle and the camera feed is viewable by another player somewhere else in a op center on a tv screen .

Share this post


Link to post
Share on other sites

Does this work for Multiplayer?

 

Basically what I'm thinking is having a drone or vehicles turret camera feed displayed on a screen in some kind of TOC (Tactical Operation Centre) where it can be viewed by a command element, It'd be controlled by an operator but the feed would essentially be 'mirrored' to a screen based far away. Would it be similar to a helmet cam script?

 

I'm not massively skilled when it comes to writing script, I usually just copy scripts off YT and then modify them slightly to do what I need.

Share this post


Link to post
Share on other sites

Hi brothers in arms, @WarhammerActual, @BikerJoe, @Dj Rolnik I think you should review the work of our mate @bangabob let me put his work here:

On 12/18/2013 at 10:39 PM, bangabob said:

Live Feed Control



(LFC)


 

Live Feed straight from the battle to a safe command center. Use the helmet camera feed for Point of veiw (POV) OR the Satellite link for lateral combat awareness.

 

 

Live Feed Control features v1.2 (24/12/2013)

 

  • In-Game monitors
  • Stream from helmet cams
  • Satellite feed
  • Dedicated server compatible & JIP compatible
  • Easy to install + Use
  • Realistic command center
  • Automatically adjusts for units in vehicles

 

Instructions

1. Copy "LFC" folder into your mission folder

2. Open editor and add an EMPTY/Objects (signs)/invisible heli-pad. Name it SERVER (Important)

3. Create a monitor. EMPTY/Objects (signs)/Sign (ARMEX). Name it Monitor1

4. Name a unit "UNITNAME".

5. Copy this inside your Init.sqf


null = [[Monitor1],["UNITNAME"]] execVM "LFC\feedInit.sqf";
 

 

6. Preview Mission and use the scroll wheel to interact with the monitor

Addition instructions

  Reveal hidden contents

For more monitors add to existing call.



null = [[Monitor1,Monitor2,Monitor3],["UNITNAME"]] execVM "LFC\feedInit.sqf";
 

 

For more units add to existing call



null = [[Monitor1],["UNITNAME","Unitname2","unitname3","unitname4"]] execVM "LFC\feedInit.sqf";
 

 

Important notices

  Reveal hidden contents

 

  • A maximum of 4 different camera feeds at the same time
  • After reaching 5 concurrent camera feeds the monitors will turn off. (This is the renderTargets been reset after reaching their maximum capacity). Simply select a feed to continue.
  • Use above instructions for adding more monitors
  • Ensure an object named SERVER exists in the mission
  • Do NOT put the same unit in different calls. Such as
    
    
    [b]BAD:[/b] null=[[monitor1]["s1"]]execVM "LFC\livefeed.sqf";null=[[monitor2]["s1"]]execVM "LFC\livefeed.sqf";
     

     

    
    
    [b]GOOD:[/b] null=[[monitor1,monitor2]["s1"]]execVM "LFC\livefeed.sqf";
     

     

 

 

ChangeLog

  Reveal hidden contents

1.2 updates (24/12/13)

- JIP compatible. Players will be added to livefeed list upon entering server

- Cleaned up script errors

- Removed desktop background in favor of realistic blue screen

- Changed folder name from "CCTV" to "LFC"

- Use string format when adding units to livefeed

- Modified secure.sqf script in example mission for adapting monitor display grid

1.1 updates (19/12/13)

- Camera will update when unit enters vehicles

- Added camera positions for all vehicles!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×