Let's Fake It! - Vertex Colors and Nanite

Let's Fake It! - Vertex Colors and Nanite

What are vertex colors?

Vertex colors are a very old way to handle different things. It allowed us to add colors into meshes in the early days of 3d graphics. Mobile games utilized them a lot and there are even different visual styles that are heavily relying on vertex colors like the famous “low-poly” style. In the basic form, every vertex can contain RGB and Alpha values and these values are then interpolated together. That’s why vertex colors are used to add gradients and very low frequent details that would not be dependent on limitations that would be there with approaches like texture mapping and such.

No alt text provided for this image
This cargo container uses vertex colors to blend different material layers (Green & Black) and rust/damage (Blue).
No alt text provided for this image
This is how it looks in Unreal Engine 5.1.

Why use vertex colors?

Advantages

Like mentioned before, 3d models consist of vertex data so it might be handy to store some color information with vertex colors. That vertex color information can be used to drive and mask different effects like grass wind, damage, dirt, material IDs etc.. You can even bake down light information like ambient occlusion, shadows, GI… Vertex colors can also reduce the amount of textures we need to use. That will help to optimize texture lookups, memory footprint and overall complexity because all of the data is already stored into a specific mesh.

Disadvantages

Obvious problem or limitation with vertex colors is that the accuracy is bound to the amount of vertices that specific mesh contains. That means you can’t store complex, accurate paint data into low poly meshes. Very high-poly meshes like ZBrush sculpts can have accurate vertex colors but the memory footprint is also very notable. That’s why we usually need to create a mid or low poly version of that by using various retopology workflows or simply decimating that mesh down into a simpler form. Basic real-time engines usually also need to use the LODs (Level of Detail) versions for optimization reasons. That will drop the polycount event further down based on distance or screen size. This will once again drop vertex color accuracy that can appear as a very noticeable popping.

No alt text provided for this image
This asset consist of hundreds of instanced Nanite meshes that each uses vertex colors to blend materials and add damage & dirt.

What Nanite allows us to use?

Advantages

More polygons means more accurate meshes. That also means meshes will contain more vertices so we can paint more accurate vertex colors. Nanite allows us to use that inside a real-time engine. This will help to solve most of the issues that we would have otherwise with vertex colors and game ready meshes. We can now use very dense meshes and paint details like edge damage, dirt deposit that can drive various effects in materials. This way it’s possible to avoid using specific, per object texture masks. It’s also possible to automate vertex color generation and store information into r, g, b and alpha channels.

Disadvantages

Nanite is still needing to handle polygons and sort them into different clusters that it will then handle based on camera distance. That’s why we will still be able to see some vertex color popping but the more hi-poly your Nanite mesh is, the less you will be able to see because the distance between vertices is much lower.


That's all for now. Stay tuned for more!

You can also find me here!

UE Marketplace?Artstation?Twitter?Facebook?Youtube

Dan Sandberg

CEO | Creative Director

1 年

I've been playing with this lately, I'd love to hear about your workflow for baking your vertex color masks to the mesh and your material setup for the blending in-engine. Unreal's modeling tools' vertex baker is fast and easy while iterating on meshes, but very basic (just ao and curvature). Being able to use something like substance painter to make more detailed masks with higher quality edge/cavity /etc bakes and grunge treatments would be far better if possible. Material wise I've stuck to simple blending, but I'd like to see if a material layers setup is worth the extra draw cost as well.

回复

要查看或添加评论,请登录

Kimmo Kaunela的更多文章

  • Creating of a Zero Gravity Environment

    Creating of a Zero Gravity Environment

    I wrote this article years ago when I created this sci-fi environment. During that, I studied how the PBR workflow…

    2 条评论
  • Creating immersive VR experiences Part 1

    Creating immersive VR experiences Part 1

    I wrote this article few years ago when we were developing a VR game. It was a huge learning process to first figure…

    2 条评论
  • Let's Fake It! - Working With Landscapes

    Let's Fake It! - Working With Landscapes

    I′ve been working with landscapes a lot. Its interesting area and very hard to get right.

    2 条评论
  • Let's Fake It! - Pipe Generation System

    Let's Fake It! - Pipe Generation System

    Main concept Creating pipes is something I have to do a lot. I really don’t know why I always end up doing that so much…

  • Let's Fake It - Spline Based Systems

    Let's Fake It - Spline Based Systems

    In this article I will share some generic info about spline based systems. This article will focus on the Unreal Engine…

    6 条评论
  • Let's Fake It! - Scattering Systems

    Let's Fake It! - Scattering Systems

    In my previous post, I shared some information about mesh instancing and I think it would be useful to show how you can…

  • Let's Fake It! - Mesh Instancing

    Let's Fake It! - Mesh Instancing

    Main concept Mesh instancing is a good way to optimize draw calls, in theory at least. I won’t go too deep into…

  • Selling on Marketplaces

    Selling on Marketplaces

    I’ve noticed that many artist out there are starting to create content for various marketplaces. I have some experience…

    5 条评论
  • Cyberpunk City - Breakdown - Unreal Engine 4

    Cyberpunk City - Breakdown - Unreal Engine 4

    I visited this older project that is using lots of different, generic blueprint systems that I created. Get this whole…

    2 条评论
  • Post Apocalyptic Refinery - Breakdown - Unreal Engine 5

    Post Apocalyptic Refinery - Breakdown - Unreal Engine 5

    This time I will breakdown one of my latest project. Get this whole project here :https://www.

    2 条评论

社区洞察

其他会员也浏览了