Geometry nodes instances on an armature popping in and out?

gn

Hey, I have a problem where instanced objects on an armature are popping in and out when I move the armature. The problem doesnt exist in the old particle system, but I need to use geometry nodes for this. Anyone got any ideas please?

Node setup: https://i.sstatic.net/2oCfFM6N.jpg
blend file: https://drive.google.com/file/d/1KkZRnCHR18B9flbSFph1zeSx5W6K50vf/view?usp=drive_link

The link to the node setup gives me an “access denied” error.
But I assume you are using a distribute on faces node to distribute your instances. If that is the case then it would be clear why they are popping. The surface is changing when getting deformed so it is expected that the distribution changes.

hmm odd, here’s a different file host: https://mega.nz/file/2YBwiARA#uekD-fZwjKv7x5MZY4nQ8r5woxDCf2LK86nc8ZluXto

yeah, i figured the problem is because geometry nodes “takes” the object’s surface after the armature modifier, so it’s different for every frame. but i cant figure out how to fix it then. i can’t place the geometry nodes modifier before armature, because then my distribution doesn’t snap to the armature pose. im completely out of ideas

Hi… this is an unfortunate limitation… when creating points (or using Points to Vertices), vertex groups become attributes… You need to split the GN into 2 parts, one that generates the points and one to do the instancing. (This should also be done on a separate geometry from the “base” mesh, with its own Armature modifier)
Move the “points” GN to before the Armature modifier, apply it, and then convert all the attributes to vertex groups.

image
image

This is a tedious process for large armatures so it may be worth making a script for it… (not to mention that it is destructive)

Now the instancing should work without the popping.

Sorry for unsatisfactory workaround. There really should be a way to retain vertex groups or to do away with them completely and make every modifier work with attributes instead :cry:

3 Likes

Points need to be distributed before armature modifier, after it their position can be set by sampling object’s UV.

Append node groups from this file
GN_with_armature.blend (1.4 MB)

6 Likes

wow, that seems fairly complicated, wouldnt have ever come up with this myself. thank you! I appreciate it!!

Hello Eelh,
I have a similar problem I tried to apply your GN setup. But doesn’t solve it.
I have a simple cactus character shaped like a cylinder, on which I applied a Geometry Nodes setup to generate spikes on each vertice. The spikes are aligned based on the surface normals of my character.

I’m using an armature generated with CloudRig to animate the character. However, when I rotate the root bone on the Z-axis in Pose Mode, all the spikes rotate around themselves as well.

Is there a way to “freeze” the spike generation so they perfectly follow the armature without flipping or spinning?
here is my test fil illustrating the problem ehttps://www.dropbox.com/s/h0izbqjd0sxooca/test02.blend?dl=0

Thanks in advance for your help!