Search Unity

How do I get the most out of using materials?

Discussion in 'Editor & General Support' started by TomBrien, Apr 28, 2012.

  1. TomBrien

    TomBrien

    Joined:
    Apr 28, 2012
    Posts:
    111
    Hey! I just joined. I'm one of a million people moving into Unity from Flash.

    As I'm doing that I'm getting back into 3DS Max again, and I'm not doing GREAT, but I'll start small. The point is I'm fooling around with materials in 3DS and there's all this gradient control on how light turns into shadows, and how one bitmap fades into another, and how colour is self-illuminating in THIS amount of light but not THERE and so on.





    (I'm just showing you what I mean, I know this is crummy draft stuff)

    Then I Assets>Create>Material in Unity and it's just- pick a diffuse jpeg, a bump one and a specular one.

    I'm new to the world of materials and shaders and using Unity, so where do I start and what should I be looking at to make things possible?
    I FEEL LIKE this is a coding thing that's completely out of my league, but I've been making Flash games up until now so I have no idea.
     
    Last edited: Apr 28, 2012
  2. JRavey

    JRavey

    Joined:
    May 12, 2009
    Posts:
    2,377
    Writing Shaders is a coding thing, but take a look at Strumpy's Shader Editor and you can learn a lot about how they work by playing with it.
     
  3. TomBrien

    TomBrien

    Joined:
    Apr 28, 2012
    Posts:
    111
    Hmmm...



    Alright thanks! This seems really difficult to understand, but also seems like what I was looking for. Maybe I'll figure out enough of this terminology over time to actually make something.

    EDIT- Figured out how to apply image textures, sweet!
    I THINK I've figured out how to get a property of the shader to change it's value based on how much light's hitting it?



    If I'm on the right track, and anyone can tell me how I can get a diffuse texture to become transparent based on how much light's hitting it, that'd really clue me in to what I'm doing here.
     
    Last edited: Apr 28, 2012
  4. JRavey

    JRavey

    Joined:
    May 12, 2009
    Posts:
    2,377
    I would start with alpha diffuse, them measure the light hitting it and apply that value to the alpha of the materials texture. You will need some algorithm for deriving the alpha from the light. I wish I knew more, but there is a shader section of the forums, they can probably provide useful info.