Announcement

Collapse
No announcement yet.

Static Background Masterial Aligned To Camera

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

    Static Background Masterial Aligned To Camera

    Because I never do things the easy way I'm trying to produce a particular effect where a static background image is used to provide tone and depth to a foreground that's basically a sketch with a screen effect to knock out the black lines. The level of opacity would provide context for depth as well as indicate objects that are more or less worth the player's attention. Characters and important tells like impact effects would be given more pop by having their whites completely opaque, and when things need an extra push their black outlines could be used to further darken the background immediately behind them.

    EXAMPLE!
    Click image for larger version

Name:	example.gif
Views:	1
Size:	685.0 KB
ID:	1146144

    My question is two fold though if I'm not asking enough questions or the right questions please let me know.
    • How do I align an image to the background so that wherever it may move the image holds both a static position/scale/rotation relative to the frame?
    • How do you layout a graph that automatically masks objects when they overlap one another relative to the camera's position?

    #2
    Still working on this issue. Blueprint is seriously intimidating when you don't know what any of the parts do and lack the phrasing to find the answers you're looking for. I've got the feeling that the Absolute World Position is my best bet, but I'm still working on how to talk to it to see if it can do more than repeat an image as it's position passes its offset.

    Here's a less mobile version of the effect I'm trying to build:


    It's not the transparency I'm after, that seems to be easy enough building the objects out of materials. It's the static background image that's linked to the camera that... And it just occurred to me that I should just parent my background image to the camera. Wow I am an idiot. Even better, with the transparency depth sort it doesn't matter where the background image is placed in the world, it will always sort below anything with a higher priority.

    Still... This feels from top to bottom like the lowest hanging solution and that there's probably a more efficient and clever way of making this happen. Any ideas?

    Comment


      #3
      Try this -

      https://docs.unrealengine.com/latest...coordinate3way

      Comment


        #4
        Thanks for the lead TimeSpirit. The warning line reading "will cause the textures to "swim" along the surface" in what you linked me sounds promising, but every time I hook anything up to it I end up with errors. I've been poking at this for the past several hours, running down various threads and trying to figure out what the language is communicating. I know what the XYZ values are, but things like scalar don't really pop any light bulbs, I'm assuming it's the XYZ scale transformation info for the material, but that gap in understanding puts the breaks on a lot of my momentum. I'm not having much luck here but I'm going to keep trying!

        I did get a brief win in a 3D environment by linking the World Offset Position directly to a camera actor's reference in the material, but I don't know if that will translate into a 2D environment, and can't test it because I don't yet have a mobile camera. I tried it in the 2DPaper starter kit, but the camera isnt technically it's own thing to reference to. Hell the player object isn't either, which makes it kind of hard to reference as something to link a world position to without way more knowledge than I have currently. I can't even test the mobile transparency effect until I have a camera that can even move at the player's direction anyway, but that's going to require getting further out in the water where your legs can't touch the bottom. I know a lot of this stuff is probably dirt simple but without the ability to understand what I'm reading, or what it can or cannot link to, or the nature of the effects when it is hooked up, leaves me feeling like I'm assembling IKEA furniture.

        I been looking into reference mat and am thinking about using those to project into an alpha space of another object, and then using the world position of the original object for the texture coordinates of the projection. If I ever manage to get the camera moving and the original reference texture linked to it then it should technically propagate it's position down the daisy chain. I mean that's what my head says will happen, but then again my head said it should just couple the BG image to the camera by parenting it's sprite to the camera which wasn't even allowed as a searchable option, so my gut clearly can't be trusted.

        If I manage to figure this out I'll let you know.

        Comment

        Working...
        X