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
0
Question by coreyog · Apr 20, 2016 at 06:18 PM · rendertexture

RenderTexture without existing in the scene?

What I would like to do is have a deck of cards, probably simple quads, where the front is a RenderTexture and the back is a simple static texture.

I've watched this straight forward tutorial about Render Textures and think it's exactly what I'm after but I have one concern. The card game idea I'm pursuing will have hundreds of varieties of cards. Does that mean I need a section of my scene dedicated to each card? Would every card need it's own camera? I see this getting very hairy very fast. I'd have a table where the card game takes place but a huge field of cameras, their main content, and back drops out of view for each card that are not seen by the main camera and none of these cards would see each other.

What options do I have to keep this maintainable?

Comment
Add comment · Show 10
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 tanoshimi · Apr 20, 2016 at 06:21 PM 0
Share

Are the render textures on the back of each card updating each frame? If not, there's certainly no need to use any more than one camera.

avatar image coreyog tanoshimi · Apr 20, 2016 at 06:24 PM 0
Share

The backs will be static textures. It's the fronts I'm worried about. Yeah, the fronts would render every frame ideally.

avatar image Dave-Carlile coreyog · Apr 20, 2016 at 06:47 PM 0
Share

Do you mean the front texture would change every frame?

Show more comments
avatar image Eno-Khaon · Apr 20, 2016 at 06:37 PM 0
Share

Would there potentially be a time when the front of every single card is visible simultaneously?

avatar image coreyog Eno-Khaon · Apr 20, 2016 at 06:51 PM 0
Share

The idea is still a work in progress but right now I can't imagine more than 20 or so card faces drawn per frame. I imagine I can toy around with quality parameters until my cards all draw smoothly.

avatar image coreyog · Apr 20, 2016 at 06:56 PM 0
Share

I'm less worried about the performance than I am about maintaining all the cards as I add and remove them from the game. Right now my understanding is that each card would need it's own Camera, 3D Object (a rather simple model to actually see), and a 2D texture backdrop behind the model. Do all these components have to be in the same scene like when other games put resources "below the map" so they're available when they're needed? Or is there a better way to sandbox these components away from the main scene components?

avatar image Eno-Khaon coreyog · Apr 20, 2016 at 10:10 PM 0
Share

They would need to be in the scene, yes, but that could be handled by doing something like putting all of the card "contents" on a layer of their own. Then, it doesn't matter exactly where they're physically located (so long as one card's camera isn't looking at the contents of another card by accident). Just set the camera(s) to only view that layer.

As for cards that aren't currently needed, you can disable gameObjects/cameras when they're not currently needed (if you don't need too huge of an active pool of them).

Then, further optimization can be done if you manually update the RenderTextures (rather than automatically creating them from a camera) by having a controller script for the cameras cycle through only a few per frame to update them at a lower framerate than the main gameplay.

0 Replies

· Add your reply
  • Sort: 

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Apply Render Texture To Camera Via JavaScript - Help 1 Answer

modify textures at runtime? 3 Answers

Graphics.Blit with an additive shader 1 Answer

Real time rendering in cubemap in image effect 1 Answer

RenderTexture stall 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