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
0
Question by shwhjw · Nov 22, 2011 at 01:29 PM · camerashadowsprojectionflicker

Shadows and the camera projection matrix

Hi all,

I've built an application in the free version of Unity which allows several instances to connect to a server over a LAN. Each client sees the scene through the server's camera. From here, the server modifies values of the clients' projection matrices so that the client windows can be positioned around each other to draw one whole merged image from all the windows. Eventually this will be used with several projectors to get a high-res scene.

Upon activating my Unity Pro trial and activating shadows, I have found that the clients with modified projection matrices have either flickering shadows (soft and hard), or have weird dark/light distortions around where shadows should and shouldn't be.

There are 2 methods of modifying the matrix which I am using:

  1. 'Sliding' the visible portion of the viewing plane sideways, for projecting onto a flat surface. This creates an asymmetric viewing frustum.

  2. Applying a rotation matrix to the projection matrix, used for projecting onto a curved surface or dome: http://i432.photobucket.com/albums/qq43/shwhjw/projection.png

The sliding method causes shadow flickering, with shadows flickering more and more as the visible portion moves further along the X axis (in camera space).

The rotation method causes the shadows to completely fudge up, and it's kinda hard to explain. They are never where they should be, unlike the sliding method where they just flicker in the correct place. The shadows move, disappear and distort as the camera moves around. Even rotating by 1 degree is enough to make a horrible dark stripe appear over part of the image. When no rotation is applied, the shadows are correct.

I was wondering if the shadows are computed using values in the camera's projection matrix? I know shadows have a lot to do with projection, but I thought only the light direction would come into it, not the camera projection?

I'm using deferred lighting as I want other types of lights to cast shadows too.

Does anybody have any ideas?

Thanks, Simon.

[1]: http://i432.photobucket.com/albums/qq43/shwhjw/projection.png

Comment
Add comment · Show 2
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 shwhjw · Nov 22, 2011 at 12:23 PM 0
Share

FYI it's a directional light I'm using at the moment.

Just tried it with forward rendering. It causes the rotation method's shadows to just flicker ins$$anonymous$$d of distort and such.

Also there seems to be an area on the right side of the screen in which shadows are never rendered, which grows as the amount of rotation is increased. Like they're being sheared off.

avatar image shwhjw · Nov 22, 2011 at 05:40 PM 0
Share

I think I'm going to have to use baked lightmaps...

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to Cast Shadows AFTER Vertex Shader/ Updated Geometry? 1 Answer

Plane / Decal Flashes With Player / Camera Movement 1 Answer

Big circular shadow on the scene [problem] 2 Answers

Vuforia camera won't render shadows 0 Answers

Minimap with no shadow? 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