Animal Crossing Seasonal Shader

Ever wonder how Animal Crossing changes the colors of the environment throughout the year? Neither did I! I always figured it just set a color/texture based on the current day, and while that’s kind of true, it’s super cool how they did it for New Horizons!

I have a project where I was recreating my Animal Crossing: New Horizons island as a VRChat world. Somebody had ripped all the models and textures, and going though them I realized that materials are going to need more than just a standard shader. It took a while but I was able to reverse engineer how the shaders work based on the textures provided, and it’s really cool!

I ended up with several materials, depending on the object. Buildings, fences, paths, objects, terrain, all have slight variations on how they handle their shader.

Seasonal materials

These are the materials/shaders that change their color throughout the year. The secret lies in a 2d look up table, which seems to be called a grid internally, with the x axis being the gradient lookup table/color palette to apply colors to objects, and the y axis being the different luts to apply throughout the year! Then each object has another greyscale texture, which goes through the x-axis lut to get the proper color. By changing the y axis value based on the time of year.

Below is the grass’s grid texture, and the greyscale used to pick the colors from it, at least for the triangle part (it’s part of a larger mix texture for the whole grass).

As you can see in the video below, as the season goes from 0-1 (y axis), it changes the colors the greyscale texture applies (x axis)

The changes are rather abrupt from section to section, but the filtering of the small texture gives some smoothing between the grouping at inbetween values. Neat.

One interesting note is that the greyscale textures needed gamma correction to get the proper colors. I was having issues with the colors being slightly wrong, more dark than they should be. On a whim one night I tried gamma correction not thinking it would work, but hey it did! I’m guessing this happens because of some Unity backend stuff, I’d guess AH:NH’s render engine doesn’t need to do this.

Customizable Materials

There are lots of items in the game that can be customized to edit their appearance. Their materials are pretty similar to the seasonal shader as well! Instead of having seasonal color palettes though, it has discrete colors for each customization option.

Below is the (rather blurry) grid texture for an imperial fence. Each line of pixels represents another color scheme that can be applied to the item with customization.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *