How to assign, for some points of grid one object from group 'sec'. And for other points, other objects from the same group?
2 Answers
Starting from version 2.1
, we have a Transform Mesh Node instead of the Replicate Mesh Node. First, we create a list with all possible meshes (One can use the Objects From Group Node to get all objects in a group and get the meshes from them.), then using the Random List node, we generate a list filled with the possible meshes, then meshes are transformed to the required location using the Transform Mesh Node. Which results in:
If it is not required that the output be a single mesh, one can instance a group of empty objects using the Object Instancer Node and then copy the meshes from a list filled with possible objects just as we did before. Which results in:
If you want to selectively add an object at some indices, then manual source object list creation is needed. For instance, if one wants to use the object Cube
for the vertices at indices 0,1,...,9 and 40, 41,...50 and use the object Icosphere
for the rest, then the object source list can be created as follows:
The Fill List Node can be used to fill a list with a certain number of objects, and the Combine Object List node can be used to combine multiple lists, so we can combine an object list filled with 10 Cube
then another filled with 40 Icosphere
and then another filled with 10 Cube
. Then we can use the Fill List Node to fill the rest of the elements with Icosphere
.
-
$\begingroup$ Thanks! But how to use some mesh instead of distribute Matrices? $\endgroup$ Mar 28, 2018 at 23:12
-
-
$\begingroup$ How to set the position area for the location of an item? $\endgroup$ Mar 28, 2018 at 23:40
-
$\begingroup$ @SergeyGolubev What do you mean by the "position area"? $\endgroup$ Mar 29, 2018 at 16:09
-
$\begingroup$ What if I want the objects to be distributed according to the specified parameters. For example, in specific vertex groups or based on the values of some texture. $\endgroup$ Mar 29, 2018 at 17:48
A List or a Switch can be considered
- Object List from Group with an Element Selected. You can programmatically determine which index of the list shall be used to select the particular mesh data.
- Mesh Data List. Consider a Loop Subroutine to Create the List.
- 2 items example
I assume we are using different versions of BAN Blender Animation Nodes.
Please inspect and improve to your needs