# Snake scales align to normal in geometry nodes

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? :-)

• 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? Aug 24, 2022 at 17:48
• 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. Aug 24, 2022 at 18:06
• Are you instancing the scales using the distribute on points node? Aug 24, 2022 at 18:27
• 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! Aug 24, 2022 at 18:28
• 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. Aug 24, 2022 at 18:30

I think this might work for you:

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.

• Awesome, thank you very much!!! Aug 24, 2022 at 20:34
• @Marek You're welcome! Great snake by the way, I like it. Aug 24, 2022 at 20:47

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:

.. 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:

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

So you can achieve this kind of effect:

(exaggerated for illustration)

(Blender 3.2b)

• Robin!!! Insane amount of work u put into this little snake thingy, much appreciate! :-) Aug 25, 2022 at 11:03
• 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. Aug 25, 2022 at 11:06
• 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 Sep 16, 2022 at 7:53
• 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? Sep 16, 2022 at 9:03
• no, i even downloaded the newest 3.4 alpha - some error. I am pretty sure it is a bug Sep 16, 2022 at 9:13