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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×