Shader Forge application of Unity3d engine

Source: Internet
Author: User

The author introduces: Jiang Xiewei, IT company technology partner, it senior lecturer, CSDN Community expert, guest editor, best-selling author, national patent inventor; published books: Teach You architecture 3D game engine, electronic industry press andUnity3d Actual combat core technical details of the electronic industry publishing house.


This blog to the reader to introduce a material rendering of the component-shader Forge, in the material rendering can play a multiplier effect, for many developers are not familiar with material rendering, more easy to use, in the application of the first to be a seat, the following first to the corresponding Shader The forge version is presented to the reader as follows:

1.3.0 (Support u3d5.5)
1.2.8 (Support u3d 5.4)
1.2.7 (Support U3d 5.3)
1.26 (Support U3d 5.3)

Once the corresponding version is downloaded, it can be imported directly into Unity Project, otherwise the shader Forge and Unity3d engine will appear inconsistent results.

Unity3d engine of the next generation performance is through the shader forge plug-in implementation, for the material rendering, the first to understand the role of each material, in fact, shader rendering is to add or multiply different materials, sampling and other operations completed, first of all to clear shader Forge provides a variety of materials, and then for different effects through the Shader forge editor for drag-and-drop, the editor will automatically generate shader based on the results of your edits, if you use unity to make the next generation game, you can consider using the editor, the disadvantage is very costly, But for beginners shader programmers or art is very suitable. The following first shows the various materials provided by the Shader Forge editor to the reader as follows, which need to be made clear by the developer.

Diffusion (diffuse)

This is the primary color of your shader, the diffuse color will receive the light, the light is weakened depending on the light-normal angle, shaded by the shadow.

Dispersion Force (Diffusepower)

This is the exponential descent of the light-normal angle, which can be used to obtain additional metal using values higher than 1 o'clock.

Mirror (Specular)

This is the color of the material's highlights, the higher the value is the brightness, the black does not affect the material.

Gloss (Gloss)

This is the high-light index, the higher the value will make it look shiny, the value of close to 0 will make it look matte. Note that if you have an matte remapping, you should avoid using gloss values below 1.

Regular (normal)

This is the tangent normal direction, you can connect the normal map or the custom normals vector.

Launch (emission)

This is just light that is always added to your material regardless of lighting conditions.

Transmission (transmission)

The light behind the light surface that will pass through this control is currently rendered. This can be used in thin materials such as cloth or vegetation.

Light Packaging (lightwrapping)

This is a method of controlling the light-normal angle drop cancellation, which can be used to obtain an effect similar to subsurface scattering. Most suitable for smooth objects. Entering the Red-ish value causes the red channel to "surround" the object beyond others, making it appear as if the light passed to the mesh, and a red wavelength comes out, similar to skin coloring.

Scattered ambient light (diffuseambient)

This increases the light material and is affected by your diffusion. You can use, for example, cubemap to use the normal direction (IBL) of image-based illumination, or ambient light

Specular reflection ambient Light (specularambient)

This increases the light material and affects your mirror. You can use, for example, a cubemap to use a view as an image-based illumination reflection direction (IBL)

Custom Lighting (customlighting)

This input is active when your material is not glowing, allowing you to define the behavior of custom lighting. You put the node per-light here.

Alpha (Alpha)

Alpha controls the transparency of the final pixel. Note that local transparency is often critical, especially when using deferred rendering.

Alfa Clip (alpha clip)

The Alpha clamp is a control if the current pixel/fragment should be drawn. Always use alpha clips to require transparent objects, rather than partially transparent, alpha clamps are easy to sort, alpha is not.

Refraction (refraction)

Refraction is the refraction UV offset screen background pixel. Make sure you set the following α,1 before use, so the refraction effect is visible. Note that this effect requires a uniform occupation. Although it looks as if it works in the Unified free editor, it won't work in a no professional building

Contour width (outline width)

This adds an outline of your material, rendered as an offset to the mesh that reverses the face normals. Note that hard edges will break the outline.

The color of the contour (OutlineColor)

This controls the color of the contour.

Vertex offset (vertexoffset)

This can be used to activate shadows over time, or to change the shape of an object in various conditions. You simply insert the XYZ coordinates for each vertex that should be offset.

DX11 Displacement (dx11 displacement)

This work is very similar to the vertex offset, but used by the DX11 checkerboard pattern. (Note that lifting is just a window, need to enable DX11 GPU, unified)

DX11 Checkerboard Pattern (dx11 tessellation)

These materials can be used in different combinations to complete all the material rendering, including the next generation of rendering effects, the following to use the editor to show the reader as follows:

If the use of materials such as diffuse,normal,specular, can also be implemented in this way, the material can be different combinations, so as to achieve different effects, readers can download themselves.

Give the reader a look at the back of the rendering.

Shader Forge application of Unity3d engine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.