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
0
Question by AconitumNapellum · Sep 25, 2018 at 02:26 PM · canvasrendermulti-display

Render same stuff to two displays

Hi everyone, can't seem to find an answer to my problem, even if it doesn't seem like much of an issue. I've been trying to render the same game on two different displays without success. Got my canvases on screen space-camera mode, so I can't enable a second camera to render to display 2. In my case I sometime have to disable a canvas and enable another one to change page, and the second canvas doesn't get rendered if using Screen space-overlay mode or world space mode. Isn't there an easy way to do this?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by juschu · Feb 01, 2019 at 12:08 AM

You need 3 cameras to do this. You basically render to a virtual canvas with the main camera and then capture that canvas with two more cameras. Just like current blockbuster movies end up on illegal streaming websites right after they are released.

  • Create a new material with the "Unlit/Texture" shader.

  • Create a new render texture. You have to set the display resolution in this texture. If both displays have different resolutions use the bigger one. It will cause even bigger (solvable) problems if the displays have a different aspect ration. But the bigger problem there would be that you are trying to use the same UI for two different aspect ratios.

  • Set that texture as the render texture in your main camera and as the texture in your unlit material.

  • Add a quad GameObject and select the material with the render texture in the mesh renderer.

  • Create a new layer. Something like "IndirectCameras".

  • Put the Quad into that layer.

  • In the culling mask of the main camera deactivate the layer "IndirectCameras".

  • Add two (or more) new cameras. With those cameras ...

  • ... ONLY activate "IndirectCameras" in their culling mask.

  • ... set them to render to Display 1 and Display 2

  • ... place them on the same spot so they can see the quad.

  • ... turn off HDR and MSAA, that's something for the main camera. You could also turn of occlusion culling but I think it doesn't matter in this case, since there is only one object in that layer.

  • Now you have to find the right distance of the quad to the cameras so it exactly fills up the view of those two cameras. The aspect ratio of the quad should be the same as the aspect ration of the displays. That sound like something that should be scripted. I think it's important that you are really exact here, so one pixel from the main camera exactly represents a single pixel in the indirect cameras, it's an exact copy of the image and you won't lose quality. Of course, this won't work when you have two different resolutions. But I think you have to deal with that since the only possible way to avoid that would be to completely render the scene twice with every single mesh renderer and not just a single quad.

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

161 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 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 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

How to choise canvas render mode? 0 Answers

canvas render sorting error 0 Answers

How to scale canvas content according to screen resolution? 1 Answer

Need help creating a scrollable list 1 Answer

2D circular image carousel help!!! 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