Jump to content

Recommended Posts

HI guys,

I want to put a series of PIP screens on a dashboard. I have the config portion down (see below).

	class RenderTargets
	{
		class DASH0
		{
			RenderTarget = "rendertarget0";
			class CameraView1
			{
				pointPosition = "PIP0_pos";
				pointDirection = "PIP0_dir";
				renderQuality = 2;
				renderVisionMode = 2;
				fov = 0.7;
			};
		};
		class DASH1
		{
			RenderTarget = "rendertarget1";
			class CameraView2
			{
				pointPosition = "PIP0_pos";
				pointDirection = "PIP0_dir";
				renderQuality = 2;
				renderVisionMode = 1;
				fov = 0.7;
			};
		};
	};

It's not getting any errors, I'm just unsure on how to have the PIP go on to the section of the dash. I attempted to select the face on where I wanted the screen to be and named it RenderTarget0, and RenderTarget1. And there's nothing showing on those faces. Ive then gone back and renamed those faces to DASH0 and DASH1.

What am I doing wrong thats causing them not to show/render?

Edited by SpectreRSG

Share this post


Link to post
Share on other sites

You need to apply a procedural "r2t" texture to the face you want the screen to appear on. Select them, press [E] to bring up the Face Properties window, and in the Texture field add the following:

#(argb,256,512,1)r2t(rendertargetX,1.0)

Replace the X with the number of the rendertarget that you want to appear on that display.

AFAIK in order for the PiP display to render the full scene and have the correct aspect ratio (no stretching etc.) the screen does also need to have proper UV coordinates scaled for this r2t texture rather than being scaled for the texel ratio of your vehicle's textures. So you might need to go into the UV editor and scale it until it fills the UV space along the screen's longest axis (assuming the screen is rectangular and not square).

  • Thanks 1

Share this post


Link to post
Share on other sites

Also you need to make sure that the Face is properly setup to use all the UV space you can.

pip_uv.jpg

The PiP image is proportional to the UV layout size. Imagine the UV box (Fine dotted lines) is the maximum camera view. Now think of the mapped faces as a mask. You can only see through the bits where the faces sit. You need to place the mapped face so that it fills as much of the box as possible so that the camera will render as much of the image. Placement is also critical. The centre of the UV box is the focus of the camera. So the middle mirror in my example will only show the top of the camera view.

I hope that makes sense.

Good Luck :)

  • Thanks 1

Share this post


Link to post
Share on other sites

Do you guys know if there's anyway to render PIP/RTT screens above 512x512 pixels?

Share this post


Link to post
Share on other sites
On 5/12/2018 at 3:13 PM, pingopete said:

Do you guys know if there's anyway to render PIP/RTT screens above 512x512 pixels?

I tried this, and all it did was fill the top-left quadrant of the square. The rest was bled from the right and bottom edges. I get what you're hoping to do; you want a higher resolution for your PIPs. I was hoping to do this as well for some of my periscopes that shouldn't look like video.

Anybody have a better understanding of the bounding boxes? The guide doesn't really explain it well.

Share this post


Link to post
Share on other sites
20 hours ago, scotg said:

I tried this, and all it did was fill the top-left quadrant of the square. The rest was bled from the right and bottom edges. I get what you're hoping to do; you want a higher resolution for your PIPs. I was hoping to do this as well for some of my periscopes that shouldn't look like video.

Anybody have a better understanding of the bounding boxes? The guide doesn't really explain it well.

I have since done a lot of experimenting with PIP as a mechanic for realistic scopes - see the outcome in this vid. ARMA actually only allows for a maximum pip resolution of 512 x 256. A PBO's UV texture space is where you assign what field of view of ingame world that will be passed through into PIP rendering. ARMA always looks at the UV as if it's a rectangular 2:1 and not square 1:1. If you use the whole UV space in a 1:1 UV map ARMA will capture a 2:1 window of ingame view and squash it horizontally back down to a 1:1 square resulting in the image being squashed sideways/stretched vertically. In order to counteract this distortion (using the whole UV map space/proportion) either apply the UV to a 2:1 rectangular shaped texture/object/screen in game (will result in 512 x 256 PIP resolution), or squash the PIP area of the UV map half horizontally (will result in undistorted 256x256 PIP resolution. This is what I've done with those scopes. The ratio variable of the texture line in the PBO or script doesn't do anything, changing the resolution will not influence the aspect ratio of the PIP, and increasing the PIP above "512x512" will simply cnter tile the PIP render area and stretch the edge pixels out at the sides. Also chromatic abberation amognst other PIP effects don't work, I used colorCorrections here.

Share this post


Link to post
Share on other sites
1 hour ago, pingopete said:

increasing the PIP above "512x512" will simply cnter tile the PIP render area and stretch the edge pixels out at the sides

 

21 hours ago, scotg said:

all it did was fill the top-left quadrant of the square. The rest was bled from the right and bottom edges.

I guess your outcome was different from mine. Both are unfavorable, but distinct. The edge pixels stretching/bleeding is what we don't want, but I am curious why your render area was centered while mine was left-top aligned. The only change I had made to do this was setting the (512, 512, 1) to (1024, 1024, 1). Either way, it doesn't support it, sure enough; I just wonder if the difference in outcome has any bearing on a potential work around, like fusing together 4 PIPs to fake a higher resolution.

In my tests, I also discovered that if you don't fit your longest edges to the bounds of the square, then you lose even more resolution.

Share this post


Link to post
Share on other sites
18 hours ago, scotg said:

 

I guess your outcome was different from mine. Both are unfavorable, but distinct. The edge pixels stretching/bleeding is what we don't want, but I am curious why your render area was centered while mine was left-top aligned. The only change I had made to do this was setting the (512, 512, 1) to (1024, 1024, 1). Either way, it doesn't support it, sure enough; I just wonder if the difference in outcome has any bearing on a potential work around, like fusing together 4 PIPs to fake a higher resolution.

In my tests, I also discovered that if you don't fit your longest edges to the bounds of the square, then you lose even more resolution.

Yeah I forgot to mention that the actual render section is in the farthest the top left if you go over the hardcoded PIP resolution. I had thought about using 4 but I don't really know enough about PBO building to try this myself, I do know however that the game caps, performance usage for multiple PIP screens so that the more sreens you have the lower the PIP framerate will become, I imagine with 4 screens this would be pretty poor, not to mention possible sync issues at the center.

Share this post


Link to post
Share on other sites

Since my last post, I tried lining up two "screens" for a wide view. Getting the FOVs right is the issue, because it can align in the foreground at the expense of splitting the background, and vice-versa. There was indeed a performance issue in the PIPs as well. It was worth a shot. I just wish there was a way to make better periscopes.

Share this post


Link to post
Share on other sites
On 10.10.2018 at 5:58 PM, pingopete said:

ARMA actually only allows for a maximum pip resolution of 512 x 256.

it's 512x512 actually. The thing that you have described with uv stretching is caused by attempting to squeze your screen resolution to that square space. If you have 16:9 screen ratio, then you will have to adjust in same manner your uvmap. That also means, there is no reliable way to have PiP behaving on all screen resolutions/rations. Most extreme thing happens with triple screen setup.

 

Sort of workaround is using UVAnimations but I haven't tested it yet

Share this post


Link to post
Share on other sites
16 hours ago, reyhard said:

it's 512x512 actually. The thing that you have described with uv stretching is caused by attempting to squeze your screen resolution to that square space. If you have 16:9 screen ratio, then you will have to adjust in same manner your uvmap. That also means, there is no reliable way to have PiP behaving on all screen resolutions/rations. Most extreme thing happens with triple screen setup.

 

Sort of workaround is using UVAnimations but I haven't tested it yet

Well I didn't realise it was controlled by the users monitor's aspect ratio but for all intents and purposes 95% of people use 16:9 screens and so are limited to the resolution I mentioned. Maybe if someone had a square monitor then they could mitigate this but as far as I could tell the aspect ratio variable does nothing

Share this post


Link to post
Share on other sites
Just now, pingopete said:

Well for all intents and purposes 95% of people use 16:9 screens and so are limited to the resolution I mentioned. Maybe if someone had a square monitor then they could mitigate this but as far as I could tell the aspect ratio variable does nothing

I don't have that data right now but from what I remember it's closer to 80%. ;)

 

Anyway, aspect ratio param in procedural texture indeed doesn't work and that's why I've mentioned UV animations. I've mentioned what is actually happening so people might set their PiP windows correctly since 16:9 != 512x256

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

×