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?
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);
}