7
$\begingroup$

I'm lost, tried everything. I have this snake with scales done in geometry nodes. All works great until I try to animate it through curve modifier. The scales are not aligned to normals properly. I cant apply the geometry nodes modifier, because I need to lift up the scales through proximity node in the animation (there should be something like wave of lifting scales). Im using this "Face Tangent" node I found while googling solution. Does anyone know how to solve this please? :-)

snake in base position proximity the problem--scales not aligned to normals node setup modifier stack

$\endgroup$
6
  • $\begingroup$ so you want the scales to follow the 'along' the curve except when the cube is near, then you want the scales to rotate to the surface normal? $\endgroup$
    – Bert VdB
    Aug 24, 2022 at 17:48
  • $\begingroup$ I want the scales to naturally follow the snake's body as he moves along the curve. Then use the cube to lift them up. $\endgroup$
    – Marek
    Aug 24, 2022 at 18:06
  • $\begingroup$ Are you instancing the scales using the distribute on points node? $\endgroup$
    – Bert VdB
    Aug 24, 2022 at 18:27
  • 1
    $\begingroup$ I suspect the problem is in the group "Face Tangent", but without knowing what is behind it or the whole node tree, it might be hard to give an answer here. Also, it would be helpful if you could share your blend file so that we don't have to rebuild it all to answer your question. Thanks! $\endgroup$
    – quellenform
    Aug 24, 2022 at 18:28
  • $\begingroup$ I believe you can achieve your desired effect by swapping the order of the curve and geometry-nodes modifier. Your proximity will be hard to do then because it will be calculated before the curve deformation so you should probably split that into a separate nodetree after the curve modifier then. $\endgroup$
    – Bert VdB
    Aug 24, 2022 at 18:30

2 Answers 2

9
$\begingroup$

I think this might work for you:

enter image description here

You don't really need to recalculate tangents if this one already gives you the curve that you use to align the whole shape.

Just get this curve with Object Info, convert it to points and transfer the rotation.

With this rotation you can then align the normals and additionally turn them into a rotation with the value given by Geometry Proximity.

Note that the node Map Range also changes this rotation from $-90°$ to $0°$.

PS: By the way, rotations cannot be combined so easily with Vector Math. A rotation is something completely different from a direction vector, and can only be combined with another rotation.

$\endgroup$
2
  • $\begingroup$ Awesome, thank you very much!!! $\endgroup$
    – Marek
    Aug 24, 2022 at 20:34
  • $\begingroup$ @Marek You're welcome! Great snake by the way, I like it. $\endgroup$
    – quellenform
    Aug 24, 2022 at 20:47
8
$\begingroup$

Got a bit absorbed in this one... OTT... late as usual.. :)

Here's a GN group that, given a curve and a scale-object, will procedurally coat a profile of the curve with scales, exposing the following adjustments:

  • The counts of scales around and along the curve
  • The radial offset of each ring of scales with respect to the last
  • The scale of the scales (sorry) down each of their dimensions, chiefly for adjustment
  • (Having set the rotation of the scales to the curve tangent and mesh normal by default,) allows further adjustment around all axes. Again, chiefly for tweaks, but can be used for your effect.

The curve can have its radius varied, and the scales will change size accordingly.

It's mainly plumbing. The only thing to note is that, if you capture the attributes of a curve:

enter image description here

.. then they are automatically transferred to a mesh created from it, in a sensible way. The points on the mesh segment loops pick up the attributes from the points on the curve to which they correspond.

That allows the rotation of the scales to be set from the curve-tangent and the mesh-normal, when instanced on the mesh faces:

enter image description here

The further rotation-adjustment can be reached from outside the group, and controlled, say, by the proximity of another object:

enter image description here

So you can achieve this kind of effect:

enter image description here

(exaggerated for illustration)

(Blender 3.2b)

$\endgroup$
5
  • $\begingroup$ Robin!!! Insane amount of work u put into this little snake thingy, much appreciate! :-) $\endgroup$
    – Marek
    Aug 25, 2022 at 11:03
  • $\begingroup$ Hi @Marek ! I was kind of doing scales anyway... your question prompted me to work on it and try to improve the interface.. a variation of this does roof-tiles. $\endgroup$
    – Robin Betts
    Aug 25, 2022 at 11:06
  • 1
    $\begingroup$ very nice one!!! ...but unfortunately just moving your empty in your example blend file doesn't work in 3.4 but works in 3.3....ok...have to check maybe just a blender bug $\endgroup$
    – Chris
    Sep 16, 2022 at 7:53
  • $\begingroup$ Hi, @Chris! Thanks! Go ahead and share the faulty file if the problem persists.. or maybe it's the download, as presented in the answer? $\endgroup$
    – Robin Betts
    Sep 16, 2022 at 9:03
  • 1
    $\begingroup$ no, i even downloaded the newest 3.4 alpha - some error. I am pretty sure it is a bug $\endgroup$
    – Chris
    Sep 16, 2022 at 9:13

You must log in to answer this question.

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