WTF Is? UMG: Retainer Box in Unreal Engine 4 ( UE4 )

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024
  • What is the UMG Retainer Box Widget in Unreal Engine 4
    Source Files: github.com/MWa...

ความคิดเห็น • 35

  • @Sedokun
    @Sedokun 5 ปีที่แล้ว +9

    Retainer Box got an update. Now it has 2 bools.
    Render on Invalidation and Render on Phase. The first one enables the redraw when one of the components has changed. The second one is the frame-dependent refresh.

  • @markseddon4242
    @markseddon4242 5 ปีที่แล้ว

    Thankyou Mathew. This helped me solve a problem with retainer box with a black background on my hud. the penny dropped when you explained my 'hud' becomes the texture and needed to feed the alpha into opacity to get it transparent again.
    Yours is definitely the most useful reference channel I use for UE4! quick, to the point explanations.

  • @NickDarnell
    @NickDarnell 8 ปีที่แล้ว +3

    Nice. Word of advice, don't use Size To Content on retainers or in general adjust their size at runtime. Try to make them large enough hold anything they'll need. Dynamically changing their size, results in the occasional stretched frame you saw when the time was reporting different size strings every frame. On top of that - it would need to allocate a new render target matching the necessary size.

    • @MathewWadsteinTutorials
      @MathewWadsteinTutorials  8 ปีที่แล้ว

      Awesome and good advice =) I probably should have mentioned that in the video at some point.

  • @terricon4
    @terricon4 3 ปีที่แล้ว +2

    Heads up, with 4.26 it seems that the Retainer box now forces clipping on all child widgets, so even if the stuff bellow it is set to not clip it may clip it resulting in parts flickering in and out of being visible at times.

  • @yantizeng6557
    @yantizeng6557 ปีที่แล้ว

    Thank you so much! The explanations are exactly what I'm looking for.

  • @MaxIzrin
    @MaxIzrin 2 ปีที่แล้ว +1

    Keep in mind: you can't preview the result in the editor, you have to press play.

  • @business2015
    @business2015 3 ปีที่แล้ว +1

    Hello, I read that using "Event Tick" in widgets is expensive. So in this example, does using Retainer Box nullify the cost of Event Tick, since the target of the Tick is the Text node being set inside the Retainer Box?

    • @ivlgames8760
      @ivlgames8760 2 ปีที่แล้ว +1

      No, it will only affect the rendering of the umg element not event tick. So even if you set the phase count to something extremely high your widget will still tick every frame.
      If you want to avoid tick, either set your umg elements visibility to hidden, this will stop it from ticking but it will still respond to events. So you could have for example an event to show you widget again and then it will start ticking and hide it after a certain amount of time.
      Even better is to use the event to start a looping timer with a duration say 1/30 = 0.0333 which means your "timer tick" will be at 30fps or every 0.0333 seconds. This way if your game is running at 120fps your ui will only update at 30fps, which should still be plenty to make it look really smooth.

  • @GilFavor101
    @GilFavor101 6 ปีที่แล้ว +4

    Makes me laugh searching TH-cam for "wtf is _____ ?" XD!!!

  • @Thilo87
    @Thilo87 4 ปีที่แล้ว

    The best video you ever made is video 4.

    • @KodakYarr
      @KodakYarr 3 ปีที่แล้ว

      Lol. This has tripped me up more than once, thinking; wait... are there videos 1-3 on the same topic..? 😅

  • @Deck_Dynasty
    @Deck_Dynasty 5 ปีที่แล้ว +1

    Seems using retainer box is a tradeoff of texture memory for cpu calculations. So, is it only useful for developing phone apps, or can anyone think of a use case for PC?

    • @IWillYeah
      @IWillYeah 5 ปีที่แล้ว

      Applying a UI material to a umg/ widget component that doesn't support materials (eg text block as shown in video)

  • @UnrealVirtualUniversity
    @UnrealVirtualUniversity 7 ปีที่แล้ว

    Awesome, I think this could be the great solution to my problem. I'm trying to play a youtube video using the webbrowser widget and then applying a chroma key (or maybe an hologram effect) to it. Do you think could be possible? and if so, What do you think of performance?

  • @noodlees9212
    @noodlees9212 4 ปีที่แล้ว

    I can't figure out how to get black text, shadows, etc to not be hidden when using this technique. Is it not possible? It seems like the target texture in the retainer uses black for opacity, so it gets removed.
    Edit: I figured it out. Newer versions of UE4 have an extra pin at the bottom for RGBA. If you drag that into Opacity rather than the A pin, you'll have problems.

  • @jonasdoliveira
    @jonasdoliveira 3 ปีที่แล้ว

    Anyone knows when should I use InvalidationBox or RetainerBox? If I use the InvalidationBox doesn't make sense to use a RetainerBox inside of an InvalidationBox, is that right?

  • @phelaz
    @phelaz 8 ปีที่แล้ว +1

    Thanks for explaining, great video series. I tried to change the opacity inside the material, so the texture opacity is not directly connected to the opacity output, but modified. This doesn't seem to work, though.. should it be possible?

    • @MathewWadsteinTutorials
      @MathewWadsteinTutorials  8 ปีที่แล้ว

      If nothing is connected to the Opacity part of your Material Node then your Material will have no Opacity on whatever you put it on. If you want to modify it inside your material that is fine just make sure the output is hooked up or your material will be just opaque (as it has no idea what to do for an opacity)

    • @phelaz
      @phelaz 8 ปีที่แล้ว

      Well it is connected, but seems to only work if it's a direct connection. If I modify the opacity value, e.g. just add a substract 0.5 node, it's not taken into account anymore. Could be a bug or I'm doing something wrong...

    • @MathewWadsteinTutorials
      @MathewWadsteinTutorials  8 ปีที่แล้ว

      Do you have an example you could post showing what you have and also what you are trying to do?

    • @phelaz
      @phelaz 8 ปีที่แล้ว

      Can't post links here but let's chat on your Tutorial Request List, or #unrealengine on freenode?

    • @phelaz
      @phelaz 8 ปีที่แล้ว

      dl.dropboxusercontent.com/u/47783892/umg_retainer_box_mat.png (oh, I can post links :) this is what I tried to do - it shows correctly in the preview, but ingame it didn't work)

  • @KITATUS
    @KITATUS 6 ปีที่แล้ว

    Wow thanks Mathew for these exciting tutorials! Much better than that Brackeys guy!

  • @stormolflak
    @stormolflak 2 ปีที่แล้ว

    Thanks man

  • @qibopang801
    @qibopang801 ปีที่แล้ว

    RetainerBox adds effects for its contained widgets. If you want to add post-process effects for a widget’s covered region, you can try this: th-cam.com/video/_7YDG8c-WZM/w-d-xo.html