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 AcornBringer · Aug 25, 2017 at 12:30 PM · shadowsdistancebackgroundvisibilityclipping plane

Always Show Distant Objects?

Hi there!

I placed an object as well as some terrain outside my actual game space to be part of the backdrop however I realized a few issues:

Once the game camera reaches the furthest areas of the map, the far clip starts to consume the distant objects. Also the objects shadows won't show because of the shadow draw distance being set to a reasonable number.

Is their some way to have these background object always visible along with their shadows with out setting the scene settings extremely high?

Thank you :)

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by FortisVenaliter · Aug 25, 2017 at 03:01 PM

The best way I've found is to render twice.

You have a background camera that just renders the low-res background. Set it's z-clip to, say, 100-100000 (good rule of thumb is to make your far clip 1000x your near clip).

Then set up your foreground camera to clear depth only and render after your background camera. Use your normal z-clip, but make sure the far clip is just beyond your far camera's near clip. If they're the same, there will be a seam (actually there will be a seam anyway for transparent bits like water, but there are ways to mitigate that).

Then simply make sure your far camera matches the position and rotation of your near camera each frame.

This technique is trickier in VR, but for single-camera setups, it tends to work quite nicely.

Comment
Add comment · Show 3 · 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 AcornBringer · Aug 25, 2017 at 04:31 PM 0
Share

This worked out perfectly! Thanks for the detailed response and advice here :)

I'm still not sure how to get the shadows to display on the background objects though so if you have an idea for that, I would be grateful to hear it. As far as I can tell, it's a global quality setting and, unless I move the camera closer to the background objects, it won't display shadows within my shadow distance range.

avatar image FortisVenaliter AcornBringer · Aug 25, 2017 at 06:14 PM 0
Share

Correct. There is a way to do it, however.... Scale down your background and put it in a new layer. Then make sure your far camera will only see the background layers and your near camera will only see the foreground. $$anonymous$$ake sure to scale the position too when syncing it.

That way, the background will be scaled down and will have it's own shadows (since objects on different layer in different renders won't cast shadows on each other).

However, this can look like garbage, depending on your scene. $$anonymous$$ost games, when doing this, will bake the lighting into the background so it doesn't need any lights when rendering (think the matte painting backgrounds in Halo or the Witcher 3), and still looks good. Obviously that won't work if you have dynamic time of day, however.

avatar image AcornBringer FortisVenaliter · Aug 25, 2017 at 06:28 PM 0
Share

Okay I understand! That gives me plenty to go on while creating my own setup. Thanks a bunch!

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

68 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 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 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 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

Why does the bottom half of the image show a shadow like the horizon when the background type is None and there is no object? 0 Answers

Why are my shadows short? 1 Answer

Large scales, increased clipping planes, and performance 1 Answer

How can I prevent shadow sprite overlap? 0 Answers

How do you detect if the cursor is visible within another window? 2 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