If I understand what you’re wanting, you just need to know the position of the point (X,Y), and then use a reference to position the text wherever you want in association with the point. So if, for example, the point is at (0,0), then you could use the reference to that position and then add a value/values to offset the position of the text to something like (0, 10).
I’ve attached a tox component with one quick example on how you could do this. I’m using the Group SOP to select one of the sphere’s points and then using a SOPtoCHOP to get that group’s position. I’m then using that CHOP data to instance the text in a geo text comp so that the text is positioned at that point.
I’m selecting the point by number, but you could also do it based on position, normal, etc in the group sop.
One note: the geo text comp currently doesn’t display instances in it’s viewer, but the render top will show it in the correct location.
Definitely suggest looking at what @robmc has provided in the .tox, but simply put, a reference is a python expression that allows you to reference a different parameter/element somewhere in your code. So for example, you might reference the first sample in a CHOP channel using an expression like
op('noise1')['y'][0]
This uses the CHOP 'noise1, calling on the channel ‘y’, and using the first sample since we use 0 count in this context. Simple .toe attached for you as well!
Thank you so much guys. @robmc i used your method and mixed it with a tip that I got directly from Owen Lowery. He was kind enough to answer my question directly via email.
I was able to create numbers. Attached the file here.
There are two things left for me to do
How to have the numbers only for some points and not all of them?
How to make them generate random numbers?
If you guys can help me with this, I’ll be always be grateful and whenever you are in Munich, I’ll invite you for drinks in my favorites bar.
Glad you got things working. I’ve attached another example that might help with those other issues.
I’m using sort and resample CHOPs to randomly select a set number of points from the sphere instead of the group SOP in the other example. The best way to select a subset of points will really depend on what your criteria are.
To get different text on each point, I’ve changed up how I’m using the geo text COMP. Instancing works great for copies of the same text, but if you want different text than using the Specification DAT/CHOP method works better.
So I’m building a DAT with one row for each point plus a header row, and then using a script DAT to fill it with random numbers based on a seed. I’m then using the CHOP points in the specification CHOP to position each of those numbers. The Specification CHOP par on the geo text is expecting channels named like tx, ty, tz so it works really well for this.