- Home /
Have an object lit from all sides with rainbow rings
http://9gag.com/gag/aYpP32w This is the best example of what I want to do, bu to any shape. No idea how to actually achieve that. I' sure I could somehow achieve that by using shaders or altering the texture somehow, but I think a good approach would be through light.
Answer by MrSoad · Dec 05, 2014 at 09:47 PM
The simplest way to do this on a 3D model would be to rotate the texture. This is a simple bit of scripting, the hard part is unwrapping and texturing your model in a way that works with the texture rotation.
http://docs.unity3d.com/ScriptReference/Material.SetTextureOffset.html
Seems as a good approach, but a rather difficult with the unwrapping an re-texturing. How could one even go about doing that?
You will need to have your whole texture striped in one direction in the rainbow colors. You will then need to unwrap your model and edit the uv map so that everything is aligned with the texture in the right direction, so that the stripe wraps all the way round each part of the mesh. Now when you scroll it the rainbow will move/travel along the model just how you want. This will take a bit of trial and error in your uv editing.
Your answer
Follow this Question
Related Questions
How do you return variables from other scripts? 2 Answers
Access specifc gameobject position in array 2 Answers
get variable type and name 1 Answer