The Summoning 02
|
This post will contain confusion and clarity about using Shader Forge and shaders in Unity. For you who are not familiar with Shader Forge it is a plugin for Unity that will allow you to build and making your own custom shaders to get the look that you want for your game. For our game we want to have a texture that are familiar to ink on a parchment paper. Therefore we decided to try Shader forge and build a shader that will satisfy our needs. Of course I was a bit navie and thought “how hard could this be!”. Well…as it turned out it was not easy at all. I have used a nodebased program before called Nuke. That program used easy to understand nodes like blur, roto, etc. This one used nodes like lerp, append and so on that I’m not familiar with at all. I found a tutorial that I followed that would make the result similar to the high pass function in Photoshop that will make the edges in the assets detected and make the picture more crisp. By doing it in Shader Forge it would help to make outlines that I could adjust to get the right thickness for the assets to get the artsyle that we wanted. ——- After a long time experimenting by using different nodes I manged to get the outlines and also a texture on everything. The problem now was that it looked okay but did some weird things when the camera moved. I think this problem was caused because the shader looked for edges and the highpass that was done. So when the camera moved the shader found new edges to detect and render. This made the interface look all black in some places and create like a black and grey halo around level. When the camera didn’t move it was sort of the result that we wanted but still with a lot of small problems that I didn’t know how to fix. One other point was that I did the shader as a post effect which means that it will cover everything else that had been made before. So it didn’t matter what materials the assets had before it would still cover it. This is something that I didn’t want. So it was just going back to the drawing board and try and find another solution. I did some research and decided to look for toon shaders and cel shading that were close enough that we wanted for the artstyle and I found a free shader from Unity’s asset store called Toon Shader. This one worked for the outlines a bit. It didn’t detect the corners of the objects so it looked bad when the value of the outline increased and became thicker. After a day of research for both shader forge and other solutions to still try and make our own shader that would work I came to a conclusion. With the amount of time that we have on this project and that I didn’t want the programmers to have more work then they already did so I decided to buy a shader from the asset store. This shader was expensive but with a standstill in the texturing/shader stage I thought it was the closest one to want we wanted. This shader was called Hand – Drawn shade pack. This one included shaders like ballpoint pen, sketch and what I looked for; ink. The hand drawn shader worked as we wanted and gave us outlines but also a fill that made the assets look like it has been drawn with different types of values with the ink. This shade also gave us the ability to have the outlines and at the same time give color to certain objects. In the end all of the three shaders were used with an expection that the original shader I did in shader forge were reduced and modified to only three nodes. The shade forge was used for the terrain and made for the overall look but only with the parchment texture and not the outlines. The toon shader was used as the outlines for the terrain. The rest of the assets used the hand drawn shader pack. I apologize to not have any pictures to show the progress this time. I got caught up and tried to fix the problems so that the documentation was forgotten in the process. This photo shows the end result at least.
|
