3
$\begingroup$

I would love some help on this! I have made a GN set up that creates a UVsphere(generated in GN) and the orginal geometry where the GN is the modifier a CUBE. Is a simple Instance on points to create a dome where the cube is going trough the points of the UVsphere ones a frame. The whole point of this set up is to have a render per frame on this speherical set up looking to the center of the sphere. As Cameras are not geometry node supported (I can scatter it as instance) but is not being a 'camera' any more.

So I'll need via python to align the camera every frame to the instance generated each frame by geometry nodes.

I hope explainded correctly

Geometry nodes setup Set up with out frame selection

Thank you!

$\endgroup$
1

3 Answers 3

4
$\begingroup$

This is one of many use cases where GN is still useful and not too complicated to use, and where you don't need to use additional tools like scripts/drivers to achieve what you want.

enter image description here

Just create a single vertex (Add > Mesh > Single Vert > Add Single Vert).

Use this vertex as parent for your camera. Set the Parent Type to Vertex.

You also create an Empty, which serves as Look At target for your camera. You solve this with an Object Constraint.

To the vertex you add the Geometry Nodes node tree shown above.

With this you change the position of the vertex, and the position of the camera will follow this vertex:

enter image description here


(Blender 3.4+)

$\endgroup$
1
  • $\begingroup$ The absolutely worked for me in Blender 4.0.3; though I used an icosphere with 2 subdivisions. I had to remember to enable the extra objects addons to get the vertex. $\endgroup$
    – jtmcdole
    Feb 6 at 1:59
0
$\begingroup$

XY Problem. Don't use geometry nodes.

Parent the camera to an empty and keyframe the empty.

setup

If you want to input the values more easily, you can use a driver expression with custom properties.

driver expression

$\endgroup$
2
  • $\begingroup$ Thanks Leander ill try that! The good thing about geometry nodes is that you can change radius and 'rows' and 'columns' quite easy depending the object you want to render. $\endgroup$ Mar 19, 2023 at 18:54
  • $\begingroup$ @Patricio Hmm, you are right. I added another option to the answer. You can check it out in the attached blend file, in case it is unclear. I still think geometry nodes can't help us in this situation. $\endgroup$
    – Leander
    Mar 19, 2023 at 20:24
0
$\begingroup$

This is one of many use cases, in which GN unfortunately is still useless or too complicated to use because you have to use additional tools like scripting/drivers to achieve what you want.

Fortunately there is a free add-on called "Animation nodes" which is in many ways more powerful:

with just 5 nodes you achieve everything you want:

enter image description here

The "Mesh info" node outputs beneath other useful values the "vertex locations" of a mesh. You can access a single value of a list (in this case the vertex locations) by the "get list element" node and providing an index. As index i am using the time "info node" so you get each frame a different camera position. The "Object transforms output" node can change the transform of an object. I selected the location x,y,z and connected the result of my "get list element" node to the location so that the camera gets the location of the vertex of the uv sphere.

result:

enter image description here

by adding 3 more nodes, you will get automatically just the z > 0 camera positions:

enter image description here

result:

enter image description here

and of course you can instance your cubes on your uv spheres as well like this:

enter image description here

$\endgroup$

You must log in to answer this question.

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