How to attach text next to a point?

Hi,

I made a sphere top, added noise top, connected it to geometry and then and then added line May and activated points.

Is there a way to attach a world to one of the points created in the geometry and follows the movement of the point?

Thank you!

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).

1 Like

New textgeoCOMP is probably perfect for this

1 Like

Firstly my apologies to ask question here. I’m very new to this.

Thanks for your replies.

Because it’s a points of 3d geometry, I don’t know how to even select a point to get position reference out of it?

It’s very challenging and it moves based on a noise.

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.

Hope that helps.

textonpoint.tox (2.9 KB)

1 Like

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!

noiseCHOPreference.toe (3.7 KB)

1 Like

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

  1. How to have the numbers only for some points and not all of them?

  2. 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.

Thank you again!

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.

Hope that helps.

randomtextonrandompoints.tox (4.4 KB)

1 Like

@robmc thank you so much! Helped a lot and thanks for explaining, I’ve learned a lot too.