Widget live texture.

Sick? No! Confused? Somewhat… What do those custom events do?

I tried to not add the widget but interact with the monitor, but first of all, it looked all curved because of the monitor’s model,

Not entirely sure what that means - the shape of the monitor mesh has nothing to do with the quad the widget component is rendered on. Are we talking about these:

image

Because you will need it eventually so we can match the curvature of the screen.

when I went to tick on the “receive hardware input” check box it was constantly set to false.

The cylinder will not allow you to interact with it directly. You’d need an interaction component that simulates a pointing device.

Can we focus on 1 thing at a time - ideally on the widget (not) showing up. For now, set the geometry mode to Plane and enable Receive Hardware Input. Can you get it to show up?

And an example interaction when a widget component is wrapped around a cylinder:

The aforementioned Widget Interaction Component - but that’s for later.

Well you see I didn’t wanted to interact with widget directly from the monitor, but only when I click the monitor it zooms on it and adds the monitor widget to the viewport only simulating looking at it. The thing is there I want to display the last page i was on the monitor.

only when I click the monitor it zooms on it and adds the monitor widget to the viewport only simulating looking at it.

See, I never got that bit somehow - reading comprehension is a disappearing artform :eyes: Lemme reiterate so we’re on the same level.

  • when the player does not use the computer, its screen is not interactive but shows the whatever image is supposed to be there, curved and all
  • when we use the computer, its screen becomes interactive
  • we zoom in on the screen mesh and show a regular widget
  • once we’re done, the widget goes away, we zoom out
  • the screen shows what we saw in the widget last

Am I getting closer?

You are but just to get even more clear:

My last idea was to create the exact same widget then from the previous one to cast to the new one and put the casted variable to every action except making it an invisible one and after like 3 hours of connecting pins… nothing. I don’t know where to search anymore.

Almost certain this wouldn’t work. Flipping a widget component from screen ↔ world. I’d go for a Render Target at this point.

A material that lives on the monitor mesh - you can feed it data from the widget.

1 Like

Well I asked chat GPT for ideas a couple of thousand times and he said the same but I couldn’t find any tutorials for render targets from UI

I’ll try to whip something up, not sure if today - Monday-ish worst case scenario. There may be a post on the forums but the sheer volume is somewhat overwhelming.


Originally I thought you wanted this:

But now I know better we’re after something more complex.

I mean you don’t have to I was just updating you and what dumb things i’ve tried because I’m running out of ideas. I suppose the monitor can be just turned off and somehow add an old tv turn on animation… I just have to learn how to do that.

2 Likes

Haha, a sensible chuckle, indeed!

1 Like

But the “In-game computer” you sent IS pretty much the same its just that the widget has to appear 1920x1080 on the viewport and in the same time update on the monitor you don’t see because it’s behind the widget.

Yup, but that’s the somewhat tricky part. Essentially, the monitor will have a material whose resource is updated by the screen space widget. We capture the widget (either every frame or when necessary - it’s an expensive operation so once is better) and use it as a texture on something else.

I think I’ve done it once or twice but it must have been years. Can’t think of a step-by-step from the top of my head but have an overall idea.

That’s worse than the last time I tried to make DBD skill check with widgets. Spoiler I couldn’t.

1 Like

It might be the case of a tutorial / docs never existing in the first place… Who knows.


The Widget:

You can do anything you need inside but it must be wrapped in a Retainer Box which can output to a render target.

– we will use the Retain Render flag to switch between 3d and 2d screens
– if you do not need the 3d computer screen animated, untick Render on Phase
– if you want it animated, enable Render on Phase and use Phase Count to control the update frequency. 10 means every 10th frame; it’s for optimisation
– the 2d screen-space rendering is unaffected by this
Texture Parameter, here called Param, is needed to update the texture

  • widget graph:

  • we create a dynamic material instance and assign it to the retainer
  • the button’s onClicked closes this widget by disabling mouse interaction with any children of the canvas
  • do note this widget never gets Hidden or Collapsed, it needs to be there for the 3d computer screen to render it - especially if you want the widget animated. That’s why we Set Visiblity rather than remove it from the viewport / container. If you remove it, there’s nothing for the render target to latch onto. It’s the Retainer’s job to either Retain Rendering or let go off it so we can have the 2d screen-space version to play with.

The Material is not exciting:

The Monitor actor:

  • the plane serves as the screen while the sphere demonstrates this works for any surface
  • we create the widget whose canvas is Not Hit-Testable (All) by default and add it to viewport (it will not show because of the retainer), we grab the instance dynamic material from the widget (MID Screen) and assign it to the plane (and to the sphere, to show off)
  • clicking the actor flips the retainer rendering mode, we set the canvas to be NH-T (Self) only - other elements placed there can now be interacted with


Project:


Not sure if this kind of interaction is possible with a widget component. It should but probably is not for reasons I don’t undertand. If there’s a method that can utilise CanvasRenderTarget2d, someone please let me know.

ok so because i have a widget switcher where do i put the retainer box. Also I took a shot in the dark with everything and the plane was this green swamp texture and i couldn’t interact with anything. I checked to be sure if i set the visibility to not hit testable, but it was and i don’t know what i did wrong so i guessed it was from the box component.

Make the retainer the root, the top of the hierarchy and attach switcher there.

The structure is: canvas panel->widget switcher->canvas panel and everything. I tried to make it the root but it didnt let me so i put it after the first canvas panel and before the widget switcher. Perhaps I can make a new widget with a retrainer box being the root and copy paste everything else?

Right click allows you to do funky bits easily:

image

Also as I have multiple canvas panels do I put all of them as main canvas panel, or the canvas panel containing the widget switcher… or just self?