Random color - how to?

Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)
Post Reply
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Guys,

I am new to blender (coming here from Sketchup and Modo). Could you please help me of how to get random color over instances? There are many great scripts we created on the forum for random textures (with LUA too)...
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
J.C
Licensed Customer
Posts: 1849
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

Hi smicha,

you can use Random color tex as an input for gradient texture to achieve this.
random color.png
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Thanks for that. Question is how did you create these boxes in blender? Array modifier does not work for it.
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
J.C
Licensed Customer
Posts: 1849
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

The boxes are created using particle system in hair mode.
https://evermotion.org/tutorials/show/1 ... f-the-week
https://vimeo.com/157562070

Or using scatter addoon:
https://www.youtube.com/watch?v=yAOuZBzEF8E
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
pegot
Licensed Customer
Posts: 934
Joined: Mon Nov 07, 2011 3:44 am

It will also work with the emitter particle system. To position objects where you want you can set it to vertex and use a vertex group. I suspect it fails to work with the Array modifier due to some internal difference in the way instancing is created between the two systems?
Win 10
3.7Ghz i9 10900k / 64GB
ASUS STRIX Z490-E
PSU: PowerSpec 850Wd
RTX 3090 Asus Tuff

Network rendering:
Win 10
4.2Ghz i7 7700k / 64GB
AsRock SuperCarrier
PSU: EVGA 1200w
RTX 3080 Ti EVGA Hybrid
RTX 3080 ASUS Tuff
GTX 1080ti SC Black (wc)
pegot
Licensed Customer
Posts: 934
Joined: Mon Nov 07, 2011 3:44 am

FYI - If you do want to stick with an Array approach and maybe get a little more control over your duplicated objects, you can use the addon Random Object Array. It is a paid addon but I just tested it with Octane's Random Color Texture node and it does appear to work.

https://blendermarket.com/products/random-object-array
Win 10
3.7Ghz i9 10900k / 64GB
ASUS STRIX Z490-E
PSU: PowerSpec 850Wd
RTX 3090 Asus Tuff

Network rendering:
Win 10
4.2Ghz i7 7700k / 64GB
AsRock SuperCarrier
PSU: EVGA 1200w
RTX 3080 Ti EVGA Hybrid
RTX 3080 ASUS Tuff
GTX 1080ti SC Black (wc)
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Guys thank you for that. I did some manual work on instanced box and.. it works. After moving from Sketchup and Modo I really like blender. Hope will stick it for good. Thank you again.
Attachments
OctaneBlender1.JPG
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
Post Reply

Return to “Blender”