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 Silvia · Nov 28, 2010 at 12:00 PM · lightingspacesun

Modeling the sun - internal light

Dear all, I am currently working on a game about the solar system. The setting is the solar system itself, in which a spaceship can travel. I have modeled the sun as a Unity primitive sphere and I added a light inside it (so as to make it the main light source in the system). The other planets are correctly illuminated, but the outer face of the sun remains dark. How can I make the sun completely lit up (like you would imagine it to be: a ball of light)? Is there a better way of modeling the sun?

Thanks for your support.

Comment
Add comment
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

1 Reply

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

Answer by Peter G · Nov 28, 2010 at 01:08 PM

You probably want to use a self-illuminated shader. It uses the alpha value of your texture to determine how lit the object is. This is especially useful if you are using Pro, and you have objects that don't move, then you can bake the illumination into them without having to use a point light.

But, if you really want the entire object lit up all the way, the most efficient way would be to make a shader w/ lighting off that multiplies the texture to make it brighter. Here is an example. The Vertex-Colored iPhone shader.

Shader "iPhone/Vertex Colored" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB)", 2D) = "white" {} }

SubShader { ZWrite On Pass { ColorMaterial AmbientAndDiffuse Lighting Off SeparateSpecular On SetTexture [_MainTex] { Combine texture primary, texture primary } SetTexture [_MainTex] { constantColor [_Color] Combine previous constant DOUBLE, previous constant } } }

}

P.S. I think I removed some properties from the shader. I just copied this out of my current project, and I think I removed the emissive and specular and such. You can add them back in and it should work fine if you need them.

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 Silvia · Nov 28, 2010 at 02:47 PM 0
Share

Thanks for your suggestion. I think I will have a look at self-illu$$anonymous$$ated shaders, which seem to be effective enough.

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

No one has followed this question yet.

Related Questions

2D solarsystem lighting 0 Answers

Pointlight casting bright dot on textured walls 0 Answers

How to detect whether or not my player is in the sun? 0 Answers

Strange Shadow Boxes or X's Appear on the Terrain When I Add Lights 1 Answer

How to turn off sun effect of directional lighting (in augmented reality)? 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