Home General Discussion

Unity shader, need help!

polycounter lvl 10
Offline / Send Message
Dantert polycounter lvl 10
Hi!
As a character artist I was suggested to learn Unity3d as a game engine.
I searched, studied it but I can't really find a way to have a material with at least diffuse, alpha, specular and normal input.
I always used marmoset and I love the freedom to have all the maps I want on a model but here I guess Unity is really limited, or is it just me?
I saw somewhere that to have a complex material you need to write it yourself but I coudn't find any tutorial on "how to".
I tried using the "transparency/cutout bumped specular shader" but I can't use the cutout if some parts have the specular black because the cutout masks everything that's black.
Does anyone know a good tutorial about creating and mixing shaders in Unity3D? Or someone could explain to me how to create my own shaders based on the preexisting shaders?
Thanks!

Replies

  • Shrike
    Offline / Send Message
    Shrike interpolator
    There are 2 ways right now, either wait for unity 5, or get shader forge for unity or maybe one of the other shader packs, unless you want to write code in HLSL

    The default shaders are unusable
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    Writing shader code to work in Unity is also a complete and utter ball-ache. Buying Shader Forge is probably the only reasonable option.

    ..or use a different engine with fewer annoying hoops.
  • MephistonX
    Offline / Send Message
    MephistonX polycounter lvl 9
    What you need is the skyshop plugin for unity, its made by marmoset and should have everything you need - http://www.marmoset.co/skyshop
  • stabbington
    Offline / Send Message
    stabbington polycounter lvl 10
    You can give this a try http://pastebin.com/61umeU4r just make a new shader in the project window, open it in monodevelop by doubleclicking and paste this over the existing code with this.

    The legacy shaders were built mainly for performance - this particular use-case really highlighting the worst of the concept by having two different maps arbitrarily rolled into one to save on having an extra texture at build-time. That said, though, the new Standard Shader in 5 will be much, much better and more flexible for this kind of thing.
  • Dantert
    Offline / Send Message
    Dantert polycounter lvl 10
    Thank you all!
    I'll take my time to try every suggestion you gave me.
    Another question, is it important for a character artist to know how to write shaders from scratch in unity(or whatever game engine your studio is using)? Or it's a job for programmers or other professionals?
  • stabbington
    Offline / Send Message
    stabbington polycounter lvl 10
    Shader coding is a very specific field in itself often with its own quirky languages and requirements, you'd usually have a specific programmer or TD for that job.

    I wouldn't imagine it's common for any artist to need to know shader code for employment, although it's a very good skill to have - most engines will have artist friendly shader editors, ubershaders, or ways of importing node graphs or code from more visual, less code-based shader building programs.
  • Dantert
    Offline / Send Message
    Dantert polycounter lvl 10
    Ok, thanks a lot! The shader you posted before is working great too! THANKS!!
Sign In or Register to comment.