Shader Forge: A Review
June 12, 2015 9:15 pm
As independent game developer, I’m familiar with the scenario where I need to do a little bit of everything. Sometimes I will work on level design, lighting, and sometimes materials. As you may know, I use Unity as my game development tool (I previously used UDK), and while it’s a very capable tool, sometimes it feels a little lacking in some areas, and one of those areas is shader authoring.
Unity ships with a wide variety of shaders, but in some specific scenarios, you may need to make your own shader. Unfortunately, making in Unity requires you to actually code those shaders. Luckily, someone made Shader Forge, a wonderful node-based tool for shader creation.
Shader Forge works pretty much the same as the Hypershade in Maya, the material editor in UDK, or the material editor in Poser. Basically what you do is to create and connect nodes to create the effects that you want.
The program includes different nodes, placed under different categories, so it’s easier for you to find the one you need. Alternatively, you can use the search box to write the name of the node you need. You are also given options to define platform compatibility for the shaders, so you can check that it would work on PC, Mac, mobile devices and consoles, or set it not to work in some platforms at all, in case you are using platform-specific features. For example, if you’re using DirectX 11 features for your shader, it will obviously not work on the Mac, iOS or Android. You can, however, use a “fallback” shader, so when a platform does not support your shader, it will use that fallback shader instead.
Advanced options for the shader include setting what rendering path or lighting method to use, depth sorting (useful when working with transparent objects), and also flags for setting it as double-sided, etc. This is where things can be tricky, as you can see, since it requires some technical knowledge as to what some of those options mean.
Creating New Shaders
Making a new shader is pretty easy. You just need to open the Shader Forge window and then click on the new shader button. The main authoring window opens, and you can start placing your nodes and build your connections. The top left corner shows a preview of your shader, so you can see your changes in real time, as you work (you can turn off real time updates, so it only updates when you click the button). A nice feature is the ability to use a custom model to display your shader. For example, say you’re working on a fabric material for your character’s outfit. You can load your model in the window, so your material is displayed onto your model instead of the default sphere.
There are "standard" nodes and property nodes. Property nodes define variables that can be seen in the Inspector, so you can change the value of those variables without reopening the Shader Forge window. On top of that, you can change those values using code at runtime (like changing the color or specularity of your material while the game is running).
The “lighting” configuration lets you set different properties that allow you to use different Unity rendering features. You can set what rendering path to use, lighting mode, and such. The last features allow the shader to be used in specific scenarios. For example, if your shader is for static objects, you can set it to use light maps, but if you plan to use it on characters or animated objects, you’d need to enable light probe support. These are a couple of examples that show you need to have certain technical knowledge about the rendering features.
When you have finished working on your shader, you get a code-based shader file. This means you can open the file in Mono Develop (or any programming IDE you are using) and modify it as you wish. As someone who doesn’t know how to code, I would advice against this (besides, why would you want to modify the code when you can simply re-open the shader file in ShaderForge and continue editing?).
Shader Forge is an extremely useful tool for creating shaders in Unity. Even if you are programmer, since it makes it very easy to make shaders in a very visual way, being able to see in real time how the different changes affect the final output. If you find making your own shaders can add more quality to your projects, you should definitely get ShaderForge.
Shader Forge is currently on sale at the Unity Asset Store for $90, but if you are patient you can find it for less when Unity has their 24 hour sales. Be sure to visit the main Shader Forge support site and the main Unity website. Unity is available for free. Be sure to watch the video tutorial from the Shader Forge creator, Joachim Holmer, for a guide on how to make a basic shader in Unity using Shader Forge.
Sergio Aris Rosa [nemirc], is Sr. Staff Writer for the Renderosity Front Page News. Sergio discusses on computer graphics software, animation techniques, and technology. He also hosts interviews with professionals in the animation and cinematography fields. You can follow him on Twitter, and if you want to see what he's up to you can visit his blog.
- Gallery of the Week for March 19, 2018 - Music Genre Gallery
- Anagord, All-Around Vendor of the Year Video Gallery
- Rookie of the Year, JaMaRe, Video Gallery
- News of the Week for Feb 26, 2018
- News of the Week for Feb 19, 2018
- Honorable Mention Award 2017 - fabiana
- Announcing the 2017 Renderosity All-Star Vendor of the Year & All Around Vendor of the Year
- Artist of the Year for 2017 - Nyala
- Gallery of the Week for Jan 22, 2018 - Science/Technology
- News of the Week for Jan 15, 2018