• 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 QUICKSORT · May 13, 2013 at 11:49 AM · cameracombinemergerendertotexture

How to merge Camera outputs/render-to-texture

Hi there,

I'm creating an in-game omnidirectional camera of 270°. Since I presume Unity doesn't support it by default I created 27 cameras attached to each other where every camera has a FOV of 10°. When combined they form a 3/4 cilinder with a complete FOV of 270° as shown here on the screenshot. (don't mind the one rectangle camera on front, that is for testing only)

alt text

So now I have to create a render-to-texture of the whole thing where the output of all the small cameras are combined to one render-to-texture. So the question is, how can I do that? Eventually I have to put them on these meshes:

alt text

Any help?

multiprojectormeshes.jpg (309.4 kB)
omnidirectional_camera.png (217.8 kB)
Comment
Add comment · Show 1
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 ataraciuk · Oct 15, 2014 at 03:08 PM 0
Share

Sorry for raising this post from the grave.

I am interested in knowing how you solved this in the end. For a current project, I need to combine the output of two cameras. Either by creating a texture twice as long as each camera width and putting the two outputs one next to each other (preferred), or by combining the two outputs with an alpha slider.

Any insights? Thanks!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ikriz · Aug 22, 2013 at 09:48 AM

you probably need to do something with the cameras matrix

Comment
Add comment · Show 6 · 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 QUICKSORT · Aug 22, 2013 at 09:56 AM 0
Share

Thansk for your reply, but my bachelor thesis is over. I managed to finish this project and it works good.

I managed to do this by playing with the viewports, giving a specific area on the render to texture to each camera.

avatar image ikriz · Aug 22, 2013 at 12:55 PM 0
Share

Is the end result viewable ?

avatar image QUICKSORT · Aug 22, 2013 at 01:17 PM 0
Share

Yes of course, I also made a test game to play on it. Here is a test video I created in the CAVE area running real time using a razer Hydra as controller with it's motion sensor calibrated as a flashlight

Here is teh video: http://www.youtube.com/watch?v=xHdm1Z$$anonymous$$$$anonymous$$9lw

avatar image Dylan4Vr · Mar 18, 2015 at 11:53 PM 0
Share

Would you $$anonymous$$d sharing how you were able to combined the cameras to one render-to-texture?

avatar image QUICKSORT · Mar 22, 2015 at 10:46 AM 0
Share

Well for every camera you choose the target render the texture as the same one. Can't remember if I did it through code or through the inspector, but certainly one of the two.

Aside from that you have to change I think the viewport it was, but something on the inspector visible for every camera, of every camera to only a width equal to 1 / (# of cameras on same render to texture). All starting with an offset equal to the end position of the previous camera.

Though once you put all the cameras on the render to texture, the difficult part was to calculate the correct Field of View of the cameras so that each camera exactly follows the one beside it, which depends on the amount of cameras used.

Hope this helps.

avatar image Epiplon QUICKSORT · Feb 01, 2017 at 09:58 PM -1
Share

Wow, the answer is so simple! Viewports! I was messing with a lot of codes with no success...

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

18 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

Related Questions

Merging Projects 0 Answers

How to specify a depthSlice of Camera's targetTexture? 1 Answer

What's the Script for Combining Prefabs 2 Answers

Render to texture with disabled camera allways generates error 0 Answers

Combine 2 textures of different sizes at specific location 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