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
1
Question by j00hi · Sep 18, 2012 at 06:54 PM · projector

What is the algorithm used behind projectors?

I'm wondering, which algorithm is used for projectors. It seems that an arbitrary number of projectors is supported - even on mobile. Since I'm mainly developing for mobile platforms, I would like to know how the algorithm works to better understand how it would impact performance if used excessively.

I've already done some research, and those are the approaches I have found so far:

  1. use a deferred renderer and the g-buffer (I guess that wouldn't work on mobile?)

  2. create a tri-overlay and use alpha-blending

  3. combine texture with projcted texture - precalculate the texture (in every frame)

Is Unity's algorithm one of those approaches or something completely different?

UPDATE:

I have added some screenshots from a simple scene which contains 1 terrain, and 33 projectors which are using 3 different projection-materials/textures.

The scene without projectors:

Scene with projectors

The scene with projectors:

Scene with projectors

So, to me it looks like the geometry which receives the projections is rendered number-of-projectors times (in this case 33 times). Am I seeing this right? That could have a serious performance impact especially on mobile platforms, i guess.

screen shot 2012-09-21 at 3.29.32 pm.png (242.7 kB)
screen shot 2012-09-21 at 3.29.49 pm.png (244.1 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 Fattie · Sep 21, 2012 at 01:55 PM 0
Share

jewel FWIW. as a "rule of thumb" i've never been able to use more than "a few" projectors in a scene. I've always assumed everyone else found that to be the case. Say 5 tops to put a number on it. Dunno if that helps you.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Jessy · Sep 18, 2012 at 07:39 PM

All a "projector" is, is another rendering pass. You can do whatever you want with it, but Unity sets up some special variables for it:

http://en.m.wikibooks.org/wiki/GLSL_Programming/Unity/Projectors

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 Fattie · Sep 18, 2012 at 08:02 PM 2
Share

Question, is it one extra pass per projector, or one extra pass for all projectors? Thanks

(Sorry if this is incredibly lame question for you :) )

avatar image Jessy · Sep 18, 2012 at 08:12 PM 0
Share

It's not lame at all. I actually don't know how this is handled. I bet that when you use a projector, it breaks batching. I'd have to go check it out, too, so please let us know what the stats window tells you.

avatar image j00hi · Sep 21, 2012 at 01:52 PM 0
Share

I have added some screenshots to my question which include the stats window.

avatar image Screenhog · Sep 21, 2012 at 04:33 PM 1
Share

The big thing to notice is draw calls. Compare your two screenshots. On one, there's 53 draw calls. On the other, 1752 draw calls. 53 x 33 = 1749, so you can see that the draw call count is a direct result of using that many projectors.

avatar image Fattie · Sep 21, 2012 at 04:41 PM 0
Share

fantastic analysis screenhog, thanks for that!

Show more comments
avatar image
0

Answer by tatoforever · Jan 13, 2013 at 12:58 AM

Projectors actually works similar to the way post-process works. It simply renders what ever geometry it's on its frustum and then project from that POV the texture in projector (it's camera) space. I'm not sure if it does the projection in the same pass (while rendering the depth information) or in a extra pass but what i know is they shouldn't be there, they are extremely heavy. It is possible to do deferred decals in forward rendering using a depth+normal texture (well at least i got some ideas how to do it). ^^

Comment
Add comment · 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

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

14 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

Related Questions

A node in a childnode? 1 Answer

Get shadow areas from a plane 0 Answers

Bullet Marks On Moving Object : 2D 1 Answer

Material projected to players position. 1 Answer

Strange Unity Projector Artifacts / Flickering when on Meshes 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