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 /
avatar image
1
Question by akisrn · Jun 16, 2017 at 04:56 AM · cameraobjectrendertexture

Make RenderTexture turn certain color to Transparent?

Good day, all!

I'm currently working on a Unity project and I'm stuck in this part. I have two Cameras. Camera A is for rendering the background and Camera B is for rendering the object. I've been advised to use Depth Only and the rendering works well. But I need to attach a script to my Camera B and it misbehaves when the clear flag is set to Depth Only. I've settled with just setting it to Solid Color and the only workaround I've thought of is if I could only make my RenderTexture remove all the solid color so that the only thing left is the object.

Any tips would be really appreciated. Thanks in advance.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Brogan89 · Jun 16, 2017 at 05:12 AM

mine is perfectly transparent only showing the model, and i have my settings like this... alt text

RenderTexture alt text

hope it helps


rendertexture.png (13.7 kB)
camera.png (20.1 kB)
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 Brogan89 · Jun 16, 2017 at 05:15 AM 0
Share

on your camera , solid colour - make sure alpha = 0

avatar image akisrn · Jun 16, 2017 at 06:10 AM 0
Share

Interesting. I'll give this a try and let you know how it goes! Thanks :)

avatar image
0

Answer by akisrn · Jun 16, 2017 at 07:01 AM

@Brogan89

Hi, again!

I have attached the screencaps of my settings below.

This is the settings of my Camera A. The one that's supposed to render the background.

alt text

This is the settings of my Camera B. The one that's supposed to render the object.

alt text

This is the settings of my RenderTexture is the same as yours except that I dont have the Dimension option.

I cant find the "Use Graphic Settings" in my Rendering Path. When I try to add my RenderTexture in the Target Texture, I just get the the Render of Camera A.


screen-shot-2017-06-16-at-23016-pm.png (30.4 kB)
screen-shot-2017-06-16-at-23030-pm.png (30.8 kB)
Comment
Add comment · Show 5 · 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 Brogan89 · Jun 16, 2017 at 07:50 AM 0
Share

@akisrn O$$anonymous$$, it might be a Unity Pro thing, I'm not sure.

What are you trying to do with the render texture? Because I use $$anonymous$$e to render a 3D model to UI.

Within run time, the lowest Depth camera will render first, i.e your Camera A will always render before Camera B, because its lower depth.

The dimensions settings is the render texture its self, within the assets folder.

Let me know exactly what you are trying to achieve, because I can't see why it wouldn't work.

avatar image akisrn Brogan89 · Jun 16, 2017 at 08:21 AM 0
Share

@Brogan89 I'm trying to remove the black background being rendered by Camera B. So when I hit play, the object seen by Camera B will be rendered with the background seen by Camera A. x

avatar image Brogan89 akisrn · Jun 16, 2017 at 08:27 AM 0
Share

I still don't see why that would work? In run time, what are you doing with your rendertexture? Is it on a UI object, quad, or plain? $$anonymous$$aybe if you can show a screen shot i might get a better idea

Show more comments

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

105 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

Related Questions

How to make an object always in front of the OVRPlayerController camera? 1 Answer

Scaled render texture misaligning mouse movement 0 Answers

Click a cube to move player over to that position & rotate player to face fixed point 1 Answer

Can a rendertexture be placed on top of an image? (Minimap help) 0 Answers

Help, please with rotation input 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