Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
2
Question by Beacon11 · May 17, 2012 at 05:06 PM · simulationmultiple cameras

Multiple Cameras Perform No Better On Better System

Hello. I am using Unity 3.5.1 for the backend of a robotics simulation. As such, I have multiple Unity cameras on a vehicle pointing in different directions for situational awareness. The problem is that all of these cameras need to be enabled, which means that they're constantly rendering the scene. This works okay with three cameras (the main camera plus two extra), but as soon as I start adding more the frame rates drop to unacceptable levels.

I assumed this was a graphics device limitation, so I inserted a second video card and tied them together via SLI. The frame rates did not improve. Am I incorrect? What is the limiting factor in having multiple Unity cameras if not the graphics card?

Thank you for your help.

UPDATE:

To duplicate, run the original Bootcamp demo included in Unity (3.5.1). Add four more cameras to the soldier_location object. Remove the audio listeners from all four, leave the other settings as default. Don't even worry about positioning the cameras. Now, play the game. Notice the drop in frame rates.

To answer the question of what the cameras are used for, they are simulating real-world stereo camera pairs. This means that each camera renders all parts of the 3D scene. For this example, the cameras are completely unused other than simply being enabled. Could the CPU still be the bottleneck?

Comment
Add comment · Show 3
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 Drakestar · May 17, 2012 at 05:13 PM 0
Share

What are your cameras doing inside Untity? Are they rendering a 3D scene? Displaying the camera picture via render-to-texture? Performance characteristics for 3D engines are very complex, and you could be bottlenecked by either the CPU or GPU depending on what you're doing.

avatar image Beacon11 · May 17, 2012 at 05:43 PM 0
Share

I updated the question to address your questions.

avatar image Garrett1 · May 17, 2012 at 06:01 PM 1
Share

You're right, frame rates dropped significantly. Not sure what the limiting factor is though....

2 Replies

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

Answer by Drakestar · May 17, 2012 at 06:22 PM

To answer the question of what the cameras are used for, they are simulating real-world stereo camera pairs. This means that each camera renders all parts of the 3D scene. For this example, the cameras are completely unused other than simply being enabled. Could the CPU still be the bottleneck?

In that setup, the CPU will indeed be the bottleneck and no GPU in the world will by you better performance. Even though you're not rendering through those cameras, they still need to perform a lot of heavy lifting behind the scene: gathering all objects, rejecting them based othe camera's view frustum etc. Potentially (although doubtful), they even build a framebuffer. I don't have access to Unity to test anything right now - but generally speaking, whenever you have more than one active cameras in a scene, the CPU will have to do more work.

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 Beacon11 · May 23, 2012 at 02:24 PM 0
Share

That makes total sense-- I didn't even think about frustum culling. Technically, couldn't the actual frustum culling be multithreaded by Unity even if sending the data to the video card was mutexed? Do you think that would improve things?

avatar image
0

Answer by cregox · May 17, 2012 at 05:25 PM

I just tested 5 cameras on a mac mini (no video card) with 2gb RAM. I've added a single particle and tried them both with Clear Flags off and with view port rect. No performance issues at all.

On my PC (8 RAM, quad core, GeForce GT 440, 6.8 windows index rating for graphics) I did a second test using AngryBots and 11 cameras. I've attached 10 cameras into the Main one and removed audio source. No performance hit what so ever. Same test on the same mac above: same results. Then I separated them into 11 different rect view ports. You guess it.

What I did noticed is the FPS went down from 250 to 30, but it was 11 cameras. And it's linear, unlike what you say. If I just hit CTRL/CMD+D to duplicate the extra cameras while on game play, I can see the FPS going down by about 20 fps for each extra camera, which makes sense.

As Drake commented, there are too many things that could be wrong in your case, but hardware resource must not be it.

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 Drakestar · May 17, 2012 at 05:44 PM 0
Share

If all those camera actually process, render and display the scene, hardware resources will be a limiting factor. But it could be anything - scene setup, geometry throughput, fillrate... Need more information.

avatar image Beacon11 · May 17, 2012 at 05:44 PM 0
Share

Thank you for running that test! If you would be so kind, could you please run the test described in my updated question with the Bootcamp demo? Does it still run perfectly?

avatar image cregox · May 17, 2012 at 05:55 PM 0
Share

@Beacon11 as soon as I download it. Is it ok testing it on AngryBots?

avatar image cregox · May 17, 2012 at 06:37 PM 0
Share

@Beacon11 couldn't find BootCamp, I hope AngryBots is good enough.

avatar image Beacon11 · May 23, 2012 at 02:22 PM 0
Share

That's very interesting... unfortunately I can't test AngryBots since it requires an external server, but I still find it interesting that it works for you with so many cameras. I didn't mean to imply that the change was nonlinear-- in fact, I would say that it is.

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to launch multiple instances of multi-display across local network?,How to run multiple-instances of multi-display? 1 Answer

Light gun simulation 2 Answers

RigidBody Physics Flight Simulator Script Help 1 Answer

Basic questions for moon landing game 1 Answer

Can I run a duplicate physical world at high speed? 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