Scattered point positions to the nulls (obj level)

   155   7   0
User Avatar
Member
41 posts
Joined: Sept. 2015
Offline
I have a bunch of scattered points, but I need somehow get Nulls on each point in /obj level.
Is there a way to do that?

Basically, I'm trying to export my scene with Houdini2Ae tool (https://vimeo.com/186204479) into after effects, and it selects object nodes in /obj level. As my points are inside the object, it doesn't read coordinates, but I don't want to do it manually either because I think it would be very stupid.

Is there a way to send each point coordinate up one level, and assign Null node?

If anyone of you is familiar with C4d, I'm trying to get “external compositing” tag and get 3d nulls and camera.

Attachments:
Grids.PNG (733.7 KB)

User Avatar
Member
379 posts
Joined: Feb. 2016
Offline
so you want to create as many new null nodes as your scattered points, and assign them their position?

You could do it in python, but it seems not very efficient to create so many objects..
User Avatar
Member
41 posts
Joined: Sept. 2015
Offline
Andr
so you want to create as many new null nodes as your scattered points, and assign them their position?

You could do it in python, but it seems not very efficient to create so many objects..

Yes. I know it's not very efficient, but there is no other way to get nulls in Ae without doing so. I thought that python should do something similar, will try to look into it, thanks!

I just ditched C4d, and trying to recreate projects with Houdini. In all fairness, Houdini is great, but there are some caveats in Houdini/Ae workflow
User Avatar
Member
379 posts
Joined: Feb. 2016
Offline
Hi, have a look at the attached example.
It's a starting point. It would create at obj level as many nulls as the points in the reference node.
You need to set their position with python, I'll leave that to you

cheers
Edited by Andr - July 11, 2019 06:52:33

Attachments:
createNulls.hiplc (63.1 KB)

User Avatar
Member
41 posts
Joined: Sept. 2015
Offline
Hi, will try to do that! I think it will be a good educational thing for sure! thanks for a script!
User Avatar
Member
3965 posts
Joined: July 2007
Offline
To avoid scripting you can also make your points into packed primitives (by packing and copying something to them)
Then export as alembic and read on the scene level as alembic hierarchy
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
41 posts
Joined: Sept. 2015
Offline
tamte
To avoid scripting you can also make your points into packed primitives (by packing and copying something to them)
Then export as alembic and read on the scene level as alembic hierarchy
Thanks for the reply, but this doesn't work.(or it might. but it is a quite long process to iterate).

Talking about scripts, it might sound funny for some of you but I was able to get a position and print that position of each point.
print(p.attribValue("P"))
Need to find the way to set this position for the points.
Edited by brokenkeyframe - July 14, 2019 15:34:35
User Avatar
Member
480 posts
Joined: Dec. 2006
Offline
Create one null and call it “null0” or similar, and in the translation X, Y, Z, put these expression, (assuming the object with the points you want to have nulls for is called “TARGET”):

point("../TARGET", `opdigits(".")`, "P", 0)
point("../TARGET", `opdigits(".")`, "P", 1)
point("../TARGET", `opdigits(".")`, "P", 2)

Now just Ctrl+C this node and Ctrl+v as many times as you need to. (You can just go into “update never” mode and hold down the paste key combo until you have a jillion nodes).

This extracts the digits from the name of the null, and uses this to look up the equivalent point number in the target object and find its position in X, Y and Z.

Sean
Edited by mrCatfish - July 15, 2019 09:45:41
Sean Lewkiw
Lost Boys Montreal
  • Quick Links