Switch to vertex painting!
Hey everyone!! Happy new year!!!
Everybody had great holidays?
So, Recently I was looking at ways to optimize the game in terms of graphics in particular using decals for wall surface details. I used to have a lot of decals covering these walls to add details to them such as dirt at the bottom and top and other dirt collection on these walls. I wanted to find out the cost of these decals on terms of fps. I read a few posts all of which suggested vertex painting instead of decals. I've created vertex painted materials when I started out and I thought it takes up lot more resources. So, I decided to experiment with it myself and check the difference in performance. I duplicated the level mesh and subdivided it several times and added a lot more vertices (in multiples of thousands mind you). Then I imported it into unreal, created vertex painted materials. A vertex painted material means you give a color to each of the vertices and the material changes according to that color by layering and masking up to 4 different materials 3 for RGB and one for black.(theoretically).
For some reason unreal won't let me blend more than two material normal maps. So I blended two materials and a third only the color. Black colored vertices switch to the painted wall material, red colored vertices to brick material and green colored vertices to a darker shade of the painted wall with a bit of dirt (Blue is unused as of yet). Then I painted the vertices within unreal editor and removed all the decals I had before.
You can see the set up before and after the changes I made in the images I have attached. The result of this little experiment was huge increase in performance and lot less texture memory usage. The frame rate went from around 100 to above 130. I think the reason for the increase in performance is the shader complexity of the decals. As you can see in the screenshots named Decal_shaderComplexity and VertexPaint_shaderComplexity images, decals are lot more complex than the materials on the walls even with vertex paint calculations. It also takes up less texture memory because of less decals and the lighting textures on these decals (I'm not yet sure if the lighting is baked separately for each of the decals I placed or it derives that from the mesh it is casting on). So for the past few days I have been switching the levels from decal-ed to vertex painted meshes! And you can see the changes doing that has made.
I'll be using much less decals and use much more vertex painting whenever possible as it gives more space to add other stuff to make the game look and feel better. Will be seeing you again in a couple of weeks! Have a great year!
Follow us here on itch.io and on Facebook!
https://www.facebook.com/madhatgamestudios/
Join us on Discord to talk to us directly!
https://discord.gg/h5THuw
Get Rebirth
Rebirth
This is just a demo version of our current project.
Status | Prototype |
Author | madhatgamestudios |
Tags | First-Person, Horror |
More posts
- Post Processing is the man!Nov 24, 2018
- Another small update after 14 days!Nov 17, 2018
- Just a an update of what's happening this weekNov 03, 2018
- Quality vs performance of the game.Oct 20, 2018
- Weekly update on our game RebirthOct 06, 2018
- Game level design and lighting progress.Sep 29, 2018
- Shooting and stuffSep 22, 2018
- Detailing the levelsSep 08, 2018
- Just Coding And Other StuffSep 01, 2018
Leave a comment
Log in with itch.io to leave a comment.