How to Copy an Object depending on Image colors?

How to Copy an Object depending on Image colors?

Waseem_Dabbas
Advocate Advocate
1,593 Views
10 Replies
Message 1 of 11

How to Copy an Object depending on Image colors?

Waseem_Dabbas
Advocate
Advocate

I’m working on a project in 3ds Max, and I have an image with white areas and black dots. I want to copy an object onto the black areas of the image only. What is the best way to achieve this?

 

Waseem_Dabbas_0-1739298889315.png

 

0 Likes
Accepted solutions (1)
1,594 Views
10 Replies
Replies (10)
Message 2 of 11

RobH2
Advisor
Advisor

If the topology is such that there is a corresponding polygon at each black rectangle, you could select all of those black polygons and detach them as clones. Then, set the pivot of them to their centers. After that, you can snap your object to each and then delete the clones. It's a little tedious, but you don't have that many, only about 80 or so. It should only take about 5 minutes. 

 

If the topology does not correspond to the black rectangles at all, there isn't a way for Max to identify a pixel and then set an axis at it. You need something tangible that stores a coordinate to snap your object to. Pixels in a texture map don't have 3d coordinates. So it isn't possible to do it the way you want to as the question was asked. 

 

This is a fascinating question and challenge. Maybe someone else knows of a way to use the pixel value data, but I don't know of one personally. 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2025-2027), V-Ray 7, Ryzen 9 9950X3D Processor, DDR5 128MB, Gigabyte Aorus X870E Master motherboard, Sabrent Rocket NVMe Gen5 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 3 of 11

Waseem_Dabbas
Advocate
Advocate

Perhaps you know that the scatter tool for Corona, for example, can distribute elements based on an attached image. Therefore, I believe there must be a specific method that Max can understand to distribute an element based on the color data of an image. I also found this feature in the Itoo ForestPack plugin.

Through my question, I was trying to find the root command or method that could lead me to this solution. I think it would be a great solution and could save a lot of time for many tasks.

0 Likes
Message 4 of 11

RobH2
Advisor
Advisor

Yes, I know that the scatter tool in Forest Pack can provide some of that functionality. I just don't think it's built into Max natively. So, maybe just use Forest Pack to do it? Maybe Arnold can do it but I don't use Arnold. If it can maybe another user will see this post and tell us how. 

 

 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2025-2027), V-Ray 7, Ryzen 9 9950X3D Processor, DDR5 128MB, Gigabyte Aorus X870E Master motherboard, Sabrent Rocket NVMe Gen5 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 5 of 11

Diffus3d
Advisor
Advisor

What you are describing is called a distribution map, FWIW.  Might help you find a solution.

 

Best Regards,

0 Likes
Message 6 of 11

MartinBeh
Advisor
Advisor

Particle Flow might be able to help you with this.

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
Message 7 of 11

Diffus3d
Advisor
Advisor

That's a good point.  

0 Likes
Message 8 of 11

Noren2
Advocate
Advocate

Pflow should be the most elegant native solution (perhaps tricky to get exactly one object per dot, especially if they aren't regular), but a more simplistic, non-interactive solution might be to use Volume Select to select faces on a high resolution plane by map/bitmap, delete the rest and then use Explode in Editable Mesh to detach all continuous elements to separate objects that then can be used e.g. with Clone and Align (center pivots first if necessary).

0 Likes
Message 9 of 11

Diffus3d
Advisor
Advisor

You could use the "Keep Apart" node perhaps, or the lower tech "Separation" on the Position Object node.

 

Best Regards,

0 Likes
Message 10 of 11

MartinBeh
Advisor
Advisor

Another idea: convert your texture map colors into vertex colors, then use those to 'delete' a certain part of the mesh and then use the remaining faces as source for distributing your objects (Array modifier might help?).

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes
Message 11 of 11

MartinBeh
Advisor
Advisor
Accepted solution

FWIW, just happened to come across this: https://forums.autodesk.com/t5/arnold-for-3ds-max-forum/max-2021-particle-view-density-material/td-p...

Maybe a starting point?

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.