Announcement

Collapse
No announcement yet.

UMG and Slate - New Clipping System in 4.17

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by DangerDoc View Post
    Great work! Can't wait til 4.17 is final.

    I have a few questions on how the new clipping features work using a SceneCapture2D UMG widget.

    1) Does stencil clipping work on a SceneCapture2D widget? If it does, will it also clip the RenderTarget drawn into by the SceneCapture2DComponent, so we are not process pixels not shown? Example: To use in a Voronoi dynamic split-screen https://www.youtube.com/watch?v=YFRWvxYJ9hc

    2) In the custom clipping OnPaint(), does the geometry need to be are rectangle or axis-aligned rectangle (4 vertices)? Could it be a triangle or arbitrary (5, 6, 7, ... vertices) ?

    Background: I want to create something similar to the dynamic split-screen in the video above, but would like to clip the RenderTarget drawn into by my SceneCapture2DComponent. When the split-screen feature is active (ie. the players are far apart), the method in the video renders the entire screen for each view, even though only half is shown. I looking for suitable methods in UE4 I can use in creating a custom object/component.

    Thanks
    1) No. It will clip the render target, but not any of the scene rendering. The GPU state would all be reset for that pass, and it wouldn't happen during slate rendering anyway.

    2) It needs to be 4 verts at the moment - but I named it a 'clipping zone' thinking it wouldn't nessesarily be a 'clipping rect/quad' forever. So I could support an arbitrary poly in the future if someone makes a convincing case, or sends me a pull request

    re background, like i said in 1. scene rendering is effectively a different renderer, so different solution needed if you want to clip that rendering (i don't know where to begin there).

    Comment


    • #17
      Thanks for the info:

      Originally posted by Nick Darnell View Post
      So I could support an arbitrary poly in the future if someone makes a convincing case, or sends me a pull request
      I'll look into it, and see what I come up with.

      Comment


      • #18
        Can these clipping options (custom clipping) be enabled from editor's UMG or Blueprints or just from C++ ? Also, would this system allow you to layer 3 progress bars ?
        Last edited by mahri726; 07-17-2017, 05:37 AM.

        Comment


        • #19
          Originally posted by mahri726 View Post
          Can these clipping options (custom clipping) be enabled from editor's UMG or Blueprints or just from C++ ? Also, would this system allow you to layer 3 progress bars ?
          The custom clipping where you do it from OnPaint isn't exposed to blueprints - just Clipping property on Widgets. You can already layer 3 progress bars, you'd just put them in a Overlay panel; but that's not how I'd do it anyway. if you want an advanced progress bar with layered feedback, you should just use an Image with a material.

          Comment


          • #20
            Not related to widget clipping but I'm seeing very poor performance of 3D widgets on GearVR (android) in 4.17 that is not there in earlier versions of the engine: https://answers.unrealengine.com/que...in-417-pr.html

            Could this be somehow related to this change?
            Headgear - VR solutions

            VR Game Release: We Come In Peace...
            Oculus GearVR: https://www2.oculus.com/experiences/...6630401745678/
            Daydream VR: https://play.google.com/store/apps/details?id=com.headgear.WCIP

            Comment


            • #21
              Sure - if you've given hundreds of widgets a unique clip rect, otherwise no. I would recommend profiling it.

              Comment


              • #22
                Speaking of UMG. Can we see more Rich Text updates soon? Cant even change the content:text via blueprint. There is no SetText(text) function for Rich Text.

                Comment


                • #23
                  Originally posted by Nick Darnell View Post
                  Sure - if you've given hundreds of widgets a unique clip rect, otherwise no. I would recommend profiling it.
                  So since my example linked on the answerhub post only contains 3 widgets all with default settings (clipping setting untouched from default) I guess I can assume the 4.17 widget performance problem on gearvr is not related to clipping then?

                  Profiling on the gearvr is unfortunately not easy: the top google result returns this thread: https://forums.unrealengine.com/show...-cpu-profiling which would not help profile this problem. You can only really get the basic stuff
                  Headgear - VR solutions

                  VR Game Release: We Come In Peace...
                  Oculus GearVR: https://www2.oculus.com/experiences/...6630401745678/
                  Daydream VR: https://play.google.com/store/apps/details?id=com.headgear.WCIP

                  Comment


                  • #24
                    I assume this clipping is only related to that mentioned rect, what If I want to mask/clip underlying graphics of widget by texture mask.. Eg imagine drawing picture and then use layered B&W mask to mask out certain portion of image. Is this doable with Slate?

                    Comment


                    • #25
                      Originally posted by Vertex Soup View Post
                      I assume this clipping is only related to that mentioned rect, what If I want to mask/clip underlying graphics of widget by texture mask.. Eg imagine drawing picture and then use layered B&W mask to mask out certain portion of image. Is this doable with Slate?
                      No support for masking yet. Though the stenciling support does move the ball forward a lot in supporting this down the line. If you need to mask things, I would suggest rendering them in a retainer box (render target), and then masking it in the retainer's material.

                      Hit testing is going to still work though, fyi.

                      Comment

                      Working...
                      X