Within Geometry Nodes:
How to export a given or multiple attributes to ACTUAL objects/Empties in blender so that these can be exported out to AFX?
This can include for example a given point, instance, geometry position & rotation, regardless if the geometry itself existed or did not exist prior to the GN network.
Basically, anything that can be show within a GN VIEWER - to be able to COPY AS NEW DRIVER outside of the network.
Exporting to after effects is not the problem, exporting the GN data into a Blender-Scene “real” object (Empty for example) is the issue.
If an Empty object exists within the SCENE, it can easily be exported out to AFX.
Those “Objects” exist only within the independent ecosystem of a given GN network, but are not then in existence, AS OBJECTS/EMPTIES/CURVES of the Blender Scene itself.
In other words, Lets say I have generated a simple Cube primitive within a GN network:
It will have 8 points,
Only within the GN network VIEWER I can see these coordinates, but what I need is to have a Scene (not a GN objects) Empty track itself to point index No. 2 for example - this is the issue I am trying to solve.
Note that the GN network can have this point moving along the time, I will need that outside Empty tracking it always.
I don’t think this is possible at the moment in the way you are trying to do it.
How do you export to AFX? I am asking because in Geonodes you can have varying amounts of vertices per frame and this is not possible with formats like fbx. You would need some sort of mesh cache format like alembic.
I assume you already tried Alembic and it didn’t work?
Otherwise you would have to write a python script wich evaluates the depsgraph of the GN object in question, grabs the attributes and writes them into some file. Then you would have to write a script which can import it into AFX. This can be done but might require quite a lot of work depending on how many attributes you need.
When you have scene objects (forget geometry nodes for now):
Install addin “export to after effects” - no need to download, part of existing in blender.
Then, selects objects you want to export, make sure you are in the correct camera or select it as well, then
File->Export->Export to After Effects
After Effects is not a 3D app, the script exports objects, not meshes.
The short answer is no.
The more complicated one is that if you can assign a VTX Group from GN even to varying count of vertices and then use an external Empty to track that VTX group - the Empty should track properly and be exported as normal to AFX.
GN can rewrite VTX groups, and this method was tried to try and stick an Empty to it, but it has too many downsides to be a good method.
Yes, I think what @Lumengnom wanted to point out, is that because most of the time GN objects are either with varing geometry or animated , it will be difficult to convert it even inside blender, so you can eventually export it to AE.
Probably, with some scripting it should be possible to access GN object, or to apply the modifier every frame to retrieve values / objects that are inside. And makes something out of it.
But if you have a static object made with GN, then you can apply the modifier, or realize instance and convert the GN object to an actual object.
If it’s animated it won’t work. Because I don’t think it’s possible to access spreadsheet values (yet) .
And to convert GN modifier to actual objects you need to apply the modifier ,and then you loose animation.
Hum, it depends on what we’re talking about, position refers to point position so yes it’s easy.
A mesh is a bunch of points / faces…
And yes, because we’re dealing with mesh data , there is no notion of rotation or scale on these mesh elements. Only on instances, and even that we can’t retrieve it yet.
But let’s say we make some instances, we’ll give them some rotation ( in the instance on point node) and we can store that. And retrieve it latter just like you said. Or even make a point cloud with rotation and scale as attribute. In the lines of what you were proposing earlier.
On the subject of retrieving instances transforms, Johnny Matthews is working on a patch to allow just that, similar to position node, but for rotation, scale a dimension of instances…
Sorry to discuss 3 different things in a rows, hope that makes sense !
Yes, I had assumed instances because turning other types of geometry into empties would be a lot more complicated.
Now, storing the rotation is no problem if you have only a single rotation input. Like You give your instances some random rotations and perhaps animate that. But if you have more than one rotational inputs, say you want to let all your monkey instances look at a tennis ball and then randomly offset them by a field of random vectors and then offset some of them because at a certain point some monkeys are distracted by a bunch of flying bananas you have to keep track of all the rotations and add them manually.
Yes, it’s tricky, but it’s always possible to chain these rotation before instancing. So you end up with a rotation input that you can store.
of course it’s another constraint to manage. But very possible !
Yess I totally get that, and using copy transform with a vertex group is clever !
Note that if you get rotation from a face, some axis will depend on vertex order. That may work, but you may also have some surprises . But also that may not be important for what you need.
I don’t think it’s easily possible to export all instances to different empties at once unless you make a script that automate some parts.
In the end a lot of things are possible if you take time and energy to make them append. Is it worth it ? that depends …
Here is the file and a quick discription. As mentioned above, the whole process is terrible and not streamlined at all but it does work in principle.
You have to select the Geo Nodes object
You have to run the left script. This script will create as many empties as there are instances in the Geo Nodes object. It will also activate a handler which will make some things happen when you change a frame
play your animation through the time line. The script will now get the position, rotation and scale of the instances and keyframe the empties accordingly
Stop the animation and run the script on the right side. This will clear the handler, so that the script no longer inluences the empties.
Check the empties. They should now have location, rotation and scale keyframes on every frame.
First of all, Hurray!
This is already a partial solution for instances.
It works, at least for that setup you created.
A few suggestions…
The GN object currently outputs Pos, Rot, Scale and all the Instance counts:
while this works if you actually want to export ALL the locations of ALL the transforms, it works.
In a usual pipeline, you would usually need a few specific ones, so instead of iterating in all the range, a script that will create a single Empty every time it runs, while the Empty will have a costume property integer - “INDEX”.
when you change the index number - this Empty will stick to the corresponding instance index within the GN network.
A bigger generalization for faces / points (non-instances) would be great.
Image a simple grid plane, that simple has animated noise bouncing on it, with the same “INDEX” principle as mentioned before.
I tried creating an initial setup to build on, on the Right side is a regular blender object, with displacement, and a tracker.
On the left, is the initial setup on the GN network, with an Empty driving the GN INDEX to be selected.
I think the Capture Attribute node is maybe the key to somehow allowing access from outside to the selection?