aligning different Font COPs

   3588   3   2
User Avatar
Member
1 posts
Joined: March 2007
Offline
I'm trying to make scrolling text out of several Font COPs. Font size (and other properties) may vary per COP. I need a way to auto-align the top of a given Font COP to the bottom of the one that precedes it. Thought I could write an expression in the COP's y-position using the “size” function, but the function doesn't seem to like COPs (only SOPs).

Is there another way to do this? Any ideas welcome; thanks!
User Avatar
Member
321 posts
Joined: July 2005
Offline
cliffbr
I'm trying to make scrolling text out of several Font COPs. Font size (and other properties) may vary per COP. I need a way to auto-align the top of a given Font COP to the bottom of the one that precedes it. Thought I could write an expression in the COP's y-position using the “size” function, but the function doesn't seem to like COPs (only SOPs).

Is there another way to do this? Any ideas welcome; thanks!
Couple of options (due to the fact that once you generate an image, you don't really have any geometric info about it any more). 1) do a trace SOP on each font COP's output, and then use the resulting geometry's bounding box multiplied with some constant to offset them. 2) not sure if this is possible, but multiply the black & white non-anti-aliased font COP with a vertical grad picture. Then (somehow) find the maximum pixel value in the result, and that is the highest row of pixels. Measuring might be doable in an expression COP (does this even exist)? or in CHOPs, where if you slurp the whole picture in as a channel, you can use one of the CHOPs functions to get the max value. Neither of these solutions are particularly simple, IMO.

– Antoine
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
8081 posts
Joined: July 2005
Offline
Instead of size(), can you use res() ?
User Avatar
Member
8081 posts
Joined: July 2005
Offline
Here's my attempt of it in COPs. The only tricky part was to get the Font COPs to have the correct height. For that, I hacked it by taking the number of lines in the Font COP and multiplying it by the font size. Hit play with the attached file.

Attachments:
scroll_text.hip (178.1 KB)

  • Quick Links