Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

A [FREE] Monument Valley style shader

Discussion in 'General Discussion' started by JamesArndt, Aug 11, 2016.

  1. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    I would have just kept this thread buried elsewhere on the forum, but considering the popularity of the art style I thought it would benefit a decent amount of folks here.

    Very nice Monument Valley style shader for Unity.
    https://gist.github.com/bcatcho/09509e31b9cbf24c39ea

     
  2. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    The popularity .. of a gradient?
     
    theANMATOR2b, JamesArndt and Martin_H like this.
  3. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    Actually yeah, you basically filled in what I would have said. Simplistic, minimalist art style....a simple gradient. It could be something as simple as a gradient, line width, color palette, and a million other aesthetic things. I take it you are not artistic and come from a programming background? You have to be able to envision what you can do with a simple gradient!
     
    zoran404 and Martin_H like this.
  4. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,968
    Cool! Thanks.
     
    JamesArndt likes this.
  5. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,912
    Yeah man no sweat. I've seen this used as a really cheap way to do altitude based fog. Basically match the upper part of the gradient to the sky color, and the lower part of the gradient to the ground or the camera background color!
     
    Ryiah and zombiegorilla like this.
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,968
    You can also use it as a starting point for other effects. For example, in our game (Commander), we don't use lights, but we use a similar approach, but combining it with the models texture to get nice atmospheric effects, and match the planet's lighting.
     
    Ryiah and JamesArndt like this.
  7. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,968
    You beat me to it. ;)
     
    JamesArndt likes this.
  8. RakshithAnand

    RakshithAnand

    Joined:
    Jun 30, 2013
    Posts:
    56
    @JamesArndt Hey thanks for the shader! :) Looks great!
    Is this mobile friendly?
     
  9. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,739
    iirc the monument valley shader is not supposed to receive light, but instead have its own built in one's that are directional only.
     
  10. Deon-Cadme

    Deon-Cadme

    Joined:
    Sep 10, 2013
    Posts:
    288
    That game is really pretty :)



    That got me thinking, notice how they do a red gradient on everything that face the left side and a blue gradient for everything that face the right? Also looks like light is constant everywhere, maybe not so surprising when you think on how the world works :)
     
    JamesArndt likes this.
  11. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,739
    yeah different gradient based on what the normal facing is?
     
  12. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Maybe light is coming from bottom left corner or top left, with objects not casting shadows, and shadows from light are blue, or in Unity case the equator color of the ambient source is purple/blue, light is yellowish, and theres a gradient fog going from top (red) to bottom (white/null). The ambient occlusion map is showing a sort of warmth too in cavities.

    All that easy to replicate in unity except the gradient overlap in my opinion.

    Here's my hacked up attempt with just Unity stuff. :D

    upload_2016-9-2_18-2-53.png
     
    JamesArndt likes this.
  13. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    RakshithAnand, JamesArndt and goat like this.