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
1
Question by TangoNation · Nov 20, 2016 at 03:13 AM · lightingshadersmethod

Best way to create lights on the dark side of an object but not visible in light?

What would the best way about going about this. I have looked everywhere and I can't think of where to start. Should I write a shader? lots of small lights on the planet? I tried a very crude method before where I had 2 models, one was slightly off center and had dark side textures but it created very jagged lines where they met and it was a very sudden change.

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 tanoshimi · Nov 20, 2016 at 04:49 PM 0
Share

If you haven't got any response, perhaps you should think about whether your question could be phrased better or contain more information. What sort of lights... Point lights? Are you simply deter$$anonymous$$ing which is the dark side of your object based on a texture, or is it itself already lit by another light? What sort of light... directional? So you have a partially lit object, and you want to deter$$anonymous$$e areas of that object that are not lit and to create point lights arbitrarily in those areas, right? Or do you want all lights to be there, but simply to turn "off" when they are shone on by another, brighter light? If so, you can raycast from one light to another and see whether there are any colliders in the way or whether the distance has meant all the light has been attenuated.

Basically, it's a bit hard to follow exactly what you're asking. A picture might help.

avatar image TangoNation tanoshimi · Nov 20, 2016 at 05:11 PM 0
Share

Yea fair enough reading it now its as vague as it can be. I am trying to create planet lights, so on the dark side lights will be visible but on the light side they wont. I was thinking substitute an image on the opposite side but I don't even know if that's possible. I cant upload a picture for some reason as the site says it has to be smaller than 500$$anonymous$$B which is ridiculously small. Basically I want to know how to get the dark side of a planet to have a texture with lights on it.

avatar image tanoshimi TangoNation · Nov 20, 2016 at 07:13 PM 0
Share

So hang on, do.you actually want lights - i.e. emissive components that illu$$anonymous$$ate other gameobjects, cast shadows etc? Or do you just mean a texturealt text

planet-earth-at-night-wallpaper-1366x768.jpg (344.2 kB)
Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by TangoNation · Nov 20, 2016 at 04:42 PM

Haven't got a response for any of my questions on so long....

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
avatar image
0

Answer by jorrit5477 · Nov 20, 2016 at 08:17 PM

Have a look at http://wiki.unity3d.com/index.php?title=Earth/Planet

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 TangoNation · Nov 20, 2016 at 08:34 PM 0
Share

Step in the right direction thanks but the dark side isnt dark and doesn't support specular maps unfortunately.

avatar image
0

Answer by tanoshimi · Nov 20, 2016 at 07:59 PM

With the additional information supplied, it sounds like you're looking for this shader from the wiki.

Comment
Add comment · Show 7 · 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 TangoNation · Nov 20, 2016 at 08:24 PM 0
Share

Thanks this is good but the dark side of the planet isn't dark, more of a blue light ish blue and it doesn't support specular maps. For some reason the light s are staying on in the day too :/

avatar image tanoshimi TangoNation · Nov 20, 2016 at 09:17 PM 0
Share

Try removing this line...

 o.Specular = 0.0;
avatar image TangoNation tanoshimi · Nov 20, 2016 at 09:31 PM 0
Share

To accomplish what?

Show more comments
Show more comments

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

71 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

Related Questions

Odd Portional Screen Flickering 0 Answers

Shadow sprite rotation regardless of the light source 0 Answers

Finding object scale within a shader 1 Answer

Light Falloff Post Process Effect? 0 Answers

Unity Advanced Shader Help 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