Make Text TOP and Text COMP yield same results

It’s pretty frustrating the Text TOP and Text COMP don’t play by the same rules.

Yeah, I can appreciate that. They are two very different generations of nodes and we faced a lot of trade offs between modernizing things in one while maintaining backwards compatibility in the other.

Most of what you’re seeing are new features that are available in the Text COMP, but have so far not been ported back to the older Text TOP.

The biggest one is that the Text TOP only supports the x, y and text fields in your spec table. It doesn’t currently have support for fontsize or fontcolor. You may also notice that the default font dimensions are different in the top versus comp. They do work in different output spaces, but generally you can equate Panel Units in the comp to Pixels in the top.

The other is that the two ops handle the alignment differently. Again the Text TOP is a little more limited here and always aligns the bottom left corner of the text to the given point in the table.

The Text COMP aligns each block to the point using the Horizontal and Vertical Align parameters which default to centering the text at the point. You can replicate the Text TOP behaviour by switching those to Left and Bottom.

Hope that helps. I’ll update our internal task list with your feedback.

Hi Rob,

Thanks for pointing that out. I’m aware the Text COMP is a lot newer, but in my experience the Text COMP isn’t necessarily a replacement for the Text TOP. Would you say it is in that regard? Ie. better from now on to use the Text COMP and an OP Viewer TOP?

Yeah, it’s not a replacement for every situation. It’s definitely better for UI stuff and we’ve been gradually swapping it out that way in our own work, but if you’re rendering to a texture then ideally using the Text TOP would be the best way to go.

That said, if there is a feature that isn’t available in the Text TOP right now, then using the OP Viewer TOP is a viable way to go. I’m not aware of any direct performance comparisons, but the net process should be pretty similar. All the OP viewer is doing is redirecting the Text COMP renderer to a texture instead of going directly to the screen.

I have made an internal task about updating those features on the Text TOP, but I can’t say now how viable that may be.

1 Like

I’ve been looking for a way to position text in my project using the Text TOP accurately, and just found this discussion. I’ve never used the Text COMP before, but it seems like the correct solution (at least until the Text TOP is modernized).

Currently, I’m trying to align my text according to its position on screen (in this case, I want left-bottom alignment when in the top-right quadrant of the screen, top-right alignment when in the bottom-left quadrant, etc.), but alignx/aligny aren’t available in the Specification DAT. Please add these as options.

To add to these capabilities and ensure accurate offsets, the option to use Text Bounding Box for the Horizontal and Vertical Align Modes when in Specification DAT (and, by extension, Multiline) Mode would be ideal, as well as the ability to create multiline text in the Specification DAT’s text field. For example, text1 + ‘\n’ + text2.

What I ended using in my project is the Web Render TOP. If you’re familiar with CSS its basically the best way to have full control.

Unfortunately, the Web Render isn’t very performant, so it’s not a viable option when I need hundreds or thousands of pieces of text. An updated Text TOP would be ideal so that it can take advantage of GPU rendering.