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 davidflynn2 · Oct 12, 2012 at 03:37 PM · c#shadersun

Realistic Sun

I am making a space game and I trying find the best way to make my sun look absolutly realistic. I am following this guide to make a very awsome texture for my sun. http://psd.tutsplus.com/tutorials/painting/red-giant-star-photoshop/. Any one have a recomdendations i can do in unity to help with the realisticness of it?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Griffo · Oct 12, 2012 at 03:59 PM

http://activeden.net/item/sun-prefab/full_screen_preview/628536

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 davidflynn2 · Oct 12, 2012 at 04:05 PM 0
Share

Looks awsome. Unfortuantly currently I cant afford to pay for anything I verly have enough gass money to go to college atm.

avatar image Griffo · Oct 12, 2012 at 04:08 PM 1
Share

O$$anonymous$$, you could make you own by texture mapping a ball with a photo from here http://umbra.nascom.nasa.gov/images/ in blender thats free ..

avatar image davidflynn2 · Oct 12, 2012 at 04:09 PM 0
Share

That will work thanks so much.

avatar image Griffo · Oct 12, 2012 at 04:10 PM 0
Share

If you used a few images you could animate the texture to make the sun spots look like they are moving and slowly rotate the ball, that would look good.

avatar image davidflynn2 · Oct 12, 2012 at 04:12 PM 0
Share

Ok thanks I will have to google how to animate a texture never done that yet lol. Only characters at this point. Thanks for all your help.

avatar image
1

Answer by Griffo · Oct 12, 2012 at 04:14 PM

Make a 1024 x 1024 slightly different texture made up of 9 images 3 x 3 .. or more if you want, then use this script to animate them ..

 #pragma strict
 
 var uvAnimationTileX = 3; //Here you can place the number of columns of your sheet. 
  
 var uvAnimationTileY = 3; //Here you can place the number of rows of your sheet. 
 
 var framesPerSecond = 10.0;
  
 function Update () {
  
     // Calculate index
     var index : int = Time.time * framesPerSecond;
     // repeat when exhausting all frames
     index = index % (uvAnimationTileX * uvAnimationTileY);
  
     // Size of every tile
     var size = Vector2 (1.0 / uvAnimationTileX, 1.0 / uvAnimationTileY);
  
     // split into horizontal and vertical index
     var uIndex = index % uvAnimationTileX;
     var vIndex = index / uvAnimationTileX;
  
     // build offset
     // v coordinate is the bottom of the image in opengl so we need to invert.
     var offset = Vector2 (uIndex * size.x, 1.0 - size.y - vIndex * size.y);
  
     renderer.material.SetTextureOffset ("_MainTex", offset);
     renderer.material.SetTextureScale ("_MainTex", size);
 }
Comment
Add comment · Show 2 · 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 davidflynn2 · Oct 12, 2012 at 04:21 PM 0
Share

Ok thanks so much

avatar image Griffo · Oct 12, 2012 at 04:23 PM 0
Share

No problem, by the way that sun texture is only $5 http://activeden.net/item/sun-prefab/628536 but I agree about money being tight, and I enjoy doing a lot of it myself if I can.

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

10 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

Related Questions

Procedural Generation 1 Answer

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

How do I paint the part of a model that is embedded in another model?, 0 Answers

How to render a RenderTexture into a specific mipLevel 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