Home Unity

Unity Glows

polycounter
Offline / Send Message
Justo polycounter
Hey guys, I'm building this level, but can't find a way to do what my mind wants to do with the scene. Got any ideas?

Assets are placeholders.

WnqmOe7.jpg

5PQp9ZL.jpg


I tried adding a Glow component to some cells, but I can only get that glow to b spherical, and I think that causes problems and turns into hard edges where it collides with the ground mesh.

u9aMoXL.jpg

Got any ideas?

Replies

  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    Another problem with the glow component is that when you zoom in, it disappears. The third pic also has fog, but it didn't do much to help.
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    This sounds like an issue that could be solved with a shader. It should be possible to cook up a shader that adds a certain degree of self-illumination to an object whenever it is receiving light. This would probably achieve the effect you're looking for.
  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    Got any clues as to where to start from? I'm not very knowledgeable with shaders, I've only read the basic tuts. Needless to say, haven't got a clue as to where to start with this glow effect in shaders.
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    Sadly, no. I've only thrown together quick, basic shaders, mainly focused on layering multiple textures on top of each other. Your best bet is to start digging into the Unity shader API and any shader tutorials they have on the Unity site. Unity maintains a considerable amount of documentation, and the general specifics for the Shader scripting don't change often, so whats up there now should work.

    Even then you are going to need some practice and time to get the kind of effects you want. You need to ask yourself whether or not this is going to be worth it. If you expect to be using specialized visual effects regularly, it might be worth your time to learn shader scripting. In almost any game or rendering engine these days, shaders are how advanced visual effects are done. Knowing how to make them dance will empower you to make your game look however you want it to. If this is just a quick one-off solution, then learning any extra scripting syntax might be overkill.

    You can also check the Unity asset store to see if anyone else has posted the kind of shader you're looking for. There may be some free or cheap options there. It's the kind of thing that someone might throw up on the Asset Store for $1.
  • HowardDay
    Options
    Offline / Send Message
    HowardDay polycounter lvl 10
    Justo: So, The easiest fix is to take the glow shader that you have now, and add a "ZTest Always" flag to it. That flag should be added right below the "Blend" line in the shader. This will make the glow ignore the ground's Z sort value, and draw on top of everything. Now, it's entirely possible that this isn't what you want. If you want the glow to draw on top of *only* the ground, and still ZSort with other objects in the scene, you could try adding an "Offset -2,-2" Flag instead of the ZTest one. That will alter the z values of the shader to make the video card think it's closer to the camera than it actually is.
    Good luck!
  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    @Richard Kain:

    Thank you for the information, and yeah, I better start learning shaders. Thankfully there's tons of info in the internet, I'll start reading it and post my experiments. I'm still learning the basics with other stuff, as soon as I finish that I'll bump this thread with new stuff.

    @HowardDay:

    Thanks for the technical info, HowardDay. Like I said to Richard, I will start learning shaders and post my experiments here; I'm sure I'll be asking you insight in regards to Unity shaders. Right now I don't even know what a flag is, so I think it's a waste of time to be asking for solutions when I should be learning this from the ground up. I'm sure one of the first things I'll post will be something based on your feedback Howard =) Many thanks.
Sign In or Register to comment.