[Closed] mosaic map that scatters on all objects…help please
This thing is part of vrayScatter plugin ( http://rendering.ru/ ) it’s called vrayScatterTexture:
Here’s screenshot:
Basically when you assign material with this texture two many objects (instances or not , doesn’t matter) it scatters on all of them so each square color goes to each object.
Would it be complicated to write script that will do same exact thing?
ScatterObjects = #($Box01,$Box02,$Box03,$Box04)
ScatterXWidth = 4
ScatterYHeight = 4
seed 11
ScatterArray = (for i = 1 to ScatterYHeight collect (for i = 1 to ScatterXWidth collect (Random 1 ScatterObjects.Count)))
fn DoStuffWithTheScatterArray ScatterArray =
(
for i = 1 to ScatterArray.count do
(
for j = 1 to ScatterArray[i].count do
(
print ScatterObjects[ScatterArray[i][j]]
--STUFF--
)
)
)
DoStuffWithTheScatterArray ScatterArray
Thanks Gavin but I’m not sure how to make it work
I created scene with few boxes , assigned material , ran the script and nothing happened.
There’s something I should be aware of when using your script?
Oh you want the material to actually do something!
Haha.
No the script doesn’t do anything.
It just generates the “map” in a code format to do something.
Yeah… using a map for specific scattering is a lot more code or a PFlow solution.
Wouldn’t this just be a matter of creating the random bitmap shown above and then adjusting the UV’s (maybe on a channel other than 1) for each object so that they completely lie within one square?
http://forums.cgsociety.org/showthread.php?f=98&t=625833&page=3
Does this suite the requirements?