How to get screen space position?

If i have 3D position with Top or chop , how can i get screen space position ?
I want to use screen space positon for text to describe 3D point
.

Are you asking how to have text follow a 3D point in space?

Yes, but it should be in 2D(screen) space. So text size be same.
In 3D space is very easy just use " Geo Text COMP".

like is ↓
text
tes.toe (4.6 KB)

You could use the Geo Text COMP and scale the text size based on the Z position, but the 2D image only has XY/UV and that I’ve ever known, can’t account for a 3D object as it is now rendered as 2D. But yeah, you could try scaling the text size or something in that vein perhaps.

Yes , i know maybe using projection matrix etc.
For example , opneframewokrs has class method to get posion on scrren of 3D position.
https://openframeworks.cc/documentation/3d/ofCamera/#!show_worldToScreen

But idonot know how to use it in touch designer.

This may be what you are asking for. It gets a SOP’s points in the camera’s XYZ space using an Object Merge SOP. Then builds a Spec DAT for the Geo Text COMP to override text string, tx, ty, tz and optionally Font Size. The Geo Text COMP’s align parameters are tricky to set up to get the text to start to the right of the 3D points.

textOnPoints.tox (38.8 KB)

In the Geo Text COMP you can wire an extra column into the Merge DAT to get constant size text. Look ugly at a distance, so you can clamp the max size with a Limit CHOP

Wow , this is very useful ! Thank you.

Actually , i donot need 3D information for text , just draw on screen , and cause i want to draw many font .

Do you know just draw font 2D from 3D point?
I want to know how to get 2D screen location positon from 3D with camera.

The CHOP in there that contains tx ty tz in camera space… something like

u = (constant * tx / tz) - .5
v = (constant * ty / tz) - .5

oh, that is good.i will check it.

2D location is strange. Something wrong?
I’ve attached my test data.


Q.toe (29.3 KB)