Zbrush to Maya Project, Part 2

January 31st, 2009

It´s weekend again, I´m almost sober again, only a little hangoverish and back on the Horny spare time project, showing my Zbrush to Maya workflow. (actually it´s a Maya to Zbrush to Maya workflow…)
Last sunday I stopped at the UV layout process.. well, actually I was stopped by a massive blackout. ( a real one, like where the electricity is gone) and I was so pissed off with loosing my progress, I didn´t want to redo it right then. But lesson learned: SAVE often. I didn´t, so I had to redo the UV layout, which is usually the most annoying part. God hates me.
Well here it is:
UV layout

UVs on model

If I had to describe UV Layout with one word, it would be compromise. That´s what it is. The UVs for a cube can be layed out almost perfect. Each side can be represented  by the exact same size on the texture, BUT you cannot merge all the seams ofc, that´s the compromise on the cube.
For an irregular model, as organic models usually are, there is no ideal way to do it.  You have to cut shift and merge UVs to get to a point where you are satisfied.
Usually you would want to go for (in order of importance)

  • Give each quad about the same size on the texture as it has on the model
  • Use the most part of the texture file
  • have the least amount of seams
  • place the seams where it makes sense (don´t have one running diagonal across the face)

You should use a texture like this to check the UVs.
util texture

Luckily with using ZBrush, the importance of good UVs is shrinking, you could even use the AUV tiles function, but I am oldschool on this. I like to have my textures making sense when i look at them.

So now it´s first time export to Zbrush.
Select the head and export as obj. Next the horns (combine them as one object and be sure to have the UVs non overlapping)

Start up Zbrush and import both the objs, select the head and append the horns as a subtool. For now we will not care about the eyes and the tearducts as we will run some tests first.
head in zbrush
press ctrl-d to smooth the elements (i smoothed only twice as my PC is an old jalopy.

Attention, this one is important, as it will influence the workflow at several points: there is an SUV button at the Subdivide options, wich is activating the option of having the UVs smoothed when subdividing the mesh. Don´ bother pressing it, because it´s buggy!
It is smoothing the UVs, BUT whenever you step down a subdivision level and up again, the smoothing is lost. Also when you save your tool and reload it again, the UVs re unsmoothed. This bug creates a hell of a lot of problems. with creating the color map and with creating the bump map, but luckily there are workarounds.
Let´s just hope they will fix it! Sometime! …soon!

head smoothed

start defining the shape. Use the standard, move and smooth brush. Also the transpose features if necessary.
I want to get rid of the boyish face and turn him into a deamon.

So this is the result after some minutes of tweaking:
daemon yeah
I won´t go into too much detail on the modelling process, as there are already great video tutorials out there, as videos are much better suited for showing the detailed process.
Just some words of advice:

Do have one general concept. Who or what IS your character. And keep that concept consistent. Sounds very stupid, but this is one of the most crucial but also most made mistakes. A simple nono example would be, having the character skinny on the upperbody and fat at the legs, or having a solid bone structure at some places, but very delicate at other parts.(ofc this could also be done on purpose, but most of the time, it doesn´t make sense)

Even if you go for a fantasy creature, keep the correct anatomy in mind. Don´t randomly put in things that simply don´t exist. Just shift the features, exagerrating or reducing them.
If you throw in sthg, that normally wouldn´t exist, do so very mindfull. An example on this model would be the horns. They don´t belong on a primates head, but if you place them there, insert them carefully, by making the connection to the skull believable. Use reference of horned animals.

Take care of a simple base shape, the simpler the better.
Don´t overexagerate every detail just to make it look like you really did an effort on the model. Alternate between detailed and less stressfull areas to have a nice overall flow.
And an important one: Listen to feedback! It´s the curse of us graphic artists, that anyone can judge our work. If your six year old sister tells you this looks odd, believe her! A lot aspiring artists I´ve met so far do have some serious problems with feedback. And if they do, they have one thing in common: they don´t evolve.

So now it´s time to get that detail into maya. This is done by two steps:
increasing the density on the mesh in maya
and plugging the detail onto it, using a displacement map

Step down to the lowest level of your Zbrush tool
head low
You can still see the basic shape of the changes you did. Export this as an obj and now we are ready to create the displacement map.
First of all: under tool/displacemen set smooth UVs and adaptive to ON. Altough we will not use the built in displacement map generator, but the MULTI DISPLACEMENT 3, this does make a difference.

disp smootj

Now up to the Multi Displacement 3 setting in the plug ins folder. Use the settings you see here.

multi disp

Then press the export options and you will see this most confusing window. But don´t worry, once you´ve got the basic idea, it´s easy to understand. And if you don´t you can still use it by just copying this quick code in: DE-LBEK-EAEAEA-R32

Here´s what it should look like:

multi disp options

Apply these settings and press close. Back in the multi displacement tab, press Create All. This will export the selected R32 map. (make sure you are on the lowest level of your tool, or this won´t work correctly)
Now we have the mesh and the map exported, so it´s time to jump to maya. You can save your tool and close Zbrush.

Start up maya and import the obj file into your scene. Be sure to have Create Multiple Objects turned OFF in the import settings.
import obj

This is what you should see now

imported obj

Now set the face normals to soft and then add a Mental Ray Subdivision Approximation node to the mesh by clicking Window/Rendering Editors/Mental Ray/Approximation Editor and clicking Create and with the mesh selected click Assign.
Important Note: The SA node smoothes the UVs. No way to change this. …at least, none I know.
So here´s one major problem in this whole workflow: Mental ray DOES smooth and the smooth UVs option in Zbrush is BUGGY. This is the source of a lot of problems when creating the bump and color textures, but we will get to that later.

approx editor

This simply adds a node to the mesh which divides it at render time. If you want to have all the detail from the sculpting on the mesh, you must have a denser mesh than you see here. Sounds logical, doesn´t it?

Now to edit the SA node.
First of all, rename it to sthg that makes sense. I named it SA_disp. I use this name on all my scenes, as I find it useful to have naming conventions that apply to all my work.
With the rest go with the defaults for now.

SA edit

Set up a render scene. I do sthg simple, that renders fast to test the map. No fancy lighting, just two directional lights with intensity to one from upper left and upper right corner.

render setup

Set raytrace shadows to on on both lights and add a new perspective camera. Don´t use the persp cam to render. You sure could, but it´s better to make a new camera (rename it to rendercam) which is solely used for rendering and leave the standard persp cam for navigating in the scene.
Turn on resolution gate for the rendercam so you can see the actual size of your image on screen.

rendercam view

In the Render Globals Window activate raytracing and hit render. You should get sthg like this.

first testrender

The mesh is smoothed, but there are no details yet, as the displacement map is still missing. You can see the difference the SA node makes when you compare the head to the horns.

Now before plugging in the displacement map we need to convert it to a .map file. This is a format Mental Ray loves and it´s only one click away.
Open your windows explorer and navigate to your .tif file, created by Zbrush. Download this utility and place it in the folder. Simply drag your .tif file over it and it creates the .map file. It´s as simple as that.

convert to .map

Then plug the .map file to the displacement channel of the shader. Rename the file node to file_head_disp and edit the Alpha Offset channel. This has to be done as maya interprets the information of the file differently than Zbrush does.
If you type in a = into the channel maya automatically realizes you want to type in an expression. So type: = - file_head_disp.alphaGain/2 (this is case sensitive!) and hit Enter.
This automatically sets your alphaOffset to the minus half of your alphaGain. (you would have to close and open the attribute editor to see the effect.)
Now if you do have your model at the correct size (which would be about 22cm wide for the head) you should go with 2.2 on the alphaGain (the expression then sets the alphaOffset to -1.1) and you should be all set. If you do have any other scale, simply test different values till your satisfied. Changing this alphaGain value simply increases or reduces the effect of the diplacement map.

SA edited

Also make sure you have set the filter type of the image to OFF as you don´t want maya to blur your displacement map.

When you hit render now you should get sthg like this:

render

be proud and dance a jig! well deserved. We go on in part 3.

HULK update

January 29th, 2009

some update on the Hulk project. Defined the basic shape in Zbrush and found some weak spots on the mesh (as expected). The neck area needed som tweaking as well as the face.

hulk v2

here´s also a back view:
Hulk double

So I redid the base mesh in maya and will start tomorrow with redefining him… and make his feet smaller and his private parts bigger! :) Hulk basemesh new

I did some more changes: adding one span to the armpit to get make it deeper and reduced the mesh density on the back a bit. Test your mesh in ZBrush by simply subdivuding it some times and painting over areas you think might be problematic. Try to quickly get the shape you desire. If it´s not working nicely, edit the base mesh. Especially vertices where more than 4 edges join can be problematic. These tend to pinch when smoothed.

So here´s the new mesh:
hulk mesh zbrush polygroups
Next step (as you can already see in the pic above) is to divide the mesh in polygroups. Doesn´t take too much time, but is helping a lot to streamline your workflow.
Use the lasso tool with ctrl-shft and mousedrag to select areas you want to select and click Tool/Polygroups/Group Visible to do just that.
Check twice that you have it perfectly symmetrical. If you find out halfway through the modelling proces that you selected only one face unsymmetrical, you will want to pull your hair.
With ctrl-shft click onto one area you hide all the other polygroups. That´s perfect for shaping areas that almost overlap (e.g. the armpit area on this model)

The Zbrush to Maya Project

January 25th, 2009

Getting a nice workflow for rendering High Res Zbrush Models in Maya (Mental Ray in fact) was quite hard work and from time to time frustrating even.
And even now, sometimes I get bad results, because I missed sthg or took a shortcut where I shouldn´t have. So right now I´m starting a model and take it all the way through to the final render. I´ll write down all the steps and post them here as a kinda tutorial, for me and anyone else who´s interested. I don´t know when it will be finished, I´ll try to move as fast and concentrated as I can and update this thread as I go.
I´m doing this from my home PC, which isn´t as nearly as powerful as my ultra-multi-core office machine, but I like to play this one pretty close to the fridge. :)

Off we go:

So I´m starting with my male standard head, which was modelled in Maya. I encourage you to keep models as those in your library. Whenever you start a new project store the basic data in an extra folder. That way you don´t have to redo stuff you need on a regular basis and your files will evolve from project to project.
head base mesh

the basic head is a bit too boring, so I´m adding stuff to make it more interesting! let´s add horns! It´s not the idea of the century, but i can show a very interesting aspect by doing so. The horns themselves will be separate objects, but I have to punch holes into the forehead to make the connection to the skin more believable.
Delete half of the head (you don´t want to model the same thing twice) and punch a hole into the surface where you want to add the horns. And now the important part: Be sure to add an extra ring of meshes around the hole to get a nice surface, this is especially important for painting in Zbrush.
punch holes
Be aware, that this will not be the final mesh, so don´t spend too much time on it. Just be sure you have all quads and no areas that have too much or too little detail. I`ve also deleted some of the spans on the forehead as they would only be necessary for binding the character.

I´ve also added some mesh to the base, as I want the more  of the neck to be seen, which will allow for a much more dynamic pose on the final render.
When you´re done, make a copy of the mesh and mirror with -1 across X axis and merge. Check if all the vertices have been merged.
As an extra I´ve sketched in the basic mesh flow. The more you know about anatomy, the more able you will be to model the correct shape with the least amount of polygons.
export mesh

Now add the horn geometry.

  1. Start with a curve
  2. position it roughly
  3. extrude a circle along the curve and with soft selection on, scale down the tip
  4. use the curves CVs to create a more dynamic flow for the horn (be sure to have construction history on for this)
  5. eat a banana

horn construction

  1. Now convert the NURBs patch to a polymesh, using Modify/Convert/NURBs To Polygons
  2. close the hole and add an extra span to the topto get the tip more pronounced
  3. with symmetry on adjust the head to fit the horn shape (or the other way round)
  4. create an instance of the horn and adjust the final shape with both horns visible. (the final horns shouldn´t be 100% symmetrical, but we will care about that later on)
  5. if you feel like it, eat another banana. I do!

polyhorn

Just realized there was one 5 sided polygon left on the front of the head. Edit this to be a quad. You could also make a triangle, but I wouldn´t recommend that right there on the forehead. If you have to have some, hide the triangles in hidden places, like behind the ear or on the head, if your character gets hair or a helmet or anything alike. But don´t leave a 5- or more sided polygon, because Zbrush will triangulate those on import anyway and you´d rather want to do that yourself for full control.
So here´s a final shot of the head, ready for export.
head_export

Forget about the last thing I wrote. Here´s the new mesh:
mesh_export_02
Edited the spans on the neck and the skull to match the rest of the head better in terms of polygon size and distribution. Also added some spans to the cheek, the chin and the tip of the nose. Most noticeable the sternocleidomastoid is now well defined, which is very important as I intend to give him a really muscular neck area.
The neck is longer now as well as it looked a bit too plump on the previous version. Ofc this could have also been done in ZBrush, but as I was already at it, I edited anything I didn´t like.
The base mesh I started from was actually done with character setup in mind which has different demands than ZBrush detailing. Cost about an hour to do those edits, but now I´ve got a new mesh for my base library. Good thing!

On second thought I also decided to change the horns. I need them bigger, more impressive AND twisted.
So I created a polycylinder and with soft selection on, rotated the upper end about 360° and scaled it down. Took a nonlinear bend-deformer to create the arc.
new horns

then placed the horns onto the head:

new honrs on head
Way better!

The HULK!

January 21st, 2009

I know, doing a high detailed Hulk maquette ain´t that creative, as anyone seems to do one of those lately. But this is a comissioned piece, and it will definitely be impressive when it´s done! Mainly because it will be reproduced in larger than life scale as a statue for a showroom. Me so excited!!

I started with the base mesh in maya. It´s very simple, all quads and it´s already got the correct mass and proportions.
hulk basemesh

just to test it, I took the head to Zbrush and see where I can get it.

hulk head test

as you can see there are some problems in the neck area, as the mesh is flowing into the wrong direction, so I will need to retopologize it. Damn!

cg teeth

January 19th, 2009

I also took some time to model cg teeth today. No big deal, but I thought I´ll post some screenshots to showcase my method.

cg teeth

Most noticable, the teeth and gingiva are the same mesh and the molars are one single block. I like to keep things as simple as possible and in most cases this will suffice.
Of course, if you want to be more correct you would also have to model the molars separated.

stop that nasty habit!

January 19th, 2009

I felt sore in the morning. We went out yesterday evening…and stayed there for some time. Doing the usual. Talking, laughing, drinking and of course smoking. An evening filled with sin and all the pain I felt today was well deserved. (I took painkiller nonetheless)
And I can live with the headache from the drinking. I´m not that much of a drinker anyway, but whenever I go out I tend to smoke a lot. I usually smoke half a package per week, but on an evening in town the rate goes up. A lot.
And waking up in the morning, well ok midday, I think I can smell each one of those cigarettes still there in my mouth. Bäh!
So to get to the point, today I decided to quit. For real.
And as a gesture to wave goodbye to the little health-killers I drew a quick sketch of the Marlboro Man. The Icon of lung cancer.

Marlboro Man
I also plan to do an Anti Smoke Illustration, but this will have to wait, as it would be private project number 7 in row.
I also think I already have an idea in my mind, as smoking is the perfect way to kill a kiss.

Ugly

January 16th, 2009

this was just a quick test using ZBrush on a character, the region around the shoulder is not perfect and I was initially planning to redo it.
But since there is no real concept behind this one I rather move on to more important things.

ugly..whatever

took about one and a half hours to do, rendered in Zbrush

Resurrection

January 11th, 2009

I´ve got new stuff going on. It´s supposed to be funny, so no spoilers. One can´t tell a joke in pieces. So here`s a small preview that´s not giving away too much.

trin preview

I´m workin on this for some time and I usually get easily bored on private projects, but this time is different. No need to be hasty.

Spent about 80 hours of my spare time on it so far and what you can see here is only a fraction of the work done.

It´s a fat lady, but also so much more than that. Be sure to check back for the real thing.