Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by bhayward_incrowd · May 16, 2016 at 01:45 PM · camerarenderingresolutionwindowmultiple-monitors

Multi-Display rendering offset when displays have different resolutions

Hi Everyone,

I am creating a game (it's actually more of an application/useful software than a game) which needs to be run on multiple monitors, where all monitors are potentially different resolutions.

Incorrect rendering of camera view on windows 2 and 3. **Grey area*** indicates missing section

In the example below, you can see the primary monitor (far left) rendering a full screen camera view, just as it should. There are two other cameras set to render to monitor 2 and 3. These are activated with Display.displays [1].Activate (1600, 900, 50); (so as to set their resolutions to 1600x900).

The issue is that Unity appears to be offsetting the camera rendering so that it does not originate from the top left of the screen, but rather some way down the window. The grey area shows the area where the image is missing. It has seemingly been moved downwards rather than cropped.

When running in the editor, the cameras render each window perfectly with no strange offsetting/cropping.

What do I need to do in order to get the standalone output to render the correct, uncropped/offset image in each of the windows, please?

If I make the resolution of all monitors the same, it renders exactly as it should do:

When all monitors are forced to use the same resolution, the rendering is not cropped.

temp2.jpg (447.6 kB)
temp1.jpg (427.1 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Stonesand · May 27, 2016 at 05:26 PM 0
Share

O$$anonymous$$, having actually done more digging this IS a known bug, and is fixed in the next version of Unity:

https://issuetracker.unity3d.com/issues/windows-multidisplay-the-second-screen-in-the-multi-display-mode-gets-weird-offset-when-using-different-screen-resolutions

avatar image Stonesand · May 27, 2016 at 06:10 PM 1
Share

Ok, I can confirm that this is FIXED and works GREAT in Unity beta version 5.4.x. I'm using the latest built, 5.4.0b19, and I get perfect displays on both differently sized monitors with this code:

 Display.displays[1].Activate();  // Activate the second display

That's right! You don't need any other SetRendering or SetParams() functions - it just works based on the native resolution of the monitor. You ALSO do NOT need to use the -multidisplay command line option, so you can go back to double clicking the .exe.

Yay! Thanks Unity!

avatar image Ibukii · Jun 24, 2016 at 03:56 AM 0
Share

sorry but do you NEED actual monitors to use multi display? If I would like to try how should i do it?

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Shawn_Flanagan · May 15, 2019 at 09:15 PM

I just found this issue in Unity 2019.1.2f1. I don't understand why it's not fixed yet. If all my monitors are set to the same resolution, there is no problem. But if any monitor is set to a different resolution, then it incorrectly renders the image for that monitor using the resolution of the main display.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MagicManFoli · May 31, 2019 at 10:23 PM 1
Share

same here, has anyone found a solution yet?

I am trying to have a scene with one screen at 1920x1200 and the other one at 800x600 and it looks like the rendering on the second monitor assumes the same size as the primary monitor. Playing around adding "-multidisplay", setResolution and more won't work.

avatar image Shawn_Flanagan MagicManFoli · Jun 01, 2019 at 03:33 AM 0
Share

That's almost identical to my experience/needs. As far as I can tell, there's currently no way to get this situation to work using the multi-display functionality built into Unity.

The best solution I found is what $$anonymous$$arl Jones suggests on this forum page:

the best approach it to just launch the application separately for each window and have them communicate with each other via some interprocess communication. The simplest thing to do would be to network the clients. https://docs.unity3d.com/$$anonymous$$anual/UNet.html This way the screens can be on the same machine, multiple machines or even different devices (mobile map etc)

avatar image hughda · Aug 01, 2019 at 02:40 PM 0
Share

i just updated from 2018.3.5f1 to 2019.2.0f1, arrrrgggghhhhhhh. HEEELLLLLPPPPPP

avatar image
0

Answer by Stonesand · May 27, 2016 at 04:29 PM

I'm having exactly the same problem. I'm using the "-multidisplay" command line option (which sure feels like a hack, and isn't very portable).

You can find that option on the bottom of this page: http://docs.unity3d.com/Manual/MultiDisplay.html

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Stonesand · May 27, 2016 at 04:43 PM 0
Share

Some more observations, and a workaround (partial success):

1) It doesn't matter what arrangement of the monitors I make in Windows. They can be above each other, to the side, vertically staggered, it has no effect on the offset nature/black bars on the secondary monitor.

2) Even when I force the Displays in code to use the same resolution, in this case the native resolution of display 1:

 Display.displays[0].SetRenderingResolution(Display.displays[1].systemWidth, Display.displays[1].systemHeight);
 Display.displays[1].SetRenderingResolution(Display.displays[1].systemWidth, Display.displays[1].systemHeight);

...this still puts black bars on the secondary monitor, and offsets the screen down off the edge of the monitor.

3) If I go into Windows and set the monitors to all use the same resolution, it all works! I get correct display on each monitor! Except there's a serious downside: my monitors don't have the same native resolution, nor are they the same aspect ratio. Thus, the monitors that aren't being set to their native resolution look fuzzy and have letterboxing!

I'll keep experimenting, but I think this system just isn't fully baked yet. Ideally, each display should be able to use it's own native resolution!

avatar image Stonesand · May 27, 2016 at 05:20 PM 0
Share

Nah, this is just bugged. :) Even if I try something like this:

 Display.displays[1].Activate(Display.displays[1].systemWidth, Display.displays[1].systemHeight + 180, 60);
 Display.displays[1].SetRenderingResolution(Display.displays[1].systemWidth, Display.displays[1].systemHeight + 180);
 Display.displays[1].SetParams(Display.displays[1].systemWidth, Display.displays[1].systemHeight + 180, 0, -180);

... it still doesn't work. That 180 value is the difference in height between my two monitors (1080 - 900). That SetParams() function raises the displayed area on the second monitor up so that at least the display is centered - but no matter how much I change the values, it always chops the bottom 180 pixels off. If I set the last height parameter of SetParams() as 0, it fills the top in with black. If I set it to 180, I can see my desktop on the bottom of the display.

No matter what, if there's a screen height difference, the second display will be missing the difference in height in pixels.

avatar image
0

Answer by txusillo · Jul 23, 2016 at 05:47 PM

As @stonesand confirms, this is a known bug to Unity developers, there's nothing much to do about it.

I've just downloaded the beta version of Unity and this seems to be working properly now. You should give it a go.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Vorrin · Oct 25, 2016 at 11:02 AM

I'm on 5.4.1f1 and I still have this problem, if I use any image effects on either camera.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

72 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why is there difference between android device resolution and webcamtexture resolution 0 Answers

Shadow quality at high distances 1 Answer

camera problem,Camera Problem 1 Answer

How to delay render one camera for X ms? 1 Answer

How to apply a shader on a part of the scene ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges