Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
avatar image
0
Question by Noxury · Dec 21, 2016 at 10:59 PM · ui3drenderingpixelatedretro

Render a game with ui to a render texture

Hello, I have been struggling with this problem and I can't get it fully work. I have used this method in order to render the actual scene to pixels. How can I render also the ui in the render texture?

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 Geometrical · Dec 21, 2016 at 11:21 PM

I think by following these steps you'll be able to solve the problem:

  1. Select the Canvas you're using to render the UI and have a look at the RenderMode property. Change it from Screen Space - Overlay to Screen Space - Camera.

  2. All the properties should not be changed except for the PixelPerfect property. Tick the Pixel Perfect textbox as it's appropriate for your case and just assign the Camera that you're using to render the Plane.

This should fix the problem, cheers.

Comment
Add comment · Show 1 · 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 Noxury · Dec 22, 2016 at 04:57 PM 0
Share

Yeah I tried it, but all it does is that the canvas is just between the orthographic camera (I tweaked the plane distance of the canvas component also) and the plane where the rendertexture is applied. So it is no pixel effect applied to the canvas, because the orthographic camera is not supposed to draw what is infront of it to pixelated output. Ins$$anonymous$$d, the actual RenderTexture that has been dropped at the main camera's renderTexture fieldproperty outputs the mainCamera's Input. Here is the draw order:

Scene -> $$anonymous$$ainCam(RenderTexture) -> Plane(RenderTexture$$anonymous$$at) -> OrthoCam == GameView

Your approach:

Scene -> $$anonymous$$ainCam(RenderTexture) -> Plane(RenderTexture$$anonymous$$at) -> Canvas -> OrthoCam == GameView

If I try to render the canvas to the mainCam it is now pixelated, but also looks very squeezed that all ui elements are overlapping eachother and also the canvas clips a little bit, to match the canvas position to the moving $$anonymous$$ainCam. However, this problem does not appear at the orthoCam, because the orthoCam is not translating.

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

93 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

Related Questions

How to use two cameras in VR to display 3D object on top of UI panel? 0 Answers

3D Objects on a UI canvas with LWRP? 2 Answers

Second perspective camera causing objects to glitch 0 Answers

How to render pixelated light? 1 Answer

Objects are not visible until the camera gets closer. 1 Answer


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