Monday, 22 December 2014

Xiahou Ba Rigging Failure #1

Now that I have started my Christmas holidays for the year, I have decided to proceed with the final stages of my Xiahou Ba project. This involves any ironing out of texture issues I may still find, but mostly rigging and rendering. I originally planned to be able to apply free downloaded motion capture data to this model from Mixamo to use simply to make my characters more lively, without having to go into the massive effort of animating myself; something that I am not great at.

To do this requires bringing in the motion captured file with my own project, and retargetting the animation from their skeleton to my own. The process sounds simple enough, but from my past work at university I already knew this would be a nightmare.

I set up both of the rigs as defined HumanIK rigs for Maya to reference, then told my character to follow the original animation of the imported skeleton. While this process worked, the results were far from satisfactory.



As you can see, there is a lot of stretching and generally broken animation here. It appears to fix this the model would have to be standing in the same stance as the rig from which the animation is being referenced. While this is not impossible to do, it will take a lot of time and possibly cause some problems, but it will be the next step now for this project. I would very much like to get this working as it should.

Monday, 1 December 2014

Xiahou Ba Test Renders

With the textures (probably) finally finished, I decided to do some render tests using Mental Ray in Maya 2015. The shaders are all mia shaders but his skin is not a sub-surface scattering shader because I was having issues trying to get him normal maps to render nicely on it. This is an issue I will spend more time with later on with final renders.


There are several things that need changing on these render, but very few of them now I think relate to the actual data he is created with, such as his model and textures. The faults are with the techniques I used for rendering each area of him, and am I aware this lighting setup has much to be desired also.

His eyes have lenses built over them as a separate layer of polygons; a standard practice in current / next generation characters. This 'lense' layer also have an alpha texture that creates a gradient from transparent black, to fully transparent. This simulates shadowing on the eyes no matter what angle you're at, giving them a deeper, more realistic feel. However, it might be that for proper renders (so not real-time, in-game scenarios), that this technique is not required. In this render it is present, but the way the lighting casts off of it gives the eyes a dull, dead look compared to what was desired. 

Also each individual shader was set up reasonably quickly, some of which using the presets that Maya provides for things like 'Chrome', 'MattePlastic', and so on. The downside to this is that some maps, often specifically the specular maps, haven't had much of a chance to shine. You can see them present in the shirt and shorts the most, but other areas such as the skin really needed them to have a boost. This render below does show them off somewhat better simply because he has no shirt on:

Saturday, 29 November 2014

Xiahou Ba Final Model Production

Over the past week and a lot over this weekend, I have been working on Xiahou Ba's textures, cleaning them up and adding a lot more detail through the use of lightmaps, cavity maps, Nvidia's xNormal plugin for Photoshop, various custom Photoshop brushes, and so on. The model is finally starting to come to an end before it goes into rigging and animation / posing stages for final renders.


POST WITHIN A POST: Notice how different the top image is to the bottom image posted here. This is a really irritating problem I've been having for the past month or so with uploading images to this blog and now finally found the answer. In my Google+ account it by default has 'Enhance Uploaded Photos' set to Normal (meaning yes), which has made my uploads look all the wrong colours and have unwanted effects all over them. Turned it to 'Off' and all works fine now. Stupid system. Really should be off by default........


There is still a way to go before he is truly finished here. Notice that his materials all look quite shiny with the introduction of his specular maps, but this will change when more appropriate shaders are applied; currently he is using full Phong shaders. The same can be said for other areas that require more advanced shaders to bring them so life, while still relying on real-time graphics. The eyes particular still look dead and plain, but with real-time reflections on their lenses they should look much better. His thin pink wrist band requires translucency to look right. His metallic parts such as his spikes and belt buckle also all require real-time reflections to be brought to life.

As a side note I also want to change his hair-style a bit to give him more fringe, but this is as far as I will take him on this fine night :) Also I found 'Depth-Peeling' transparency sorting in Viewport 2.0 is by far the best type now, reflecting the results your would expect to see in games.... so that's good :D

Sunday, 23 November 2014

Xiahou Ba - Maya Development

Project Xiahou Ba should be finished within the coming week or so. The finishing touches have been made to the sculpt and polypainting over this weekend, and now all of the diffuse and normal maps have been baked out from ZBrush, combined where necessary, and plugged into his Maya model.

The next stage is to create all of the composite maps to improve the diffuse maps, and create any other required maps such as specular and alpha maps. After that I will begin rigging, which leads to posing and rendering for the final outcomes.

I have baked his belt spikes and his necklace in Maya to give them textures and normal maps (and the alpha map for his necklace), all of which went very smoothly. I also created his hair and completely UV mapped it too. He still needs a few more bits like his mouth and his eye lashes creating properly, but he is now 90% finished on the model-front.


Thursday, 20 November 2014

Xiahou Ba Developments

There is still a way to go yet, but hopefully all of this stage, baking of normal maps (whether it be from ZBrush or Maya), texture maps, etc, will all be done this weekend.

These renders still have a few patches on them where the base-colour and very extreme colours are still showing through. These need to be fixed up as I go along. That bug I posted about below is still showing up from time to time even when on new layers so I'm not sure what is happening there. I've largely stopped bothering with layers now, but in doing so I'm getting problems and having to re-sculpt and re-paint some areas a few times over: the exact thing layers are supposed to work properly for.




He now has a tattoo on his arm of 'Jin', the kingdom that he is from in 'Dynasty Warriors'. There will be a few more features like this on his character, but mostly on his clothes now. Soon I'll likely start development on his platform that he will stand on for renders and later, 3D printing.

Xiahou Ba Polypainting Clean-up & Detailing - Polypaint Artefacts

Now that Xiahou Ba has his final 'in-game' meshes with the high resolution sculpt and paint information projected down to them, I have started giving him any finishing touches he needs. in the process however, I have ran into a problem regarding Polypainting and the use of Layers in ZBrush.

I have fixed this issue now, but thought I had better post it here to show how to fix the issue for any fellow Googlers.




The top image shows the issue at hand; there are artefacts where I have tried to paint over already-existing paint. The paint can be hidden but only when using 100% pressure over it, which obviously is not what is wanted.
  • The problem occurs because of the use of layers.
  • When you make a new layer, it will say REC to the right of the layer, signifying it is now recording what you do to your sculpture to add it to that layer. When you are done or want to change layer, you click the REC symbol to make it close the layer.
  • If you later decide you need to add more detail to an existing layer, this is where the problem occurs. Trying to paint over data that has already been laid out on that layer will cause artefacts because essentially there is an internal alpha map ZBrush is using to sort the layers of colour as efficiently as possible. This 'internal alpha map' is set up when the layer is closed, and only full pressure can add to it later.
  • To fix the issue you can do one of two things:
    • Bake all current layers down and don't use layers much if at all when polypainting.
    • Or the better option; if you decide you need to add something else to an existing layer, make a new layer above the current one, adding your detail on here instead. Once you're finished, simply merge this new layer down with the one that you want the detail added to. Its a bit of a strange thing to have to do, but that's how it is for now at least.

Monday, 17 November 2014

Xiahou Ba Progression - Difference Between Baking Normal Maps in ZBrush & Maya

While I continue to develop my rendition of Xiahou Ba from Dynasty Warriors 7/8, I have been running some tests with the texture data I'm getting back from the high resolution sculpt in ZBrush. The UVs are holding up very well which I am pleased with, but I noticed some of his normal maps have a little to be desired still; they often seemed a bit faint or flat in areas, compared with the true 3D sculpture.

Looking into this problem online for a while, I started reading posts from people saying ZBrushs' normal map baking is very weak and they don't even use it for this reason. Instead, they use their original 3rd-party application for this job, such as Maya, Modo, Max, or XSI.

(Softimage XSI no longer exists as of 2015 by the way)

With this idea, I decided to bring a high resolution mesh from ZBrush (Sub-division Level 5) into Maya, along with its 'game-ready' counterpart. I then used Maya's 'Transfer Maps' tools under its 'Rendering' tool-set to bake the surface information from the high resolution mesh to the low resolution mesh in the form of a normal map. The results certainly are different, and it does seem Maya does produce slightly superior results:


This GIF animation shows the actual difference between the bake from ZBrush, compared with the bake from Maya. The frames are spaced 2 seconds apart, so give it time.

To accompany this, I will provide you with the high resolution bakes themselves. The top image shows the results split next to eachother, and the bottom images show the full results side-by-side.


From studying the differences between the two map bakes, both completely unadulterated, you can make some general observations straight off the bat:
  • Maya's bake contains stronger reds and greens, increasing the overall intensity of the normal map compared to that from ZBrush.
  • ZBrush by enlarge has a cleaner resulting map straight away, with less tangent distortion around the neck and bottom of the torso on the map. However it is important to point out at this stage that Maya can fix these issues with tweaking of its options; it is simply the case that ZBrush appears to be more optimised for this kind of work from the get-go.
  • ZBrush appears to have possibly distorted the baked results very slightly, most noticeable on these bakes around the nipples and under the arms. Despite saying that however, I'm still not 100% sure it really is distortion, and it could be Maya that has distorted the results instead and that they simply just look a bit better. This would all be down to the target search area set up in each software package accordingly.
In other words, it might be that Maya produces better, stronger results overall, but they require more tweaking around the edges and more tweaking of the options before each bake than ZBrush. It would theoretically be possible to also intensify and adjust the normal map bakes from ZBrush to get better results also, however this process can be very difficult to do without breaking the continuity of the maps (seams can suddenly become violently visible if you simply increase the contrast on the maps).




These GIF animations shows the results working on the actual model. Especially pronounced on the greyscale images, you can see that the baked map from Maya gives a much greater sense of 3D than that from ZBrush.

I would not call this testing conclusive. While Maya holds better results than ZBrush for this model, the same might not be true for other models. Also remember that both of these maps are made using somewhat standard settings in both applications, and so further tweaking of the options may produce better results and worse results in both software packages respectively. However the issue with ZBrush baking normal maps to look much flatter and less intensive is something that has no options to modify. For this reason alone, I think further testing with Maya might hold better results for my future projects.

Sunday, 16 November 2014

Xiahou Ba Game-Ready Mesh Projection

After some of the previous disasters regarding re-projecting the high resolution details down to the 'game-ready' mesh, I decided to roll back a step, fix up the mesh a lot more, as well as splitting it up more appropriately, and completely UVing the model properly. The resulting model in Maya looks far better now, also cleaning up his hair and making sure it won't have hard jagged edges on the final model. His eyes have been properly constructed now, with a reflection layer over the eye balls themselves.

Unlike my previous 'Jo White' project, the shadows will be painted directly into the eye ball textures themselves (if required at all), instead of using an overlaying mesh to control this. Or at least this is my thinking at this stage of development. I may find through trial and error that the way I did it before is still a better way in general.

This is Xiahou Ba brought back into ZBrush as all of his separate meshes. The blue parts signify the areas that will not have anything baked out for them, and should be left alone. They are there simply to 'fill in the blanks' for reference purposes.



Note: Just randomly noting here, previous post had image enlargement LightBox functionality broken which was annoying enough, and now this image I just posted here keeps uploading with a horrid red tint to what should be neutral grey... no idea what's going on now. Oh well.

Wednesday, 12 November 2014

Xiahou Ba Initial Re-projection & Baking Issues

Note: This post has no 'LightBox' functionality (enlarging images doesn't work as it should). At the time it was a bug on Blogger, but no matter what I do it will not fix for this post now unless I repost all of these images in the right places... which I'm not doing. So enjoy :)

With the final game-ready mesh completed, it was time to bring the pieces all back into ZBrush to have the original high resolution base-mesh data projected down to them. The results of this step would be directly related to what the final character will look like, making it crucial that nothing goes wrong, and anything that does is dealt with thoroughly.


This is the model in ZBrush using the final in-game meshes at their highest subdivision levels with all of the sculpt data and polypaint data re-projected down to them. This process has gone okay but not as well as I had hoped.


If you look on his shoulder facing the camera, the surface noise map covers areas that it shouldn't (which I would Photoshop out during final texturing between Photoshop and Maya). However you can also see a patched-up area where the texture is lost, and the polypaint information was also originally lost. Patching up areas like these with highly detailed surfaces around them can be very difficult to make them invisible.

Parts of the projection didn't work 100% no matter how the options were set (the default options still gave by far the best results though). On the up-side, I did learn that the surface noise maps that I applied to the clothes, such as his tank-top in the picture above, had to be baked into the actual sculpture itself for projection to pick them up. If they are left as surface noise maps, they are discarded during the projection process. This isn't necessarily a bad thing but it is something to watch out for in future.


Looking at the pockets where they overlap the inside of the pockets, you can see the re-projecting process has left holes and skewed geometry behind. This is a big problem that would be very hard to fix and would most likely require a completely new in-game mesh to withstand these problems. Maybe using the original base-mesh would be better....

The base-mesh of the shorts included as much high resolution detail as I could get into them. This was to greatly support them during the sculpting process, making sure all the seams and pockets were all in the right places and had the geometry to stay in the right places during subdividing. While this was initially a good idea, when I tried to bake the results down to the in-game mesh that did not have places for the pockets pockets and such, I immediately got issues.

To overcome the issues presented on the shorts, I think it might be a better idea to simply use the original base-mesh shorts as the final mesh, but optimise them as much as possible, removing any unneeded creases set up for subdividing purposes.


His shoes are projected onto much simpler meshes than their base-meshes. With this being an initial projection and bake, you can already see the areas that cause problems. The laces should be removed for this process. The zip has been baked onto the in-game mesh here also, which has worked very well apart from the actual zip itself that has become distorted and broken. This will require a simple, small model to replace this damaged zip for the in-game mesh I think.


In the interest of keeping in-line with industry standards, his head was removed from his body to allow for its own material and texture map, however after thinking over this character design and what my options would be, I think it may be better to leave his head attached to his body after all. While it is true that his tank top that he would be wearing most of the time covers the seams, he was supposed to be able to remove his top as part of the character design. Baring in mind his body and head should all be using the same material idea, working this way should still work well. The resulting UVs will be set out more like a traditional atlas texture map instead.


After deciding to throw his head and body through ZBrush's 'UV Master' tools, I decided to quickly bake out the results so far of his head and body. 


The UVs are far from perfect in either of these bakes, however they do give an insight as to what to watch out for when I properly UV these meshes. For example the seam between his head and body is still very much clear in Maya, and the textures have no padding on these which also shows up very thin, black lines between the seams on the mode. I also found texture distortion around the mouth and inner lips that must be carefully dissected when unwrapping to get the best results possible.


The above .GIF highlights issues. The RED indicates textures seams on the mesh. The big one across his chest is where his head joins his body. His arms are still attached to his torso, showing that these thin black lines across his shoulders are UV borders (the arms were separate polygroups in ZBrush). The GREEN indicates texture stretching and / or distortion around his lips and possibly his nose area also. The BLUE highlight shows texture quality. The files themselves are fine, baked at 4096x4096, but some areas of his polypainting really do need touching up and finalising. This was the plan to begin with, but this bad airbrushing job really highlights the point to me.

Sunday, 9 November 2014

Xiahou Ba Final Mesh

Over the weekend I got Xiahou Ba's final 'in-game' mesh finished. This mesh see as significant reduction in poly-count, while retaining as much silhouette detail as possible. The mesh itself still has a few areas that could do with some correcting and/or cleaning up, but I will look into these individually as and when I find problems with projecting the high resolution detail down to them in ZBrush next. The next step however, is to UV unwrap this mesh properly.


Here you can see that really not much detail is lost on the final mesh, but note that it contains no subdivision border creases nor any internal detail such as pockets and the highly detailed shoes to stand up to the sculpting process better in ZBrush.

In the coming days, re-targeting the subdivisions from the base-mesh to the final mesh could be a messy process; I'm not entirely sure how the final mesh will react with no border edges. I may have to add creases in ZBrush to uphold the shapes, but these must be removed in again for the final mesh.