Hi,
I would like to get a set of random textures to my buildings. All my building will get an attribute, so I know what kind of material I need to assign to each building. I would like to assign my rule to multiply buildings, and choose a random material texture inside my texture folders. Let’s say I got an brick building, it should randomly choose from 5 different brick textures. If I use a random search inside my brick folder, it will assign random textures to my tiles inside 1 building. If my folder contains 2 textures 1 yellow brick and 1 red brick, one building will contain both textures. That is not what I would like of course. How do I create my rule, so it would take random textures for each building and not each tile?
Got it,
using the case Materiale == "Bric" : listRandom(fileSearch("assets/Textures/Brick/*.png"))
instead of fileRandom, will assign only one picture to the building.
Yeah, you have to be careful in general about how the rules are being called. That seems it will do the trick.
Thanks for your reply. It seems so 😉 I'm happy about it!
hey !
also, you can do this:
const myTex = fileRandom(..)
This will make sure that myTex is always the same texture, no matter where called in the code.
Ok ?
Matt
Tanks for the info.
At this point what I did, is doing the job perfectly. Also when I split my gable roofs vertically, the vertical texture are the same as the one given for my facades.