How can I draw Image to the 4 Points

I’m making an arrow widget that shows the direction of the wind.

I want to transform a single 2D arrow image into an arrow with perspective.

Project a 3D space points, convert it to a 2D points, and draw an image on that points.

Is there a function like wrapPerspective in Opencv?

yes… Create a quad mesh in any 3D Modeling application… Do not use the UE native Plane for that, cause it has way to many Polygons for such stuff.

Your Quad should only contain 4 vertices, triangulate into 2 faces… Or 1 Quad Face.

Your UV should just cover 0…1,0…1 completely… By default, any 3D modeling application should do that automatically when creating a Quad Mesh.

Import it into UE as static mesh.
As Texture, simply use a 2D arrow…

Create a BP Actor with static mesh component, using your Model. Make it face the Windows- direction… Since you asked for, how to draw a 3D Actor in 2D Space, i thinking you’ve already done that.

All you now need is to draw your Actor inside a Widget for UMG. This is kostely done with a sceneCapture Cameras and a Render Target Texture… That render Targeting is than used as Texture of an image.
Newly tutorials can be found, where people use depthtest to masked out the Actor without a “greenscreen”.

Here is an example tutorial:
one of a thousand ones…

I would recommend to search through YT… You’ll find maaaany… Of tuts our there, doing that stuff.

1 Like