1
$\begingroup$

My objective is to have a grid of cubes that randomly turn into spheres or pyramids. At the end I will add a proximity node that changes the shape based on the proximity to an empty.

Desired result Desired result

I'm using this setup in geo nodes,

Geo nodes first setup First attempt at geo nodes

First result First result

I was able to turn a cube into a sphere and a triangle, but I'm not able to do it on each instance differently, because the set position node is before the instances on point. I tried to move it after the instances on points, but after realizing the instances the only result is that all the instances tried to become a pyramid.

Geo nodes second setup Second attempt at geo nodes

Second result Second result

Is there a way to make each instance have a different and random set position?

$\endgroup$
3
  • $\begingroup$ Just have a collection with the shapes you want and use the collection instead of trying to manipulate the instances $\endgroup$ Commented Jun 28 at 14:23
  • $\begingroup$ I can't use a collection because I need the shapes to morph dynamically when I will add the empty to change the shape based on proximity $\endgroup$ Commented Jun 28 at 16:14
  • $\begingroup$ That's just changing the index of the instance in the node. Unless you need "transition" instead of just changing $\endgroup$ Commented Jun 28 at 18:51

1 Answer 1

0
$\begingroup$

enter image description here

Here's a clear step-by-step guide for creating a morph effect from cube to pyramid using Blender Geometry Nodes. You'll need to store transformation data beforehand so you can apply it individually to each cube instance:

1 - Save the Delta (Transformation Data)

enter image description here

Capture and store the variation that each vertex of your cube needs to undergo to transform into a pyramid as an attribute.

Add a Vector Math node set to Subtract, Subtract the output of your "pyramid transformation math" from the original cube position Store this difference using Store Named Attribute called "Delta" [Set it to Points domain and Vector mode]

This delta represents the "movement vector" each vertex needs to follow during the transformation.

Set Position Node no more neceserrally here!!


2 - For Control the Transformation

enter image description here

You'll need to store another attribute with the distance from your Empty object to each instance to control the transformation.

Create a setup using Geometry Proximity based on your Empty object Store this in Store Named Attribute as "Dist" [Set it to Float type and Instances domain]

Important: Create this now, before converting instances to individual meshes. This approach gives you the effect you're looking for, though you could do it later for a slightly different deformation pattern.

3 - Convert Instances

enter image description here

This crucial step individualizes each instance so the transformation can happen independently.Use a Realize Instances node to convert all instances into separate mesh objects


4 - Morph Objects

enter image description here

Apply the actual transformation to your geometry. Use a Set Position node connect your previously created "Delta" attribute to the Offset input

This will move each vertex according to the stored transformation data

Control the radius of influence of your Empty object using various mapping nodes. Use nodes like Float Curve, ColorRamp, or Map Range (Map Range works well for simple cases)

Connect your "Dist" attribute to the Value input Adjust the From Min and From Max values to define the influence area, and scale your Delta for Map Range output.


The result is a wave-like morph effect that propagates outward from your Empty object, smoothly transforming cubes into pyramids based on proximity.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.