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 thesfid · Nov 01, 2012 at 09:45 PM · cameralightingshadow

What is causing the Abs(dist - shadowRadius ) error?

The error doesn't seem to happen while I'm preview/playing my scene, only when I'm navigating my scene in the editor. Since it's an "assert in file" error I'm having a hard time tracking down the culprit.

The error doesn't seem to affect performance (since the scene isn't running when the error pops), and I can clear the error from the console immediately after it pops.

Haven't been able to find any info on this error in my web and forum searches. Any help is greatly appreciated.

Here is the complete error:

Abs(dist - shadowRadius) < 0.001f * shadowRadius

UnityEditor.Handles:Internal_DrawCameraWithGrid(Camera, Int32, DrawGridParameters&) UnityEditor.Handles:DrawCameraImpl(Rect, Camera, DrawCameraMode, Boolean, DrawGridParameters, Boolean) (at C:/unity/Editor/MonoGenerated/Editor/EditorHandles.cs:596) UnityEditor.Handles:DrawCameraStep1(Rect, Camera, DrawCameraMode, DrawGridParameters) (at C:/unity/Editor/MonoGenerated/Editor/EditorHandles.cs:612) UnityEditor.SceneView:OnGUI() (at C:/unity/Editor/Mono/SceneView/SceneView.cs:680) System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) UnityEditor.HostView:Invoke(String, Object) (at C:/unity/Editor/Mono/GUI/DockArea.cs:228) UnityEditor.HostView:Invoke(String) (at C:/unity/Editor/Mono/GUI/DockArea.cs:221) UnityEditor.DockArea:OnGUI() (at C:/unity/Editor/Mono/GUI/DockArea.cs:649) [C:/unity/Runtime/Camera/Shadows.cpp line 606]

edit

Discovered it's the one light that casts shadows in my scene that's causing the issue. I'd like to keep the shadows. There's got to be a setting somewhere that will alleviate this issue, right?

alt text

alt text

EDIT

My system info. I should have included this in the original post...

Unity Pro versions 3.5.2f2 and 3.3.0f3 (0) Dell Precision M6400, Win 7 Pro > 64 bit SP1 x2 Intel Q9100 @ 2.26 GHz , > 8GB RAM NVIDIA Quadro FX 3700M, 4GB > RAM, DirectX 11.0

11-2-12(theculprit).jpg (62.0 kB)
11-2-12(thesettings).jpg (20.1 kB)
Comment
Add comment · Show 11
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 Jessespike · Nov 01, 2012 at 10:09 PM 0
Share

I suppose this doesn't happen in a empty scene? I'm not sure what the problem is, Camera is mentioned in the error, maybe double-check the camera properties. If not, then there might be an asset that Unity doesn't like. $$anonymous$$aybe duplicate the scene and start deleting objects until the error goes away to see what's wrong?

avatar image thesfid · Nov 02, 2012 at 02:52 PM 0
Share

Thanks for the reply Jessespike.

It's a pretty well-populated scene. I've been collaborating with another developer on this particular project, and he's not sure what the issue is either. This scene involves some camera switching from the main (perspective) view to L, R, F, B, and T (orthographic) views.

I'll try your suggestion on duplicating the scene and deleting things, however the error doesn't appear consistently. Sometimes it pops while working in the scene view of the editor, other times it pops as soon as I end the preview/play of my scene.

avatar image thesfid · Nov 02, 2012 at 03:03 PM 0
Share

Just discovered one way I can get this error to show up. Clicking the Scene Gizmo to change the view causes this error to pop, sometimes 2, 3, or 4 instances of the same error with one click. edit Error only pops when going between ortho and perspective views.

avatar image thesfid · Nov 02, 2012 at 03:27 PM 0
Share

It's a light in my scene. Still not sure why it's causing the error.

It's a Directional Light. Disabling shadows alleviates the error, but I want to be able to keep the shadows. $$anonymous$$ust be some setting somewhere to fix it...

I will upload a screenshot of this light's settings to the original question, maybe it will help.

avatar image thesfid · Nov 02, 2012 at 03:45 PM 0
Share

Sorry for the barrage of comments on this...

Could it possibly be that some of the piping or support beams near the ceiling are too small to cast a shadow from that far away from the floor?

Show more comments

1 Reply

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

Answer by Loius · Nov 02, 2012 at 04:51 PM

I have literally no experience with this, but my one suggestion:

Is the light in exactly the same position as something else? Try nudging it to the side a bit. It sounds like something is trying to render a shadow within (too close) of the light source.

If that doesn't do anything, is the light aligned along an axis? (X/Y/Z rotations = multiples of 90) Try rotating it by a degree, maybe there's a divide-by-zero-style thing going on.

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 thesfid · Nov 02, 2012 at 06:14 PM 0
Share

Thanks, Loius.

No, the light isn't overlapping any geometry. Interestingly enough moving the light around causes the error to pop constantly until the movement stops (using both the gizmo and entering values in the inspector).

Same story with the rotation. It was at 90,0,0 so I rotated it slightly.

Seems that any translation or rotation changes on this light will cause the error to pop (in addition to the scene viewport thing in a previous comment).

avatar image thesfid · Dec 07, 2012 at 07:08 PM 0
Share

@Loiuzein, I may have to take back my previous comment. It looks like your solution (along with disabling a lot of objects' cast/receive shadows) has cleared the error up... mostly.

Rotated the directional light to (57, -23, 0) and I only get one error when I stop preview/play of the scene. The single error is

screenviewcoord[1] < 0 || screenviewcoord[3] < 0

This is much better than having 4 errors per second anytime I move the camera. Will do some more testing, then mark your answer as complete unless something else crazy happens. Cross your fingers for me!

avatar image Loius · Dec 07, 2012 at 07:56 PM 0
Share

That sounds like a low-level camera-render issue, but if it only happens when you go from the preview mode back to the editor, I'd say you shouldn't worry too much about it. You might send the project as a bug to Unity, especially if it's down to one error, and they might be able to solve whatever's going on.

Fingers crossed :)

avatar image thesfid · Dec 07, 2012 at 08:09 PM 0
Share

What a strange and random solution. Though the errors have not completely stopped, they aren't flooding the console during runtime which makes me feel much better about things. Thanks for the suggestion, Loiuzein! I'm glad I tried this a second time.

avatar image thesfid · Dec 07, 2012 at 08:16 PM 0
Share

I still get a blast of 6 or 12 Abs(dist - shadowRadius < 0.00af * shadowRadius errors when I use the viewport gizmo in the editor to switch from perspective to orthographic views. But again, those errors don't show up during runtime so they shouldn't affect the final build.

I may end up submitting a bug if I can get my Help>Report a Bug button to work (does nothing when I click it), and if my bosses clear me to send out these project files.

Thanks again!

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

12 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

Related Questions

orthographic camera and shadow 1 Answer

How to get Directional Light Shadows to render through an Orthographic Camera? 1 Answer

Shadows problem with big and small objects 0 Answers

Directional Light creates wierd shadow? 2 Answers

Issue with realtime shadows (receive shadows) 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