Home Technical Talk

Shader Fusion - Node based shader editor for Unity (Closed Beta)

polycounter lvl 18
Offline / Send Message
commander_keen polycounter lvl 18
Shader Fusion is a node based shader editor for the Unity3D game engine. It allows the user to create extremely complex shaders and effects in a flowchart-like environment. Anyone who has used the Unreal Engine 3 material editor or Mayas HyperShade should be very comfortable with it.
unitymaterialeditor06.jpg

I have finally got a beta package to distribute to beta testers. I already have a few testers but could use a few more. For anyone beta testing, it would be great if the testers could send me (or post here) shots of some of the stuff they make with it to help promote the software ;)

You can apply by sending me an email at the address on my website in my signature. Include your portfolio if you have one and the intended use(group project, commercial, personal, etc).


Heres some example shaders created with the editor:

Planet Shader
earthcomp01.jpg
WebPlayer

Procedural snow placement
unitymaterialeditor07.jpg
WebPlayer

Here is the current list of nodes:
Texture - A texture.
TODO: CubemapTex
MainTex - A special texture with a perperty name of "_MainTex".
Lightmap - A special texture used for lightmapping.
Number - A constant single Number or float value.
Color - A constant color value.
Vector2 - A constant Vector2.
Vector3 - A constant Vector3.
Vector4 - A constant Vector4.
Add
Subtract
Multiply
Divide
Fresnel - The "facing ratio" of the surface.
Highest - The highest of 2 Number values.
Lowest - The lowest of 2 Number values.
Lerp - Blend between 2 values based on a 0-1 range bias.
UV1 - Main uv channel.
UV2 - Secondary uv channel.
VertexColor - Vertex Color channel(Vector4).
SurfaceNormal - The normal of the surface in object space.
ViewDir - The unnormalized view direction.
LightDir - The light direction.
Time - Time in seconds(I think) that the game has been running.
DisplaceOffset - Calculate the parallax offset for uvs based on height data. add this to your UVs before plugging it into a Texture node.
Vector.X - The X component of a vector.
Vector.Y - The Y component of a vector.
Vector.Z - The z component of a vector.
Vector.W - The W component of a vector.
Vector.XY - The X,Y component of a vector.
Vector.XYZ - The X,Y,Z component of a vector.
NumberToVector - Creates a vector with a length matching the number of connected inputs.
ElementOf - The element of a vector matching Index (Vector[index]).
Abs - The absolute value of a number.
Distance - The distance between 2 points.
Normalize - Normalize a vector.
Power
Floor - Round DOWN to the nearest whole number.
Ceil - Round Up to the nearest whole number.
Cosine
Sine
CrossProduct
DotProduct
SquareRoot
Fmod - I have no idea what this does :)
Frac - I have no idea what this does :)
ParamNumber - A Number value that you can change per material(or through code).
DOTO: ParamColor - A Color value that you can change per material(or through code).
DOTO: ParamVector2 - A Vector2 value that you can change per material(or through code).
DOTO: ParamVector3 - A Vector3 value that you can change per material(or through code).
DOTO: ParamVector4 - A Vector4 value that you can change per material(or through code).
Transform - Transform a vector based on a matrix.
ObjToWorld - ObjectToWorld transform matrix (as Vector4x4)
ObjToWorldV3 - ObjectToWorld transform matrix (as Vector3x3)
WorldToObj - WorldToObj transform matrix (as Vector4x4)
WorldToObjV3 - WorldToObj transform matrix (as Vector3x3)

Replies

  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    one gets some authorization warnings when opening this thread.
    maybe you linked to an image in the closed area?

    a list of "node types" would be nice, as well as "base materials"
  • Lamoot
    Options
    Offline / Send Message
    Lamoot polycounter lvl 7
    None of your examples show up, only a username-password authorization pop-up.
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Bah I added password protection to my website root :/ Fixed now :P

    EDIT: Anyone using the beta and has their windows install language set to something besides english will probably have problems loading and saving shaders. This should be fixed soon.

    EDIT2: fixed the loading and saving problem and send new link to everyone(I think).
  • Funky Bunnies
    Options
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    This looks sweet, man
    any chance we can get a node list and so on?

    I've been toying with the idea of using unity with a friend. I'd love to give it a whirl if I can
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    Way to go man! It's something that Unity really needs. Hopefully we can have thumbnails on the textures later on?

    Great job!
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    nice, i'd suggest to add:

    * "SinCos(a)" because generating cos and sine of the same input is faster than individuals. And typically you want both for stuff like rotation
    * "Step(a,b)" allows compares ( a <= b ? 1 : 0) which is really useful.
    * "Sign(a)" returns -1,0,+1 depending on sign

    frac = fractional part of a number as in 5.123 -> 0.123 (same as fmod(a,1))
    fmod = float modulo as in fmod(a,b) = remainder of a/b, fmod(4.5,2) -> 0.5 , fmod(7,6) -> 1

    in general two things would be nice in the long run, when working with such networks:
    - grouping functions, that is you can define something like a function using a sub-network, and then can instantiate that network (and load into a new shader...). that way one could assemble new nodetypes from other nodes...
    - manual code block, where you define inputs/outputs but the actual code is written by oneself.
  • Davision3D
    Options
    Offline / Send Message
    Davision3D polycounter
    I hope you can easily fix the bug related to a different language windows version.

    A node that simply inverts would be a very usefull addition, like oneminus in the unreal editor. And a saturate node would be also very cool.
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    CrazyButcher, Thanks, I will add those. I will look into nested node networks. A custom input node shouldnt be too hard to do.

    Davison3D, you can invert using a subtract node and set the A input to 1. but I agree that I should add a OneMinus node. Saturation is something I want to add.
  • Davision3D
    Options
    Offline / Send Message
    Davision3D polycounter
    Cosine and Sine seems broken! Cant get it working.
    Also alpha blending is bugged, i know that you know that already but just so nobody is wondering here why they cant get it working right.
  • skylebones
    Options
    Offline / Send Message
    skylebones polycounter lvl 10
    This is seriously cool. I haven't had much time to mess with it because my current project is in the modeling stage. But from what I've done so far, this is is a life saver. Mega props man. Hopefully I'll have some stuff to post soon.
Sign In or Register to comment.