Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to achieve Overlay Blended textures for a 2d game?

Discussion in '2D' started by WeaveDev, Apr 8, 2015.

  1. WeaveDev

    WeaveDev

    Joined:
    Mar 27, 2015
    Posts:
    3
    Hi-

    I'm trying to overlay a texture on top of everything for a 2d platform game I'm working on. In Flash, overlaying textures is dead easy, and you can achieve most kinds of Photoshop style Blend modes. In Unity though, I haven't been able to find out much about how to go about this, and then the answer seems to be custom shaders, which are beyond my current experience.

    I've attached a few images- the first is an 'example scene'

    Second is an 'overlay weave' texture, which I wish to overlay (combined 'multiply' and 'screen' blend) on top of the example scene image.

    Third pic is a reference image which is the example scene combined with the overlayed texture on top, and represents the look I'm trying to achieve.

    If anyone with this kind of proficiency has the time or would like to take a look at this or offer some advice it would be really helpful (even to say, 'yes, this is possible')- I'm very anxious to get this graphics problem sorted as the game depends on having a specific look. If this is impossible within Unity, I'll have to move on to another engine or solution,

    Cheers (and looking forward to hearing from you),
    S Tozer (WeaveDev)

    stutozer@gmail.com
     

    Attached Files:

    Last edited: Apr 8, 2015
  2. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    434
    theANMATOR2b likes this.
  3. WeaveDev

    WeaveDev

    Joined:
    Mar 27, 2015
    Posts:
    3
    Thankyou Leo :)

    I had already checked this thread, and came away confused by it. Referring specifically to this post..

    http://forum.unity3d.com/threads/free-photoshop-blends.121661/#post-1117707

    The author says it's not possible to simply overlay a texture over whatever's under it (background) unless you use a renderTexture, which "could" work.


    then a few posts following-
    http://forum.unity3d.com/threads/free-photoshop-blends.121661/#post-1118585

    he says that to do this requires Unity Pro.

    So to clarify, I'm not looking to blend two textures together, but the result of the whole scene with another texture overlayed on top of everything. But this doesn't sound straightforward, or guaranteed, and will cost me money just to see if it 'might' work. And it's still confusing for a beginner. :(

    Since I haven't been able to come across the kind of thing I'm looking for, I'm assuming at this point that it's not trivial to do, and may not even work properly anyway. It would be great if someone could set me up with the most basic of sample scenes (they could use the graphics provided in the first post, or anything that gets the point across), which I could then take a look at- if indeed it's possible without spending money on Unity Pro.

    Cheers and thanks for your reply,
    Stu
     
  4. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Just to note, RenderTextures can be used with Unity 5 Personal Edition now.
     
  5. originalterrox

    originalterrox

    Joined:
    Feb 6, 2015
    Posts:
    40
    make on object and assign a Material to it, choose one of the Particle Shaders as the Material's shader instead of Diffuse. eg -> Multiply or Additive and pick some textures, put the object in front of something else and it will look like Multiply or Additive layer blend.
     
    theANMATOR2b likes this.
  6. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    Assuming you have a shader that performs the actual blend you want, why not just add a new camera, make sure it is rendered last, and it's view should contain only the blend texture (as cube or plane) with the blend shader.

    That way, all other parts will be drawn, and then on top of that the texture will be blended per the shader.

    Am I missing something?