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 Rakatan23 · Jan 30, 2015 at 11:38 AM · renderinggraphicsskybox

Skybox stops drawing at certain angles

I have a very simple skybox material. I am using Render Settings to set the skybox for my scene, and I am using a single camera in the scene. The camera is set to the Skybox Clear Flags option.

Sometimes the skybox draws, and sometimes it doesn't depending on where I am in the scene and where I am looking with the camera. I have tried extending the culling plane but that doesn't help at all. This seems counter to what a skybox is supposed to do, draw at all times.

When it is suddenly not drawing, it defaults to the background color set in the camera. I can't find a reason for this in any of the Unity documentation.

Thanks

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 pansapiens · Feb 01, 2015 at 09:51 AM 1
Share

Very strange. Your inclination to increase the clipping distance makes sense, since it sounds like the effect you'd see if you were using a mesh as a skybox and the far clipping plane was sometimes culling parts in the distance ... except that you are using the built in Skybox rendering which shouldn't be dependent on the far clipping plane.

A few things to try: Can you replicate the problem in a very simple scene (Plane, Camera & stock First Person Controller) ? In your scene, what happens if you use one of the unmodified Skybox materials from Standard Assets ins$$anonymous$$d of your material ? (this should isolate if it's an issue with your Skybox material, or something general to the scene setup). What shader is your Skybox material using ? What happens if you ins$$anonymous$$d attach a Skybox component to the camera, rather than use Render Settings ?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Feb 01, 2015 at 11:39 AM

Well, Unity's skybox is fillrate-friendly. That means it avoids overdraw where possible. What unity does is:

  • Clear the framebuffer with a solid color.

  • draw opaque geometry

  • draw the skybox

  • draw transparent geometry

Now if you create a shader that is transparent (it uses a blend function) but is drawn in the opaque step, no skybox will be visible behind the geometry.

Your description of your problem is not very detailed. How does it disappear? Suddenly or do you see a clipping edge? Does it vanish completely or only behind certain things?

In our student project we had a similar problem when we used the depthmask shader to clip parts of the terrain. Where we used the depthmask shader the skybox wasn't visible anymore. This is because the depthmask shader draws into the depth buffer and the skybox shader just ignores that parts as well since it should be all opaque geometry at this point.

Our solution was to create a manual skybox geometry that we've drawn with a second camera before everything else.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Problems with Graphics.DrawMesh, where to call it and how to get material property blocks to work. 3 Answers

Creating a Masking Object with Variable Pass Through 0 Answers

Unity 5 Custom Deferred shader 0 Answers

Why is this issue occurring with my models? 1 Answer

Object see-through when rendering mode is set to Fade 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