0
$\begingroup$

Modelexample

I am modelling a hydroponic grow tube for a short animation, the client wants a large amount of plants on the model to demonstrate the capacity for an animation.

The model as the client approves it is 2,5gb (which is massive) I have made the plants with an array and curve modifier, then used Visual Geometry to Mesh to try and convert it into a simple mesh and lose the modifiers.

However with 30 plants to a ring and 19 rings it adds up to 570 plants and when I try to animate 6 of them to demo the concept, Blender just cant do it.

I'm sure I am missing something on how to do this efficiently.

$\endgroup$
1
  • $\begingroup$ Hello and welcome. Rather than take photos of your monitor post actual screenshots instead, see How to take a screenshot. Photos are harder to read because we have to look past external interferences (like reflections, smudges or Moiré patterns) and guess if we are looking at hardware issues such as a malfunctioning display or connections, a software level issue like driver malfunction or glitch, or actual artifacts or issues with the model itself. $\endgroup$ Mar 17, 2023 at 12:09

1 Answer 1

2
$\begingroup$

To do this more efficiently you first of all should definitely not apply all modifiers.

For example: I have made a high-poly Suzanne monkey. The mesh has 31,658 vertices. I placed 30 of them on a Bézier circle with an Array modifier, than made 19 of those rings upwards with with an Array modifier.

As you can see in the screenshot, the object has 18,045,060 vertices altogether which already makes the viewport maybe a bit slower - but since 569 of the 570 monkeys are just duplicates of the first one, saving this file results in a size of 4.88 MB, the same size as if it contained only 1 monkey.

object pile with modifiers

The reason is that for the 569 copies of the monkey Blender only needs to save their locations etc. per duplicate, but not for all their vertices. If I now apply all modifiers, the viewport gets a lot slower since now all meshes of all monkeys are independent from each other - so for each monkey Blender needs to save all vertex informations. Although the vertex count stays the same (18,045,060 vertices), saving the file now results in a size of 2.20 GB!

applied modifiers

So applying the modifiers is not a good idea as long as you do not definitely need independent meshes to work on them individually.

Another way to create instances would be to have a cylinder for example with the correct number of rings and instance the monkey on the vertices. To do that, the monkey needs to be parented to the cylinder, then go to the cylinder's Object Properties and enable Instancing > Vertices. To hide the cylinder you can uncheck Show Instancer > Viewport and/or Render. With this method the vertex count of the scene only contains the vertices of the cylinder and just 1 monkey - other than the duplicates of Array modifier are those instanced vertcies are not counted in (but rather ask the developers not me what exactly is the difference between arraying and instancing). The file size is only 4.93 MB in this case, just a little because of the cylinder geometry. Of course you could also use an array of mesh rings for instancing instead of a cylinder.

instancing on vertices

The method I would prefer (also with a vertex count just a little more than 1 monkey and a small file size of 4.91 MB) is doing it in Geometry Nodes. The advantage of this is especially the versatility. The above methods were capable of doing some adjustments (as long as you didn't apply all modifiers), but for the scale and orientation of the monkey for example there were not a lot options to change.

With the Geometry Nodes setup below you can decide anytime how many instances per ring you want, how many rings and how high the twoer should be. Also, instead of aligning a bunch of same-sized monkeys with the curve normal or global orientation, you can vary their sizes randomly and create random rotations. Especially useful when you want to use only one single plant model, varying sizes and rotations can create the illusion of more realistic plants.

instancing with geometry nodes

In the above setup the Realize Instances node is important for randomizing each monkey. Without realizing, all monkeys in a ring would be random, but they would be the "same random" on each ring. Here is the blend file as example on how to do it with Geometry Nodes.

//EDIT: As you mentioned in the comments, you need the plants all facing out instead of randomized orientations. When you delete the Random Value node you do not get the desired result because the monkeys are not aligned.

So, first of all I changed the Mesh Circle at the beginning of the nodetree to a Curve Circle (I used mesh because I only needed points for randomization, but a curve can be used to align the objects to the curve normal).

Then instead of plugging random values in the second Instance on Points node, I use a Normal input node and a Align Euler to Vector node for the rotation of the instances. The Normal goes into the Vector input of the Align Euler to Vector node, where I choose to align the Y axis to the normal (this can be different depending on your plant object). This alignment is then used for the rotation of the instanced monkeys.

new nodetree with aligned instances

I also updated the file, you now have a randomized and aligned version. Of course the aligned version can be randomized, too - for example by adding random values to the output of the Align Euler to Vector node with a Vector Math node, before plugging it into the Instance on Points.

New file:

$\endgroup$
5
  • 1
    $\begingroup$ This is amazing, thank you so much. I have struggled with Geometry Nodes and this is the first time I have ever felt like I vaguely understand it. One thing I can't figure out; as you have set it up, the randomness has the monkeys pointing in random directions, the plants I have need to all face out, when the random nodes are delinked, the plants all face the same axis. Im experimenting with different nodes (instance rotation for example) but It doesn't seem to work. $\endgroup$
    – Clem
    Mar 21, 2023 at 9:39
  • $\begingroup$ @Clem I've made an edit to my answer at the end and updated the file, now there are aligned instances. $\endgroup$ Mar 21, 2023 at 10:26
  • $\begingroup$ Amazing, thank you so much. $\endgroup$
    – Clem
    Mar 21, 2023 at 10:33
  • $\begingroup$ @Clem On this site, the best way to show you're appreciation is to accept an answer ;-) Read more about it here: What should I do when someone answers my question? $\endgroup$ Mar 21, 2023 at 10:52
  • $\begingroup$ Thank you! Will do it now. $\endgroup$
    – Clem
    Mar 23, 2023 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .