Yes. You can use the more flexible ‘begin’ and ‘end draw’ nodes. I also created a BP macro to help specify the coordinates for the draw event since otherwise you will have to manually convert into the render target space. The node is called “Set Canvas Material Scale and Position”.
Actually I just realized that even that macro is set up to only work with squares since the ‘scale’ input is a float. You could just open the macro (its a content macro) and change the “Scale” input to be a vector2d and it should work like you want.
Also for some reason i can’t seem to find that Project setting that he enabled in order for the Find Collision UV node to work. Anyone remember what it was called and where it was?
Edit: Nevermind, found it under Physics: Support UV from Hit Results hehe
[QUESTION] Is it possible to project a texture on a surface using Draw To Render? I don’t want the texture to be perpendicular to the surface, it has to be aligned with the player’s point of view. Which means that image would always look the same no matter what angle the player is looking, while the surface that is being projected on to is not adjusting its orientation to the player’s camera.
The draw material to RT feature wouldn’t really come into play there. You can just use a decal attached to the players camera or you could use a custom projection pixel shader using a bounding box.
I tried the decal, but it didn’t work as I needed more control. I am working on a custom shader but it’s getting too complex that I’m pretty sure that there is a simpler way to do it. How would you approach the custom projection pixel shader? Can you give some quick pointer of the functionalities you would put together?
I would just use a bounding box and then the “Worldposition behind translucency” node. then you would subtract ObjcetPosition from that… then you would do “transform to Z vector” where the (worldposbehindtranslucency-objectpos) is the value to transform and the actor’s forward vector will be the Z.
If you use the matrix3x3transform nodes it will give you the ability to control the yaw as well.
I would make a simpler test case that just calls Draw where the material is set explicitly. The only page in your video that showed the draw event had a texture reference that was set to None which I assume was set elsewhere, but it makes it a bit too complex for a debugging case.
I’ll see if i can simplify, but actually after reading over some notes, it says that drawing on a render target that is being sampled as a texture by the material i use, won’t be possible. So maybe that’s just what im hitting here… Anyway i’ll see if i can do something completely simple
Yes, if you are wanting to write to and read from a RT, you need to have two of them and you need to ping pong them so that you only write to the one that isn’t currently being read.