Title: left align text within centered text box

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

TCP786

  • Posts: 456
  • Joined: Thu Sep 16, 2021 7:05 am
  • Real Name: Cody Predum

Title: left align text within centered text box

PostTue Mar 15, 2022 8:08 am

I essentially need to make a bullet point list in the center of the frame. I've been using Text+ because it has some other features that I want to be able to use, but I'm struggling with this particular formatting problem: text alignment seems to be controlled by the "H anchor" parameter, but this parameter is different (and aptly named) than simple alignment, because the "anchor point" doesn't change. (e.g. with at x=0.5, H anchor left makes the text start at the center of the screen, and H anchor right makes the text end in the middle of the screen.

The behavior I want is for the text to be left aligned, but if you drew a box around the text, that box would be centered. Obviously I could do this manually with a grid, but in that case I'd have to re-eyeball it if changed the text.

Does anyone know if what I'm describing is possible?
Offline

xunile

  • Posts: 3108
  • Joined: Mon Apr 23, 2018 5:21 am
  • Real Name: Eric Eisenmann

Re: Title: left align text within centered text box

PostTue Mar 15, 2022 7:02 pm

Click on the Layout tab and choose Type Frame. Then at the bottom left of the viewer select Fusion Overlay from the dropdown menu. Then adjust the Frame box to where you want to align your text. Then choose H Anchor left from the Text tab of the Text+ title.
Attachments
2022-03-15.jpg
2022-03-15.jpg (355.36 KiB) Viewed 3602 times
2022-03-15 (1).jpg
2022-03-15 (1).jpg (358.56 KiB) Viewed 3602 times
2022-03-15 (2).jpg
2022-03-15 (2).jpg (357.24 KiB) Viewed 3602 times
Win 10 Home | Intel i7 - 10700f 64 GB 1 TB GB SSD 2 TB SSD
RTX-3060 12 GB | Resolve Studio 18.6.6| Fusion Studio 18.6.6

Win 10 Home | Intel Core I7-7700HQ 32 GB 1 TB NVME SSD 1 TB SATA SSD
GTX-1060-6GB | Resolve 17.4.6
Offline

bounceHouse

  • Posts: 371
  • Joined: Tue Apr 14, 2020 12:40 am
  • Real Name: Wesley McDermott

Re: Title: left align text within centered text box

PostTue Mar 15, 2022 9:00 pm

I read the OP to mean "how do I get the bounding box of the text to be centered in the frame, regardless of the width of the left-justified text I type in the Text+ box?"

If so:
1) from the Edit page, with your Text+ selected, in the Inspector, text tab, set the H anchor to Left as you wanted

2) in the upper right of the Inspector, click the "adjust in fusion" button (an arrow pointing to a magic wand / fusion symbol).

3) select the first node (Template) and click the Transform button in the menu bar above it (arrows chasing each other) to insert a transform node between the Template node and the output node

4) select the transform node. In the inspector, double click the Center X value, type "=" and press enter to open a formula box for the point

5) replace the default Point(0.5,0.5) with this formula:
Code: Select all
Point(0.5-(Template.Output.DataWindow[3]-Template.Output.DataWindow[1])/Template.Output.Width/2, 0.5)


6) Click back to the edit page, and type whatever text you like. The center x value will shift left (from the 0.5 center of the screen) by half the width of the bounding box.

This approach was derived from techniques Berndt provides for bounding boxes on text in Fusion... see https://vfxstudy.com/tutorials/text-boxes/

You could also save this Text+ as a new template in your Titles / favorites for re-use.

view1.jpg
view1.jpg (90.51 KiB) Viewed 3572 times

view2.jpg
view2.jpg (102.84 KiB) Viewed 3572 times

nodes2.jpg
nodes2.jpg (82.62 KiB) Viewed 3572 times
PC Win 10 Pro, 64GB ram; NVidia 522.30; dual monitor; RTX 3080 (10GB); auto/CUDA processing mode; SSD cache, separate SSD for data; Davinci Studio 19b33 build
Offline

TCP786

  • Posts: 456
  • Joined: Thu Sep 16, 2021 7:05 am
  • Real Name: Cody Predum

Re: Title: left align text within centered text box

PostWed Mar 16, 2022 6:11 am

Ah cool, these solutions will work great. It kind of sucks that I have to go into the Fusion page to center something, but that expression seems like a good way to take care of the centering automatically. Thank you both.

By the way, is there an easier way to do this with the regular Text title?
Offline

Andy Mees

  • Posts: 3317
  • Joined: Wed Aug 22, 2012 7:48 am

Re: Title: left align text within centered text box

PostWed Mar 16, 2022 8:44 am

TCP786 wrote:Ah cool, these solutions will work great. It kind of sucks that I have to go into the Fusion page to center something, but that expression seems like a good way to take care of the centering automatically. Thank you both.

By the way, is there an easier way to do this with the regular Text title?

You don't have to go into the Fusion Page, Cody, just follow Eric's instructions. The main thing is to remember to enable the Fusion Overlay in the Viewer, then you can see the frame. You can adjust the frames width manually to match your text (or not) in the Layout controls. It's is all very quick and simple. The frame is centred automatically, but If you move it off centre and need to recentre it, just reset the layout X,Y to default (0.5, 0.5).
Let's have a return to the glory days, when press releases for new versions included text like "...with over 300 new features and improvements that professional editors and colorists have asked for."

Return to DaVinci Resolve

Who is online

Users browsing this forum: Alex Silva, Bing [Bot], Google Feedfetcher, panos_mts and 129 guests