2
$\begingroup$

Hello there,

I'm using blender to create an animation with 150 objects. These objects each have an individual material with a simple Emission node, in which it's base color (RGB) has been individually keyframed and animated to produce color patterns and effects between all 150 objects.

Check exemple here:

Color animation exemple

This was achieved by individually keyframing certain colors onto 1 object, then copying those keyframes and pasting them onto the other 150 objects in specific timings to create the final color pattern animation I desired.

As I'm still quite new to Blender, I was hoping to learn and understand if there is a more effective way of achieving these results. I've seen that perhaps I could set-up a Constraint or Modifier that would make the 150 objects change color based on colision with other objects.

As an example of what I'm trying to explain, I will attach these gifs below:

enter image description here

(Object colliding with spheres)

enter image description here

(Same prespective, but the object is hidden. Spheres change color during collision with said object)

enter image description here

(Final result: notice the colors changing)

Note: these gifs are just a representation of what I intend to achieve - the colors were changed manually.

Do you think this can be done with Blender (or any addons)? If so, I would appreciate any help!

Thanks for your time and support.

$\endgroup$
11
  • $\begingroup$ This is more than possible in Blender, with a choice of much simpler and more flexible processes than the one you illustrate. Can you give us some background? Are you fixed to working with imported geometry, (just doing the colouring in Blender)? Or could you envisage generating the geometry in Blender, too? $\endgroup$
    – Robin Betts
    Commented Jul 1, 2022 at 8:16
  • $\begingroup$ Hello Robin, appreciate your reply. I was hoping that would be the case, as manually animating the colors for 150 or more objects can be quite time-consuming. As of now, I'm generating the geometry, animating the objects' locations and then coloring them all in Blender. To give some background, this blender animation will be used for a drone light show - so each sphere object represents 1 drone. I have an addon that will generate and export a file containing the XYZ coordinates and RGB values for each individual sphere at every x milliseconds. $\endgroup$
    – Johnny R.
    Commented Jul 1, 2022 at 15:17
  • $\begingroup$ Great stuff. All in Blender makes it simpler still. Will post when I can.. you'll be attracting other answers, too, I would hope. They might cover it. $\endgroup$
    – Robin Betts
    Commented Jul 1, 2022 at 15:43
  • $\begingroup$ Thanks! I'll keep an eye out for replies. :) $\endgroup$
    – Johnny R.
    Commented Jul 1, 2022 at 16:11
  • 1
    $\begingroup$ Oh yes, that is exactly it. The colors would need to be stored on the objects so that the addon can correctly export their values. Sorry for any misunderstanding. $\endgroup$
    – Johnny R.
    Commented Jul 6, 2022 at 15:10

1 Answer 1

3
$\begingroup$

This question is tricky to answer briefly, because you have so many options open to you. All these examples are Geometry Node groups, working on animated mesh-objects comprising vertices without faces or edges. All the GN groups store colours on the mesh, in an Color Attribute layer, on vertices. Your exporter should be able to pick up the locations of the vertices, and the colours stored on them.

In order to be able to see the effects, a simple supplementary GN group is added at the bottom of the modifier stack, instancing an icosphere on each vertex, with an associated shader:

enter image description here

I imagine the exporter would work on the meshes with this GN group silenced.

Interactions with external meshes

Your example shows a test for inside/outside an external mesh, switching colours accordingly. This can be achieved by firing a ray from your vertices, and testing to see whether the hit face is backfacing to the ray:

enter image description here

This example allows you to set ray direction and length, inside & outside colors..

enter image description here

... or you could vary the color of your points according to their proximity to an external mesh:

enter image description here

effects analogous to this:

enter image description here

Or, for perspectival effects, you could treat your points as a projection-plane. Here an eye-point is set up behind the points, and rays are fired from there, through the points, at the target object. The color of the points reflects whether or not the target is hit:

enter image description here

.. for results like this:

enter image description here

Or, just work with textures

Sometimes, there may be no need for external objects, and you could just work with textures. They can be 3D, calculated from the positions of the points in the point-object's space, or 2D, projected through the point-object, or perhaps based on some UV-mapping of the points. The same techniques apply here as would in any shader-tree.

enter image description here

Here, an animated mix is made between 'Bands' and 'Spherical' Wave textures, through the points, while the points themselves are animated. The possibilities here are as wide as with any other procedural texturing.. (endless). Or, with suitable resolution in your points, you could compose your own image-textures or movies in any application to project through the points.

enter image description here

If you need any particular effect, it would probably be worth posting a question specific to it.

$\endgroup$
3
  • $\begingroup$ Amazing! Thanks for the well constructed and thorough reply, lots of interesting stuff to play with! I'll definitely work on this in the next few days and will post a reply here or on the forums if I run into any questions with these methods you presented. Again, I really appreciate the time you put into this. $\endgroup$
    – Johnny R.
    Commented Jul 8, 2022 at 18:49
  • $\begingroup$ @JohnnyR. Thanks! No problem. By all means comment here if something in this answer is unclear. If it's substantially a new question, create a new Q post for it. (I don't know how familiar you are with the workings of SE sites.. don't post commentary as new answers :) ) $\endgroup$
    – Robin Betts
    Commented Jul 8, 2022 at 19:34
  • $\begingroup$ Hello! I've recently posted another question regarding this topic and I thought maybe you could have some feedback. I'll link the question below: blender.stackexchange.com/questions/278189/… $\endgroup$
    – Johnny R.
    Commented Nov 2, 2022 at 13:47

You must log in to answer this question.

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