hi, i have different grass clusters in varying sizes and they all use same material but i want to vary grasses with 3 different diffuse texture in render time randomly. there is a node for that? how can i do that?
Announcement
Collapse
No announcement yet.
Random diffuse texture
Collapse
X
-
In the samplerinfo node, you can add "additional outputs" that will enable you to plug the samplerinfo into the V-coord of a ramp with "Random By ID". The same way you do a facing ratio with a samplerinfo node if you know how to do that.
Then you can place your 3 textures (or more if you want) evenly spaced in the ramp. Then plug the ramp into your shader just as if it was a normal texture, and it will randomize between the textures inside the ramp. (You can also control how much a texture is going to be chosen by weighting the positions in the ramp differently).
Oh, and you should probably change the interpolation in the ramp to None. Else it will fade between the textures. This is something you might want however, if the textures are the same, and just have color variances. The fading effect will look like you have more color variants.
The setup looks like this if it helps:
Good luck!
SimonCG Artist - RnD and CG Supervision at Industriromantik
-
Originally posted by Algehov View PostIn the samplerinfo node, you can add "additional outputs" that will enable you to plug the samplerinfo into the V-coord of a ramp with "Random By ID". The same way you do a facing ratio with a samplerinfo node if you know how to do that.
Then you can place your 3 textures (or more if you want) evenly spaced in the ramp. Then plug the ramp into your shader just as if it was a normal texture, and it will randomize between the textures inside the ramp. (You can also control how much a texture is going to be chosen by weighting the positions in the ramp differently).
Oh, and you should probably change the interpolation in the ramp to None. Else it will fade between the textures. This is something you might want however, if the textures are the same, and just have color variances. The fading effect will look like you have more color variants.
The setup looks like this if it helps:
[ATTACH=CONFIG]31080[/ATTACH]
Good luck!
Simon
Comment
-
Originally posted by alperenozgur View Posthey thank you. sorry for very late reply. i plug the samplerinfo just to U coord right? one more question; what if i want to randomize the tree's leaves textures? since the "leaves is just one object but has many polygons.. is there a way to get random variation per polygon ?
If you plug it into the U coord you have to change the ramp to a U-ramp rather than the default V-ramp. Else plug it into the V coord. Or do as I did in the screenshot and plug it into both, and it wont matter.
You cant randomize by polygon, but you can randomize with RandombyShell (the same was as random by ID), which would do the same in your case. But if you had leaves modeled with multiple polygons, a random by polygon wouldnt make sense. But by shell that works nicely.
Good luck!CG Artist - RnD and CG Supervision at Industriromantik
Comment
-
Originally posted by Algehov View PostNo problem!
If you plug it into the U coord you have to change the ramp to a U-ramp rather than the default V-ramp. Else plug it into the V coord. Or do as I did in the screenshot and plug it into both, and it wont matter.
You cant randomize by polygon, but you can randomize with RandombyShell (the same was as random by ID), which would do the same in your case. But if you had leaves modeled with multiple polygons, a random by polygon wouldnt make sense. But by shell that works nicely.
Good luck!
Comment
Comment