nav2

Showing posts with label Zbrush. Show all posts
Showing posts with label Zbrush. Show all posts

Sunday, May 15, 2016

Some notes on baking Normal maps again

Flipping UV islands is a common way of getting more pixels to cram in detail. What you do is for each symmetrical part of your model, you take the left side and flip it over the right side.

 That doesnt mean that the entire left side should be the same as the right - if you do that your model will of course be a bit bland. So plan in advance which parts you want to have symmetric and which not. You should plan it right from when you start making your high poly model.
In my case, I sculpted the nude in Zbrush completely from scratch, but used marvelous designer to create his outfit:

Making the hoodie was a  gotcha moment.I had to first stitch it in neutral pose over his head and run the simulation to get it to wrap around it naturally, then I puled it down to fall over his jacket during another cloth simulation. He looked good with a hoodie on, but the final design was planned  with a hat on instead.
Marvelous provided some really nice realistic cloth simulation which resulted in a good starting point for wrinkles and detail. Bringing the clothing back to Zbrush - I added detail to it - more wrinkles and a zipper here and there, the shoes and shoe laces. The hat, the hands and the respirator mask are all made in blender - where modelling them made much more sense. For the mask I used modifiers heavily. Wireframe modifier was perfect  for the cage.

Naturally the generated cloth mesh had no symmetry. So then when I started doing retopology in blender - the plan started forming more. For the outfit I will keep the middle part asymmetric, but will reuse the texture space of the sleeves. Same goes for the pants. His face will be completely unwrapped, but I will reuse uv texture space of the neck, the the cap shade and the shoes.


So I did the model accordingly in two stages- first retopo the asymmetric bits, then do the ones that reuse texture space - with a mirror modifier. I had to cut the hi poly model import from zbrush and marvelous designer into body parts and make the planned ones symmetrized for the high poly mesh - where there was no symmetry for the clothing. Thankfully blender has wonderful sculpting and modelling tools that make that part a walk in the park.

 When baking a normal for a target model with flipped islands that overlap their counterparts, you are most probably going to get seams.
If you want to avoid it, but still be able to reuse texture space via flipped uv islands, it is important to do this: Select all islands that overlap other islands, and move them in X + texture.width.


As a side note you need to consider that this UV technique does not work if you need to bake a lightmap on the model - which is usually the case for static background objects.

For the mask normal baking, I arranged the uv islands in a way that it will bake the bars perfectly horizontally and vertically. It is generally a good practice to arrange your islands in a way where you will get less diagonal lines on the bake - try to avoid diagonal straight lines as a whole. Horizontal and Vertical lines have  no anti-aliasing you see - so geometric detail such as this looks much crisper on lower texture sizes. If you look at model rips from old video games - you will see that they utilized this approach quite successfully to get some good looking textures as small as 256 or even less. I was also being cheap again with reusing UV space  with a vertical mirror. Whenever you can, and especially for detailed parts with repeating elements - try to reuse texture space!

In most cases, you will still need to clean up the bake result.
The normal cleanup was done in Krita, as 3D-Coat does not allow cleaning up external normal maps. Their import layer is locked and limited to very few operations.
 It was however quite good at further detailing them during texturing with your PBR materials. Next post will be about that =)

Tuesday, March 1, 2011

Blender vs Zbrush on normal maps

I've been juggling a number of projects lately. The animation on piggybank has been in the background and I haven't done much work on it since the last post. The models for the moCap project are ready now and this article will focus on the technical side of things as normal maps are concerned.

There is also a freelance job (a short 2d animation) that took some priority- I just want to make sure it ends up looking very good. :) I wont go into detail about it right now, as it wouldnt be professional to discuss it in early stages, while the client is very much deciding on how it progresses. I am not the type who would release anything I'm working on without the client's permission.

Anyway, onto normal maps.
It has been my main interest since the first day I started using a 3d package. How do I get a LOT of detail projected onto a low poly mesh. And whats with that obsession with low poly stuff (!?) some might ask. Am I just being a cheap bastard here , with today's technology advancing so quick. :D
Let me state the obvious advantages of keeping your mesh low on polycount- use geometry only where you need it.
- your computer can handle the files, especially if they are part of a giant scene.The files can be used in real time rendering engines. The playback speed while animating is near normal- no need to playblast it a billion times- its a waste of time.
- you can edit the files faster- its easier to edit the overall shape (especially with maya), its easier to paint weights (skinning) when you dont have to deal with a lot of geometry= that equals faster workflow
- You need geometry only to define the silhouette of a character and to define how the character deforms. The details can be achieved through bumpmaps and even better - normal maps. It makes me cry a little, every time I see a model that has been subdivided a million times, has geometry to define cloth wrinkles, face wrinkles,creases/cracks/etc, hair detail, etc etc. Why oh why dont you just make a normal map and bake all that stuff there?

Normal maps are just fancy bumpmaps. Some people convert bumpmaps to normal maps ( not much of a difference there lol). Some people convert textures to normal maps. Want to put some cracks on a rock? There is a photoshop plugin that should do it for you, you can also use xnormal. There is nothing wrong with that- it's just not good enough for something like a next-gen character. While bumpmaps contain information about depth, Normal maps go a step further. They contain information about direction of that depth. So one can have a really low poly character look very very detailed. The only thing that will give it away will be the silhouette of that character.
I know about displacement maps, but I wont go there now :D

So for next gen characters, one basically tells the software to compare the low poly mesh to the high poly mesh and create a normal map for the low poly mesh. Mudbox, zbrush, maya, blender- they all have tools to do that.

Since blender has a special multiresolution modifier for its sculpting mode, it is actually pretty damn good at detailing characters and baking a normal map. It might not be as good at handling giant meshes as zbrush, but its good enough to do the job.

I spent about a week in learning from trial and error about normal maps. For my little experiment, I used the two characters that I made for the moCap module. These guys are pretty much a work in progress and I am not even near pleased at where they are at the moment. Both of them have tangent space normal maps (tangent space is good for meshes that deform, but its a bit more expensive to render than world space, which is good for static objects)


Scarlet Thorn:

Scarlet was made almost entirely in zbrush. I made the hi res mesh (detailing) and exported a normal map from it in zbrush. The texture was also made in zbrush.Whats good about Z and I think is one of it's killer features (correct me if I'm wrong but mudbox doesnt have it) are the selection mask modes. Just with a click of a button, Z is capable of masking all the crease areas- that makes it extremely easy for the artist to flesh out detail..


On the screenshot, you can compare how it looks like with detail in zbrush (actual looks) and then how maya portrays the normal map on the low poly object. I didnt show render, because rendering has million of options to tweak and that alone can make it look like anything.

Zbrush flips the map vertically by default. It also left me with some slight edge marks, which I had to clean with the smudge tool in Gimp. That was a bit annoying, but it still got me a decent normal map.


Sepia Baron:
I dont have to tell you how much more advance zbrush is at sculpting than blender. But the new blender has some key features that make it worth my time. First of all, its a modelling package that has sculpting capabilities. The brush engine in blender is actually kind of nice.I can do the whole pipeline in it- from modelling the low poly (check metaballs as a nice alternative to zspheres), retopology, uv mapping, detailing (sculpting). Blender can do it all :D. Maya is useless at sculpting- utterly useless... So I sculpted detail of my character in Blender- the newest build , then I baked it and got out a nice normal map.



What was surprising about Blender's normal map was- it actually was cleaner than the one I got from zbrush. I know he's a simpler character, but I didnt get anything that needed my attention in gimp.
The only annoyance in blender is that when you subdivide the model, you can really feel the weight. It's probably a good idea to turn off skype while sculpting on subdiv 6. But that is likely to change, when the unlimited clay modifier gets released in some of the future builds. :D


I used the normal map as a basis for the texture, since I wanted to bake some slight shading on the finer detail. The texturing was done completely in Blender+gimp. Its incredibly easy to use them at the same time- blender has a really nice integration with gimp, when it comes to image editing.


Normal maps and rendering engines~ This is pretty much where all the hedaches start for the artist. Different software handles normal maps differently. Maya has three ways of rendering it-
~hardware (viewport) render- seems to display the normal maps without any problems. Note that you should avoid having flipped uv islands- that always offsets the map slightly and creates really ugly seams. I got away with fipped island on the hands and feet, since I wanted to preserve some UV space... but that backfired on me. I needed to go back change the UV of Scarlet thorn in order to get rid of seams. Thankfully zbrush is capable of projecting detail from one mesh onto another (both texture and shape), so I didnt have to redo all that I had.
~Software (maya) render- is absolute rubbish at rendering normal maps. :D I might have missed something. I've tried my best, but not only do I get ugly seams everywhere possible, but its also not very good at representing the hi res detail.
~ Mental Ray render- Seems to be pretty good at normal maps. I got no seams, the hi res detail is pretty good. One thing to note is that it desaturates the textures. I dont know a lot about mental ray. Everything I've posted this far has been rendered with maya's native software render. I dont have the time to learn mental ray, so what I posted now at flickr is as default as it gets.

While still being on the subject of rendering and normal maps, it would be worth looking into how it works and why there are seams/hard edges in some cases. Blender developers have been hard at work on documenting that and improving the normal map baking magic that happens . It certainly has been a growing interest for me to follow its development and there have been some pretty exciting things happening there-keeping my attention.

Monday, March 1, 2010

UV mapping and texturing of cave guy

Today I cleaned up the topology and finished the UV mapping and texturing work of cave guy. I used Z-brush to do the UV and Z-brush and photoshop to create and edit it's texture. There are no seams visible. I might have over saturated the skin tone. There'll be a couple of test renders later.



name of mesh: Cave dude
number of polygons: 3559
texture size: 1024x1024
Time taken: 3 days- one to sculpt,one to retopologise, and one to uv and texture...


Another thing I did was softening the Normals of the whole mesh and then hardening them on some of the edge loops.


It might not be a very good idea to uv it before it's boned, skinned and tested, but I just had to do it today.This was something I wanted to learn from ages. Now that I know how it's done, I think I will enjoy texturing organic stuff in the future.
I have to say though, I am relying too much on my tablet. If I didn't have a wacom tablet, this would have been very hard to achieve in 3 days.

Sunday, February 28, 2010

3D character animation assignment- storyboard and topology

I just started planning out my short 3d animation for character animation assignment. The deadline is the end of April or something like that.

My idea is a bit too ambitious for such a short deadline, but I also came up with a plan B story for it, that doesn't involve me modelling and animating a mammoth.


(animatic done with toonboom storyboard trial)

The production pipeline path that I am going to take is going to be slightly different from every one else's in the class. Since I've been using z-brush for almost two years now, I decided that it will cut some of production time.


1 modelling:
sculpt in zbrush---->retopology in zbrush--->export to maya and do some tweaks on topology


Making an animatable topology mesh in Z-brush and exporting it to maya is incredibly easy, though it had some quirks. Some people might say that it will take more time to do it with Z-brush, because then I have to redo the topology after I sculpt the character. To those people I say- no. It's far simpler and empowering. I get the shape to look exactly as I want it and focus on topology afterwards. So I do better at both shape and topology and I have greater control over the end result. I sculpted my mesh and then redid the topology in z-brush (If I export a high poly mesh it will just crash maya) so I made an adaptive skin (copy of the hi poly mesh) with proper topology and 2 subdiv levels stored in it. I just needed to add some extra edgeloops in maya.