Hi, I´m making a fireplace for my scene and I want it to look as good as posible! I´m using a Bumped Specular material for the coal or burnt wood in the bottom and to make it feel more realistic I would like to make the shininess that Specular offers to change randomly like the glow of the burning coal/wood do irl! I’ve used a script that does this for a regular point light but is there a script that can do that for a material?
Check these: SetFloat, SetColor
It´s the set float thing I´m looking for! Now, how do I use it? If I want it to randomly change between 2 values like this light script:
@script RequireComponent(Light)
var minIntensity = 2.0f;
var maxIntensity = 7.0f;
private var random : float;
random = Random.Range(0.0f, 65535.0f);
function Update()
{
var noise = Mathf.PerlinNoise(random, Time.time);
light.intensity = Mathf.Lerp(minIntensity, maxIntensity, noise);
}