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

Transparent by Collider..need help

Discussion in 'Shaders' started by aanimation, Oct 24, 2014.

  1. aanimation

    aanimation

    Joined:
    Oct 23, 2012
    Posts:
    49
    hi..i need a help how to make it work..
    transparentHelp.jpg
     
  2. drudiverse

    drudiverse

    Joined:
    May 16, 2013
    Posts:
    218
    you can't do it using the collider info which isnt sent to the shader, if you have a sphere with a mehs collider it perhaps can be done using transparency settings, i dont see how though. to make a transparent round area you can do a loop of 1-10 moving circles around cubes if you want, which will set alpha of plane at zero near any of 10 vector3 that are sent to the shader.
     
  3. aanimation

    aanimation

    Joined:
    Oct 23, 2012
    Posts:
    49
  4. drudiverse

    drudiverse

    Joined:
    May 16, 2013
    Posts:
    218
    if the plane is always flat you can maybe use a circle mesh that follows the box, and there may be an option in shader blending (See blend page) that can make both transparent if one is on other. if you can manage that then the circle option is the best.
     
  5. aanimation

    aanimation

    Joined:
    Oct 23, 2012
    Posts:
    49
    the plane is always flat, may you can send me an link to help me
     
  6. drudiverse

    drudiverse

    Joined:
    May 16, 2013
    Posts:
    218
    Okay sorry i didnt check my msgs, was working on other things.




    there are 2 of these vids


    You need to look at shader blend mode page
    http://docs.unity3d.com/Manual/SL-Blend.html


    http://answers.unity3d.com/questions/316064/can-i-obscure-an-object-using-an-invisible-object.html


    your question is actually this:
    How do i make parts of a mesh invisible when they are seen through another mesh.

    ... basically, if you have a round cirle with alpha zero, you can make the background object invisible with one of the blend modes, like 1-source alpha i dont know the details.

    i know i would use the method with a loop that makes alpha = zero if distance to list of points smaller than radius. its abit complex but at least i know how to do it and, your flat thing should manage 100+ invisible round bits in a loop on pc easy, dunno about mobile, at least 10-30 id think.

    blend version maybe ask a new question to get details.
     
  7. aanimation

    aanimation

    Joined:
    Oct 23, 2012
    Posts:
    49
    actually im build an moba game, like LoL, i know little about unity networking, and photon networking solution.
    in this case, ill be using it to FogOfWar/DarkMap.
    thanks @drudiverse i found video www.youtube.com/watch?v=yzcfTb9e0lo, and im trying to make it as own solution.
    but im not sure if this video are best solution