MB-Lab Intro and Shader Improvements

This is not an official blog for MB-Lab, I don't think there should be one as there are several people working on this addon now, so having an official blog seems kind of pompous. This is my own blog for MB-Lab so anything will be posted here about it.

Shader Improvements


Version 1.7.4 will be about the shaders and textures, or more to the point, it will be a complete overhaul of them. Over the course of time since this project started a lot of work has gone into trying to achieve realism in the shaders, I felt that Manuel did a good job in his last version (1.6.1) but the shaders needed work so since then it has been a buildup of work to get at least good enough results.

This version though is a huge improvement. These shaders are meant for Blender's rendering engines, Cycles and EEVEE, however the texturing has been improved as well, so exporting remains the same, just a little different if that makes sense. The shading for Cycles and EEVEE are a massive improvement, using a custom skin shader, a fully procedural eye shader and the teeth have gotten a new shader as well. Why all the new shaders?

In version 1.6.5 I made the shaders use the Principled BSDF node as the shader node for everything. Now I realize this was a mistake and in the past couple of weeks have spent a great deal of my time working at making new ones. There was not as much control over the shader as there is with this new version and the visual results were not as good as expected. Maybe Principled BSDF is a shader for everything, just not human skin perhaps.

In my workflow during development of shaders I absolutely do not edit the blend file of MB-Lab, I make a new character and work off of that blend file until I am done editing. Once I am satisfied that the shaders look good I open up another instance of Blender and then recreate the node networks again in one go (or as few saves as possible) which is kind of an irritation to redo work however this ensures that I do not mess up the production blend file to the point of irreversible damage. Once I am complete I test and test and test again, then push my changes to the Github repo, where it sits in the Dev branch until it is decided to release it to world.

Anyways..

The skin shader now uses a combination of two SSS nodes, a Diffuse shader, a Glossy shader for skin oil and a recreation of Manuel's reflection network that added varying amounts of sheen, something important with skin. This still uses the original texture map as it's color basis but there is now more procedural elements added that can't be replicated with a texture map easily.

One of the first elements added was the subtle veins that are visible underneath the skin, this was something that took a while to get right but looks amazing. The way the nodes work is that they are mixed in via Overlay, the texturing does not use colors but instead uses the color of the texture map so when and if you change the skin hue or the complexion, the veins change color accordingly as well. (EDIT : In testing when changing the Skin Complexion this also changes the visibility of the veins, so further development is needed before this will be complete)

The next element that was tackled was the freckles. Humans have freckles, something Manuel never programmed into the addon, so this was added in very early on into MB-Lab's shader but was neglected until now. With the current shader the freckles at %100 make the skin look like it is diseased and not realistic by any means, with the new version the freckles now render in areas defined by a texture mask and the freckles themselves have been reworked to vary in color rather than one uniform color as it has been.


The eye shader was completely redone from scratch and has gotten rid of the texture map and is now a fully procedural eyeball. The reasoning behind this was simply to expand the color range of the iris, with the current shader and every one beforehand, the iris was controlled by Manuel's color changing calculations in the shader (it's hard to explain but it works) however this left out one very common iris color : brown. Using his color changer it was not possible to achieve one of the most common iris colors among humans, so it was decided that the eyeball was going full procedural and then spent another week working on it.



For those of you who use MB-Lab to export characters the UV map is still intact, so you can still export characters without having to worry about texture maps in this version. In all reality it was impossible to separate the eyes from the UV map without having to redo the whole map from scratch, something I would rather not do at this point.

One of the hardest parts is the iris itself, that proves to be elusive at this moment, it still is not completely done BUT it is decent enough to publish.... maybe. I might need another week or so to really work it out. It is the texturing that is the hard part, trying to achieve that look without texture maps AND without deleting the UV map is a pain in the ass. It's worth it in the end because this will allow people to really have freedom to choose the iris color they want rather than a predefined color range, with half the colors not even a realistic iris color, such as purple.

Next on the list is the texture maps, which as of this writing are still not complete but not to worry the plan is in the works. One of the most important maps to edit is the bump map, which if you look closely in the image above, the bump map has defects. One is the eyebrows, they don't do that in real life at all and it looks horrible, the next is the scalp which make her look like she is a burn victim. Both these defects alone shift the realism factor down some notches, so fixing them is a priority in this version. It may be worth having a 4K resolution bump map just to have that level of realism needed, or at least what users would want. The file size exported from GIMP is about 3 MB, which is not to too bad actually for a 4K image, however that it is because it's an 8 bit Grayscale image not an RGB image that would add color information for each color channel, something not needed with a bump map.

The worst part about all this is having to recreate not only the shaders but having to edit the texture maps for both sexes and make sure they are consistent with each other, for instance the scalp looking the same on both male and female models.

So the work for version 1.7.4 continues and while not as fast as previous iterations it's a big project to completely redo the entire shading network and texture maps, while still maintaining some kind of functionality with MB-Lab's interface as usual.

Comments