Sunday, 3 March 2013

Vertex Painting

Up to this point i was planning to use decals (flat plane with alpha map) to add extra detail to the tiled buildings. However i have been looking into something called Vertex Painting which allows you to have 2 textures mapped to an object that you can paint onto the object live in UDK. After doing some research i've discovered that this is relatively simple to do.

Below is my test, i started off with a box created in Maya which was very basically box-mapped and exported as an FBX and then i created 2 tile-able textures in Photoshop; brick and cement. Lastly i created nomals and height maps for both of the textures using crazy bump. All at 512px.

I then brought all of the files into UDK and created a material. For this material i added a varity of nodes that  layers both textures onto the box, tiles them and creates an alpha map for blending.


With this material applied to my box i went into paint mode and was able to paint the cement over the bricks, vice versa, live within UDK. This is object specific which means that even if other objects are using the material the painting can be done seperately allowing for a variety of combinations, to really break up the tiling.



The only downfall i've found with this is that in order to vertex paint you must have vertices on your mesh, which means we cannot use the 1poly face boxes that we were planning to use. It works best with more sub divisions however i only took it to around 60 polys and it seems to work okay. Even though this increases our poly count i think it's well worth it and shouldn't make too much of an impact to our performance.

(update) Dani mentioned about the higher poly count being a possible problem, which is true. So therefore we thought it would be best to test it out and stress the system to see if it could handle the higher polycount. I duplicated the object a few times and tested the game to see how it would run.

Surprisingly well... with all the cubes in view, totalling at around 180k... it still runs at 50-60fps. So judging by this we shouldn't have any issues.



No comments:

Post a Comment