November 2019 W3: [Test_Graphics] Shader and Graphics Research
I apologise for the late arrival of this blog post, the end of last week was a little bit hectic for me, and left me without time to write this up.
Week 3 was all about research and learning the topics surrounding graphics and aesthetics for me. This meant lots of new information about shaders, mesh generation, volumetrics, post processing, and render pipelines. It was sometimes a little bit overwhelming, but overall a great learning experience.
I feel pretty confident in saying now that I've got a basic and functional understanding of shaders and how they work, though there's always significant room for improvement.
Also with this blog post comes a project name change. There are various reasons behind the decision to switch names, but (as you would know if you're here) the game now goes by the name "Project Astraeus", which I'm actually quite partial to.
The Results
In line with the topic of this week, the results themselves are quite shiny. I had a lot of fun making these and tinkering with values until they looked right.
Grass
The first task I set myself was remaking a grass shader since the old one was removed from the Unity High Definition Render Pipeline. This didn't take too long, mostly because I used various tutorials to understand the concepts behind shaders for this.
5 different grass formations |
I built 5 different possible meshes for grass clumps, to see what looked best. Obviously keeping the poly count low is extremely important, as grass is a mass used detail.
In order shown above, the layouts and their plane counts are: random (5), star (3), vhash (10), vcross (4), inverse pyramid (3).
The prefix v on the hash and cross means that the planes are partnered and offset by a small rotation, so instead of a single straight plane, you have two slanted planes forming a V shape. This helps to mitigate the low poly look while the camera is directly above the grass.
Grass from above |
1, 2, and 3 were immediately eliminated from consideration. The first looks odd, the second is too obviously 2D when viewed from above, and the third is far too regular looking - like it was built rather than grown.
Of the last two, both are relatively low poly at 4 and 5 respectively, and both look relatively good. However, I decided on using the 5th in future, as the rotation and irregular angles made it look more natural.
Water
I wanted to figure out water fairly independently, as I figured the grass shader had given me enough of an understanding that I could work this out on my own. I mostly succeeded in this, needing only some vague inspiration from how others make their movement, as well as some research into how to simulate edge foam.
A lazy sunday afternoon |
The water shader features rippling, and reflection which are shown above. It's also capable of edge foam, and waves:
Edge foam and waves |
While I think the water can look really good in the state it's in, it has a few limitations:
The first limitation is that it's not really moving, and thus can't be used to simulate bouyancy or move characters who are swimming. This is fine for Project Astraeus, but I may need a physical wave solution if I ever decide to work on something that requires objects to float in wavey water.
The second limitation, and the one that annoys me the most, is that the normals that make the rippling effect really mess up the reflection algorithm. If the normals are present, it very often reflects weird parts of objects in weird places. It does still look pretty, but also odd.
I may eventually find a way to fix this issue, but for now I'm stumped.
Week 4
Over the next week, I'll be looking at volumetric shaders and potentially using 3D Perlin noise to generate passable clouds. I'd really love to be able to integrate clouds with a dynamic weather system at some point, as I think that'd look really spectacular.
Comments
Post a Comment