Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 ChakChakGuy · Aug 30, 2018 at 08:53 AM · lighting3dshadows

Why do I only get shadows on 3 sides of my Scene?

So I have this game where you move inside this cube shaped arena. To make it easier to see where you are in the cube I wanted to cast a shadow on the wall so I have 6 directional lights alog the axes which cast a very clear shadow at exactly the right position. But for some reason this only works on 3 Sides of the Cube.

In this image the top side of the cube also has no shadow the other 2 sides have them just like the yellow wall. So it can't be because of opposite lights getting in each others way, as the opposite side of the yellow wall also has a shadoe and the opposite of the blue wall also doesn't.

alt text

All the lights have the same settings and have about the same distance from the walls. The arenas shadows are turned off (although that wouldn't make any difference because the light only ever hits it's sides from behind)

alt text

scene.png (128.3 kB)
lighting-setting.png (30.6 kB)
Comment
Add comment · Show 6
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 dan_wipf · Aug 30, 2018 at 09:05 AM 0
Share

what kind of shader do you use?

avatar image ChakChakGuy dan_wipf · Aug 30, 2018 at 09:53 AM 0
Share

The regular Standard Shader.

avatar image tormentoarmagedoom · Aug 30, 2018 at 09:41 AM 1
Share

I dont know really, but, are you sure its a good idea to have 6 directional lights at same time?

avatar image ChakChakGuy tormentoarmagedoom · Aug 30, 2018 at 10:01 AM 1
Share

No I'm not sure and I've been considering alternatives already (like raycasting out of the object and spawning my own indicators) but the shadows have some nice properties, that would be a lot of additional work in other implementations. for example the shadow is cast on every single object that doesn't throw a shadow itself so if there are obstacles in the arena the indicator is automatically shown on each. as well as having a natural feel to them

And even if I don't use the shadows I'd still be interested in why this happens, so I have a deeper understanding of lighting for future projects

avatar image Captain_Pineapple · Aug 30, 2018 at 12:57 PM 0
Share

Are all sides modified to actually recieve shadows?

avatar image ChakChakGuy Captain_Pineapple · Aug 30, 2018 at 01:45 PM 0
Share

The whole cube is one continuous mesh. Alls sides should act the same

1 Reply

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

Answer by eses · Aug 30, 2018 at 02:16 PM

Hi @ChakChakGuy

To me it sounds like you are just wondering what is happening, based on what you see on screen. You'd better start tinkering with lighting settings and learn how Unity uses real-time and baked lights.

3D engine lighting is always a compromise between performance and graphics hardware limitations. Unity has pretty nice defaults IMO, but you can change them.

Here is my (some sort of) checklist which you might find useful (not specific to your case):

What quality settings are you using (Project / Quality settings menu) ?
Defaults are from Very low to Ultra.

What types of lights you are using?
If you are not using directional lights, it might be that the light effect distance and strength is not high enough.

What is your shadow (drawing) distance setting value?
It might be, that your shadows get cut off.

What kind of lighting mode you are using?
Mixed lighting on / off?

What are your light importance settings?
If you have more than max amount of set lights.

How many pixel light are set to be used in your Quality Settings?
By default Unity has limited this to 4 in Very High and Ultra, and to 1 or 2 in lesser settings. Also, mixed lighting mode seems to limit light count, you can try it with some test scene you create.

What materials you are using?
Are you using Standard shader, or something else, which might not react to lighting in similar manner?

Which render pipeline is in use?
I've only used standard one in 2018.2 - which is probably the installed Render-pipelines.core, which you can see in Package manager. But there is also lightweight and High-definition.



Tweaking defaults
Even with limited knowledge about engine, if one just answers to these questions and puts some effort in testing each setting for a couple of hours while also making notes, it is possible to get what you are after.

As you can see, I have 8 directional lights casting shadows. Note: you have to test this also on your target platform and in the GIF I'm using tweaked Very High settings.

alt text


Like @tormentoarmagedoom said, I too would really recommend you to consider your approach to solving the problem you have - do you really need lighting to create some markers?

Also, even if this was about lighting a scene, I wouldn't try to use too many shadow casting lights, usually there is something wrong in visuals, if you need tons of shadow casting lights, unless you are aiming for realism or you have some very specific scene.


20180830-quality-settings.gif (104.1 kB)
Comment
Add comment · Show 1 · 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 ChakChakGuy · Aug 30, 2018 at 03:49 PM 1
Share

Thank You!

I actually played around with all kinds of lighting setting for quite a while before asking here, but never got around to the Projects Quality settings.

As I said before, the shadow approach was more out of lazyness and even if it would work in a satisfying way I would have implemented other methods/alternatives. But I didn't want to just discard it without fully understanding how it works (or rather why it doesn't).

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

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

Realtime Shadows Not Casting on Self or Other Objects 0 Answers

Sprite in 3D environment with lights problem 1 Answer

Problems with shadow casting 0 Answers

Should i use one or more "Directional Lights" in my scene? 1 Answer

3D model not affected by darkness? 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