Graphics

 View Only
Expand all | Collapse all

Borders to Quad

  • 1.  Borders to Quad

    Posted 10-02-2024 23:18
    Hello everyone! I have a quad and a text layer that expands depending on the length of the text. Is it possible to create a border around or inside the quad with a specific number of pixels, and if the size of the quad changes due to the text, the borders should also adjust accordingly. I don't know, maybe is the quad not suitable for this, and should I use a different approach? I would appreciate any information to explore!


    ------------------------------
    Eugene Shevtsov
    ------------------------------


  • 2.  RE: Borders to Quad

    Posted 10-03-2024 01:29

    Have you tried making the border a child of the quad?



    ------------------------------
    Alejandro Galvan
    LA36 LOS ANGELES TV ACCESS
    ------------------------------



  • 3.  RE: Borders to Quad

    Posted 10-03-2024 06:34

    Use visual logic with an offset block to create the board size you want. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 4.  RE: Borders to Quad

    Posted 10-03-2024 09:31

    This could be one way. I instead prefer to take the width and height of the first quad, add the border thickness (e.g. 50px) and then calculate the correct scale.
    So, for the width:
    1) get the width of the first quad
    2) add 50px
    3)divide the sum by the original width and apply it to the second quad
    Do the same things for the height and you will get the real scale to have a perfect border equal on each side (I can't send screen for visual logic now, I don't have Xpression in my laptop)



    ------------------------------
    Iacopo Baglioni
    Broadcast Engineer, Video mixer operator, GFX oper
    Iacopo Baglioni
    Viterbo Italy
    ------------------------------



  • 5.  RE: Borders to Quad

    Posted 10-03-2024 12:56

    Yeah with the width and height method you'll also need to move the pivot via visual logic if you want it to grow anywhere but the center. 

    For example width.x  /2 = pivot.x will keep it on the right edge of the object.

    With Width and Height you also need to watch if you are using text for the size and you'll squeezing it , you'll need to use width / height scaled. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 6.  RE: Borders to Quad

    Posted 10-03-2024 12:58

    You can also use this method with drop shadow effect although its the least efficient for the engine so only use if you're not doing at lot of other things that require heavy rendering. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 7.  RE: Borders to Quad

    Posted 10-04-2024 18:23
    Guys, thank you very much for your help! It turned out exactly as I envisioned, in the form of this construction. The only thing that confused me was the inability to change the anchor point in the Object Inspector, only through Visual Logic :/ What is this related to?



    ------------------------------
    Eugene Shevtsov
    ------------------------------



  • 8.  RE: Borders to Quad

    Posted 10-07-2024 09:02

    You can change it in the object inspector but it's a fixed location, not a dynamic one. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 9.  RE: Borders to Quad

    Posted 10-07-2024 15:45

    Hi. I have been interested in this also. I want to have a quad and then have a border that will automatically size up or down with the size of the quad. Say it is several pictures of someone that are different sizes. I don't find that the visual logic answer fits this solution, but I could be wrong. If there is an answer to my question that would be fantastic.



    ------------------------------
    Michele Lee Hampton
    Graphics Operator
    Hermosa Beach, CA
    ------------------------------



  • 10.  RE: Borders to Quad

    Posted 10-07-2024 16:17

    This one that Eugene posted will do what you want. 

    I also posted an option that doesn't use visual logic above as well. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 11.  RE: Borders to Quad

    Posted 10-07-2024 19:15

    Thank you for the message. I see yours that is with the effects correct? I have the example you sent me and that being Eugene's. I am not good at Visual Logic. I did get this to work though. But trying to scale it after I put the border on gets weird. It moves on the Y axis when I try and scale up or down in the object inspector. How would I just get the whole thing to scale down with the center being in the middle of the picture and border? Does that makes sense?



    ------------------------------
    Michele Lee Hampton
    Graphics Operator
    Hermosa Beach, CA
    ------------------------------



  • 12.  RE: Borders to Quad

    Posted 10-08-2024 04:31

    Don't do the pivot bit at the bottom, you only need to do that if you want to offset the pivot point. Default is the center. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 13.  RE: Borders to Quad

    Posted 10-11-2024 13:39
      |   view attached

    I found that I could achieve that with a Slab object.
    You have to set the Slab's bebel as border, and the "Z" Slab size to (near) 0 to flatten it. Then you can use a simple Visual Logic to connect the text size to the Slab size (and an extra value to extend a bit more the size to add margins):

    I have attached a project that is done here.



    ------------------------------
    Nicolás Noé
    ------------------------------

    Attachment(s)

    xpf
    border with slab.xpf   16 KB 1 version


  • 14.  RE: Borders to Quad

    Posted 10-11-2024 13:40
      |   view attached

    I found that I could achieve that with a Slab object.
    You have to set the Slab's bebel as border, and the "Z" Slab size to (near) 0 to flatten it. Then you can use a simple Visual Logic to connect the text size to the Slab size (and an extra value to extend a bit more the size to add margins):

    I have attached a sample project that is done here.



    ------------------------------
    Nicolás Noé
    ------------------------------

    Attachment(s)

    xpf
    border with slab.xpf   16 KB 1 version