PDA

View Full Version : mosaic map that scatters on all objects...help please


lukx
09-24-2008, 08:07 AM
This thing is part of vrayScatter plugin (http://rendering.ru/) it's called vrayScatterTexture:
Here's screenshot: http://img144.imageshack.us/img144/6692/scatdd9.jpg

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?

thatoneguy
09-24-2008, 06:48 PM
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

lukx
09-24-2008, 08:34 PM
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?

thatoneguy
09-25-2008, 03:31 AM
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.

sjmoir
09-26-2008, 09:58 AM
I've made a pdf of how I use photoshop and pflow to scatter objects. It appears on this thread (http://forums.cgsociety.org/showthread.php?t=630936) along with a fantastic script by Bobo which allows you to easily replace each particle with an object (vray mesh etc). The Vrayscatter plugin is cool... but not free.

JHaywood
09-26-2008, 06:37 PM
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?

DaveWortley
09-27-2008, 08:45 PM
http://forums.cgsociety.org/showthread.php?f=98&t=625833&page=3

Does this suite the requirements?

CGTalk Moderation
09-27-2008, 08:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.