0
$\begingroup$

i am working with Geometry Nodes and i want to export my instances with animation to alembic. My ultimate goal is to use it in Unity.

I found this tutorial (https://www.youtube.com/watch?v=_-CKa69OhZw), though after reimporting to check on the file, it does not show my meshes. the animation is stored, though my meshes are not on top of each point.

enter image description here

(left: Geometry Node. right: reimported Alembic)

I am quite lost and don't know why it is behaving as it is. Any help would be appreciated.

enter image description here

this is how the reimported Alembic looks like. Can't find any mesh information in there.

$\endgroup$

1 Answer 1

2
$\begingroup$

//EDIT: At the end I've put a solution if you need multiple separate objects instead of one mesh.

I don't know which version of Blender you are using, the link below the tutorial says it works for 2.92 or higher. But Geometry Nodes have changed a lot since 2.92 and maybe this is why you have problems.

For example, in the tutorial he says he cannot use the Remesh modifier on the GN object. In newer versions this is no problem, you just have to use a Realize Instances node as last node before the Group Output and the Remesh modifier works as expected.

And this might also be the reason why you have problems. When creating something similar I had the same result like you - the animation was there, but no meshes. The option Use Instancing on Alembic export dialogue didn't make any difference.

As soon as I plugged a Realize Instances node in the GN nodetree, the imported Alembic file worked as expected. The difference to the tutorial is that you get one object with an animated mesh instead of many animated objects. But if you're planning to use a Remesh modifier on it that should be no problem, on the contrary this makes it easier.

However, since I'm not familiar with using Alembic files in Unity, I have no idea if this helps with your problem.

If you need separate objects: The imported Alembic file which lacks the meshes does indeed have multiple separate mesh objects. So if you want to get the result from the tutorial, all you have to do is select all those animated objects, then Shift+LMB click to select another object which has the mesh you want. Then press Ctrl+L > Link Object Data.

Now you have created instances of the active object on the animated objects. The advantage of this method is, you can now change cubes into cones or whatever you like which is not possible if you realized the GN instances before and then re-imported an Alembic file with animated mesh.

Step by Step:

  • First you import your alembic file. It has objects indicated by their origin points but they seem to lack their meshes.

alembic file

  • Let's say you want the objects to be cubes. Press Shift+A > Add > Mesh > Cube.

add cube

  • I moved the cube to the side so it's not inbetween the alembic objects, but that's just me. Now after adding, usually the cube should be selected by default and the alembic objects are deselected.

cube aside

  • Now you have to select all alembic objects while keeping the cube selected and active. This depends on your scene, what other objects there might be etc. In my case I could simply hit A to select all, the cube is the active object because it was already selected. Another way would be to hit B to Box Select the other objects. No matter how you do it, in the end all alembic objects and the cube have to be selected, with the cube being the active object (brighter highlighted outline than the other objects).

active cube

  • Next you have to transfer the object data from the cube onto the other objects. To do that, press Ctrl+L > Link Object Data. Every alembic object should turn into a cube now.

link data

  • The cubes are much too big. But you can scale them down with the original.

linked cubes

  • To do that, select the original cube and you can scale it down with S, either in Object Mode or Edit Mode. The disadvantage of scaling it in Object Mode is you will only see the effect after apllying the scale with Ctrl+A. So I suggest you do it in Edit Mode. Press Tab to switch modes, then select the complete mesh with A, then scale it down with S. This way you can immediately see the effect on the alembic objects. You will see that after pressing Tab all objects switch to Edit Mode. Since all their data is linked, it doesn't actually matter which one you select to scale it.

scaling

  • The good thing about the linked data is, you can always change the mesh in Edit Mode and all other objects will get the new shape, too. For example, here I merged the top vertices of the cube to make it a pyramid.

mesh edit

That's it, after you finished editing the mesh you can go back to Object Mode with Tab. You don't have to keep the original cube, you can delete it. If you want to edit the mesh you can always edit one of the other cubes as long as they are linked. If you don't want them to be linked anymore to make individual changes on some of them you can go to the menu and choose Object > Relations > Make Single User > Object & Data.

$\endgroup$
5
  • $\begingroup$ I am relatively new to Blender and Geometry Nodes. The Realize Instances helped with exporting the Meshes. I am not trying to follow that tutorial exactly. Just used it as a guideline for exporting. Yes, it would be way more helpful, if all objects are separate, though for some reason linking a object to the animated objects, or even a newly created empty does not work. I am using Blender 3. $\endgroup$
    – Coccolino
    Feb 10, 2022 at 13:38
  • $\begingroup$ Linking object data should work... Are you doing it as described? What do you mean "newly created empty"? You can't transfer mesh data from an empty to mesh objects, since an empty has no mesh. Do the following: add a cube to the scene with the alembic animation. Next step is you first select all the animated objects. Then select the new cube with Shift and left-click, this should keep the other objects selected and make the cube the active object (the outline is highlighted compared to the others). Then press Ctrl+L and choose Link Object Data. Now the animated objects should become cubes. $\endgroup$ Feb 10, 2022 at 14:19
  • $\begingroup$ @Coccolino I've edited my answer to give a detailed explanation on how to transfer the data from one object to the others. I hope it helps. $\endgroup$ Feb 10, 2022 at 15:27
  • $\begingroup$ thank you so much for your very detailed description and helping me with this problem. Is it the case, that it is not possible to link any geometry to a "Empty" (Shift+A > Add > Empty > Plain Axes)? It was driving me mad. I exported the alembic again, so it wasn't an "Empty" object $\endgroup$
    – Coccolino
    Feb 10, 2022 at 17:08
  • $\begingroup$ @Coccolino No, an Empty is like the name says, empty. It doesn't hold any mesh data. And it is an object type, it's not like it's a mesh object that simply has no vertices. A cube for example is a mesh object. When you go into Edit Mode and delete all vertices it is empty as well, but still a mesh object. You can add a new mesh with Shift+A in Edit Mode to make it a cube again... or a sphere if you want to. And those empty meshes are the alembic objects - that's why you can give them a new mesh again. $\endgroup$ Feb 10, 2022 at 18:15

You must log in to answer this question.

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