6
$\begingroup$

I'm storyboarding a project at the moment and I want to do something similar to this image. You can see it on Behance in higher resolution as well:

enter image description here

I want to model some "data cubes" in different shapes, let's say cube, rectangle and pyramid to represent different data. I want them to move on a path to "datacenter" for an explainer I'm working on.

I know you can do this with particle system and force field. But I want to have more control over it. For example set distance between cubes and control overall speed. I don't want to manually animate lots of objects on paths by hand :(

I'm coming from After Effects background, so not sure if there is some way to have "dashes" on paths and replace dashes with objects, then offset them all?

What would be the best approach in this situation?

$\endgroup$
8
  • $\begingroup$ I wanted to propose a subdivided edge with a particle system, and the edge follow a curve, why don't you want a particle system? What kind of control would you want that you wouldn't have with particles? You would like to be able to control each object individually? Also, how would you have used Force Field? $\endgroup$
    – moonboots
    Jun 10, 2021 at 12:01
  • 2
    $\begingroup$ This sounds like a job for GeometryNodes! I'll try to cook up an answer later today. $\endgroup$ Jun 10, 2021 at 14:27
  • $\begingroup$ @moonboots - I would like to make all the objects evenly spaced and control the flow of them - speed up, slow down. In the past, I was playing around with Particles, Splines, and Force Fields to make particles follow a path and use it as some sort of "magnet path" - particles wrapping around path and moving along side it. This works well for more abstract pieces, but I want to make it more "geometrical" like in the attached image - even spacing between cubes etc. $\endgroup$
    – kurnikoff
    Jun 10, 2021 at 14:33
  • $\begingroup$ @FilipFranik that would be amazing - I was thinking about using Animation Nodes and I just got them working in Blender 2.93 - I upgraded this week and now few add ons needed update. If this can be done with Geometry Nodes, then it would be perfect. $\endgroup$
    – kurnikoff
    Jun 10, 2021 at 14:36
  • $\begingroup$ With particles, it would give something like that: zupimages.net/up/21/23/pmr9.gif $\endgroup$
    – moonboots
    Jun 10, 2021 at 14:39

4 Answers 4

6
$\begingroup$

Here is a solution with particles nevertheless, I guess someone will explain with Geometry or Animation nodes:

enter image description here

  • Create your object (1), you can create several objects, it looks like you have one object by line.
  • Create the path (2), it's a curve, I've set the Handle Type to Vector with V to make the angles orthogonal.
  • Create an edge that you subdivide (3), here something like 20 vertices.
  • Give it a Curve modifier with the curve as Curve Object. Find the good Deform Axis so that when you move it in a direction it follows the curve.
  • Also, give it a Particle/Hair system. Enable the Advanced option, choose the amount of hair in Emission > Number, Source > Emit From > Vertices, enable the Rotation option, Orientation Axis > Global Z, under Render choose Render As > Object and under Object > Render Instance Object choose your object 1 (here, my cube). Choose the Scale under Render.

Now when you move the edge it should follow the curve and the particles should follow as well:

enter image description here

$\endgroup$
5
$\begingroup$

Unit object,

Proof of concept combining the methods outlined in my answers given to

How to make objects follow a ellipse? (Duplication around ellipse)

and

Continuous Looping animation - Differing rotational speeds

Make a single unit, copy & offset each to fill the path.

Using an object that is one unit of your data. Create enough copies to fit the curve. Can quickly work out how many copies fit by using array modifier and setting fit curve, calculate by dimension divided by unit dimension, or add a curve modifier and adjust count. The modifiers are no longer required and can be removed.

Here's one I prepared earlier. Basically we are copying the unit and sliding its offset further along the curve by adding offset to driver expression

enter image description here

with the unit object "set up" (ie has the constraint and driver_) run the following script from the text editor

from bpy import context
from random import random

frames = 45
copies = 112
prob = 0.7

unit = context.object
driver = unit.animation_data.drivers[0].driver
unit.select_set(True)
expr = f"((frame - 1) / {frames}) % 1"
driver.expression = expr

for i in range(1, copies): # copies - 1
    if random() > prob:
        continue
    tower = context.object.copy()
    # comment following to have linked copies (same mesh)
    #tower.data = tower.data.copy() # an unlinked dupe (own mesh)
    driver = tower.animation_data.drivers[0].driver
    driver.expression = f"({i / copies} + ({expr})) % 1"
    #tower.constraints[0].offset_factor = i / copies
    context.collection.objects.link(tower)

# only copies selected after run script    
unit.select_set(False)

Set up so after running only copies selected, so if unhappy, hit X and remove the copies change settings & run again.

frames : How many frames it takes to traverse the path

copies : How many copies required

prob : The probability of copy being data 1.

Improvements,

Could do a number of things.

Instead of not copying when blank data, copy them all and drive the render visibility. Would enable us to randomize data on next circuit for example

Make each chunk an array and drive each chunks array count.

Use some binary input data, 00110101111000100 instead of random choice

Make a better gif to illustrate.

Read the question better. If need be can edit for multiple objects. As it is each object shares one mesh. Could swap out to other meshes (esp. if dimensions match)

$\endgroup$
3
$\begingroup$

Because Geometry Nodes feature is still under development I used an early version of Blender 3.0 because older versions had bugs and were missing features

Let's start from two objects in the scene.

  • First one is just a cube to act as our point instance.
  • Second one is an object containing mesh of a single edge (and 2 vertices)

I made the "edge" by deleting two vertices of a plane.

Cube and Edge

Now we add geometry nodes to the "edge" and configure them this way:

Geometry Nodes

Play with subdivision level, color ramp and seed to achieve awesome results.

Now the edge has additional geometry:

Generated Cubes

To test the movement I added a BezierCircle and converted one of it's vertices to vector by clicking it in edit mode and then pressing V and then selecting vector.

Bezier Circle

Now it's enough to go back to the "edge" and add a Curve modifier with correct axis.

Curve Modifier

And control the movement by moving the edge on the Y axis.

Movement

In this workflow almost everything is procedural and can be freely adjusted at any moment.

EDIT:

If you don't want the cubes to bend with the curve a slight adjustment to the nodes (removing the subdivision node) is necessary.

Nodes

We will do the subdivisions first using a modifier, then we bend the "edge" along the curve and in the end spawn instances.

Cubes stopped warping

$\endgroup$
2
  • $\begingroup$ I tried your method and it works to some extent. I can replicate the object along the "path" - plane extruded and then all the unnecessary verts removed, to leave 1 path. Is there a way to offset position of the instances using your method? I tried various nodes and combinations to get the offset, but I can offset all the instances randomly - they move in X/Y/Z, instead of along the path. $\endgroup$
    – kurnikoff
    Jun 18, 2021 at 17:28
  • $\begingroup$ I tried different method - creating Curve, then Cube. Adding Array + Curve mod to Cube and Follow Path constrain pointing at the Curve. It works fine, but after certain point Cube Origin goes wild and whole thing moves all over the place. See this link for screenshots: imgur.com/a/Y0rXqiX This works as I want it to work, but no idea why Cube Object Origin gets crazy past certain point. I can "combat" or "fix it" by making 100 copies in Array Mod and offsetting whole thing until it gets wild - but that is not efficient render wise :/ $\endgroup$
    – kurnikoff
    Jun 18, 2021 at 17:36
2
$\begingroup$

First of all, I want to thank all of you for contributing to answering this problem. I tried all the answers and played with them to see if I can get enough control and flexibility.

@moonboots answer gave me some ideas how to combine it with @Filip Franik answer. After some experimentation, I managed to get whole thing to work, using Animation Nodes.

This older post I found, helped me with overall set up as well.

Here is Animation Node tree

And result.

And here is the result.

$\endgroup$

You must log in to answer this question.

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