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 Themperror · Nov 24, 2011 at 09:37 PM · terrainlightobjectspointthrough

(point)Light goes through objects

It's like this problem: http://answers.unity3d.com/questions/14070/light-goes-through-terrain-help.html

But I'll explain a bit more..

I have in the middle of my level an sphere. (I rotate this sphere (Deltatime)) This sphere has an point light added as a child with an very big range (so it actually simulates the sun).

My problem is.. when it's "night" (the sun is UNDER the level), everything gets lit from beneath.. so the light penetrates every object..

The answer in that topic said something about realtime shadows in the pro version, Where do I find this or use this (I got the pro version) as i'm making an minecraft clone (To test my coding skills) and every block gets lit from beneath or sides when the sun is setting or down... (even while in an closed chamber)

edit:

the lights have cast shadows enabled and i tried both hard and soft shadows also tried all 3 the rendering modes, forward, deferred and vertex, also every object has cast and receive shadows enabled...... nothing helped so far

Comment
Add comment · Show 4
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 brumdogpro · Nov 24, 2011 at 10:19 PM 0
Share

Why not just use a direction light and rotate it for the day/night cycle but when its down set it to turn the intensity down until it is off so it doesn't light stuff up from beneath?

avatar image Eric5h5 · Nov 25, 2011 at 02:08 AM 0
Share

Using a directional light simulates the sun much more accurately than a point light. And yes, light "penetrates" all objects (rather, other objects are ignored when doing lighting calculations); that's how realtime 3D works. Turn the light off when you don't want it to illu$$anonymous$$ate anything.

avatar image Themperror · Nov 25, 2011 at 10:03 AM 1
Share

but its just plain stupid when your inside an CLOSED house ($$anonymous$$inecraft) and then have 1 side of the wall fully lighted.. whether it be the floor,ceiling or wall... isn't there any work around for this? cause this sucks

avatar image Eric5h5 · Nov 25, 2011 at 08:12 PM 0
Share

That's how realtime 3D lighting works, "stupid" or not. Game dev is really just a bunch of smoke and mirrors, nothing works like it does in real life. If you have Pro you can use realtime shadows (but even they are added "on top" of the standard lighting), though that won't work in all cases. As I said, you can just turn the light off at night. It's a good idea to become familiar with how computers and 3D hardware work, so you know what the limitations are and how to work around them.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DevonJavaScript · Nov 24, 2011 at 10:24 PM

A solution is to not use point lights, or maybe just changing the lights intensity.

Example:

 var light: light;
 var x = false;
 function Update() { 
  if(x){
      light.intensity = 0;
    }else{
      light.intensity = 1;
    }
 }


A little something like that if I'm sure.

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 Themperror · Nov 25, 2011 at 10:14 AM 0
Share

it's not what i seek, as the light just (...)s up when it's "day" for example when you're in an house.. the floor is constantly lit from the directional light.. (also every other light) and when it's "night" the ceiling is lit..

i just need to stop light from penetrating objects...

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Terrain Details Point Filtering? 0 Answers

Terrain is transparent to objects 1 Answer

Does anyone know how to fix this? Yellow texture on imported objects. 1 Answer

Randomly Generated Terrain 2 Answers

Object2Terrain won't generate proper terrain 0 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