December 11, 2012

AppleBox Pt. I - Texture Painting

Hello,

here we have first post regarding look development for asset used in Booty Call. On the picture is sort of pre-final asset.

All maps are painted, shader setup is done and since we don't really need to make it work in every light situation, it's matter of having a look in context of the scene and do further tweaks to make it better if needed. I can see what needs to be changed, but maybe if it wont be visible in final output, why bother. (I wont show you missing apples in final renderings ;-)




I'll start with explaining what kind of maps needs to be painted and try to point out what I think is important.
We are doing sort of stylized realistic style, but animation and whole look is still a bit cartoon. Babinsky, our hero character is not even 30cm tall, so this allows us different styles how to look at scales, if we're talking about textures.

Scale is one of the important aspects, while planning your textures. Surely everyone know that feeling, you look at the photo and you exactly get that feeling how big something is. Scale of details gives you visual cues about it's size....

Anyway, as I've mentioned before, we're doing cartoon, so this is another tools, which allows us to estabilish visual style and make things look small, like toys ..

Well, enough talking, let's have a look at the pictures.


Base Color Map

Classic color map in it's simplest form, created quickly from photo resources.

Base Bump Map

Basically color corrected version of Color Map.

Secondary Bump Map

Very quick map, created from different photo, just to ad some smaller scale detail into final Bump and Spec maps.
Base Spec Map

Color corrected version of Color Map.
Scratch Mask

Very rough hand painted map to create the scratches. I use it to remove specularity, color correct color map to add some more detail and "push-in" the surface.

Most of hard tip brushes should serve you well, while painting maps like this one.
Primary Dirt Map

Blurred version of Scratch Mask. Just extra pass for final maps assembly.
Secondary Dirt Map

Quick hand painted map. I use this one to affect all the other maps.
Visual Guide

This one is not really a map. It's more sort a guide for me, to know where is which piece of wood in the UV space.

I'll add some color variation while i'm doing final assembly and look-dev.
This is all the maps for wooden parts. Those will be compiled into basic components and adjusted in Nuke  during shader setup later on. Apples are done more less procedurally. I've just created Color Map for yellow ones and Spec Map to break the reflections a bit. More examples to come in next article. Stay Tuned!





How to prepare geometry for Mari

Preparing your geometry to be textured in MARI can be quite confusing and not very self-explaining.

If you ever used ZBrush and wondering what Smooth UVs means, this article should help to reveal what is happening under the hood.

Basically, before you're exporting your model, you should know, how is the final geometry gonna be rendered. If there is any smoothing applied in render time or not. I'm using VRay, but principle is the same in every render engine.

If you're not going to smooth your model in rendertime, you can leave it like it is and everything will work just fine, but this is usually not the case. So if your geometry is supposed to be smooth in render, you want to see it nice and smooth while painting textures, thus you need to pretesselate your geo before importing to MARI. But there is few caveats you should be aware of and check them carefully before you start texturing.

For the moment, let's assume the red cube is our original model and green and blue cubes are the same geometry with smoothing - converted into subdivision surface in render time. They look same, but they are not. As you know, you can choose, how the Maya's Smooth function treats geometry. There is similar options how it treat UVs. When working with texture painting program like MARI or ZBrush, you should know what they mean. So let's have a look at the bit of theory.

Red - Original Geo                    Green - Smooth UVs o                       Blue - Smooth UVs off



And here we are, option Smooth UVs

There is also few options how to treat UV borders.

You'd usually want to smooth them for organic shapes, to minimize texture distortion and leave them for hard-surface
Now let's have a look at settings of Subdividing in rendertime.


You can see similar options, quite self explanatory.

I prefer using all of them together, or just turn off smoothing UVs completely. I was experiencing issues in other cases.






So, this should be it. Just smooth your geometry including UVs, export OBJ and you should be ready to go.


December 10, 2012

Linear workflow in Maya & V-Ray


Linear workflow was a biggie for many years and for many people nothing much has changed. Color management generally was a biggie for every post-house I've worked for. I'll try to reveal little bit of how things works in CG rendering using Maya & V-Ray.

Let's look at some good and bad examples and set up basic terminology. Then we will talk little bit about why we use gamma corrected space. I'll try to keep it simple, so we'll talk just about simple gamma correction. This should give you solid grounding how to make technically correct renders, which are looking nice and compositors should be happy with :-)



CORRECT

This is the only correct solution for 99 percent of tasks for vfx and animation projects.

sRGB look-up turned on
- this does make it look correct on computer screen

sRGB textures linearized
-this make textures mimic real world value, which renderer expects to get

WRONG !!

Textures looks washed out, but if you dont use textures, or they are in linear space already, this is correct solution.


sRGB look-up turned on
- this does make the light look correct on computer screen, this is what we need


sRGB textures are not linearized
- so if you compare with original textures, they look somehow washed out

WRONG !!

This is usual scenario, change anything, just press the render button :o))

no sRGB look-up
- lighting looks wrong, shadows are darker then they should be

sRGB textures are not linearized
- because there is no lookup, textures look correct, just lighting is wrong

WRONG !!

Wrong example of trying to make it correct :o))


no sRGB look-up

- lighting looks wrong, shadows are darker then they should be

sRGB textures are not linearized
- they look much darker .. this is the worst combination!







BASIC TERMS


Scene referred space or Linear light space
corresponds to real physical units, and it is not perceptually uniform, thus if something is physically twice as bright, it's not looking twice as bright for human eye ... in photographic and cinema world twice as bright means +1EV or +1 f-stop on your camera. You can imagine this as a white line on the picture above.
What is linear workflow

Gamma
is in fact some sort of curve, described by mathematical function. For us let's make it simple and assume it's power function of 2.2 , which should should match with most of the PC monitors quite well, unless you have unusual setup.

Display referred space
is working space of our display, often called gamma corrected space. In case of PC monitor, we have to do correction against it's gamma function and this is where all the problems start.

Let's assume that white line on the diagram is the picture we need to display, and red curve is characteristics of our display. In order to display it right, we need to do inverse correction - green line. Most of the 8 and 16 bit image formats have this gamma correction baked in, that's why you see them correctly when you display them on your monitor.



HOW TO PUT THIS IN PRACTICE


Well, now we know that real world units works in linear space (white line) and our display doesn't. Thus it needs to be fed with data which are corrected. But our renderer mimics the real world behaviour, so we need to fed it with "real world" data. This means we have to get rid off  baked-in gamma correction and then put this correction back on the final rendering to be able display it right. There is couple of things we have to do, ...


Linearize input textures
Generally, textures should be linear. There is few kind of texture maps you can be using

  1. Image maps - like color, specular, glossy, .... if you have used tools like Photoshop or Mari, they are most likely in display referred space, so you need to conform them into the linear colorspace.
  2. Data maps and baked textures - like displacement or normal map, or. any texture bakes are usually in linear colorspace, so you need to leave them as they are.
Don't use "Linear workflow" checkbox in V-Ray Color Mapping tab!

"It's simple and it works, why I shouldn't use it?"


Well, answer is quite straighforward, there is couple of reasons. First Chaos Group no longer support this feature and encourage users not to use it. Second reason is because you cant produce linear image for compositing and also you dont have explicit control over what is being corrected, so this makes you hard time, if you want to use normal/displacement maps or do texture baking.


Use V-Ray attribute instead. Each filenode has ability to add Extra V-Ray Attribute - Texture Input Gamma.







There is nothing more you need to do, input gamma is already set for you!






Set-up your buffer gamma look-up
Images are rendered in linear colorspace, thus you need to compensate for that.

Convert image to sRGB for RenderView ensures, that image looks correct in RenderView.

Anyway I encourage you to use VFB, just  tick that checkbox and you should be ready to go!









On the bottom shelf is little icon sRGB, just activate that and you're done with your linear workflow setup!
















There is some more settings to go
Well, here is couple of things how to optimize render speed based on what human eye can see.

If you want to speedup your renders, set gamma to 2.2 and tick "Dont affect colors (adaptation only)"

This will just weight sampling based on 2.2 gamma, so it will favor places which are more visible to human eye, and sample less, where noise is not that apparent.

If you intend to send your rendering to compositor for more complex task, you should have color mapping type set to Linear Multiply!

Linear workflow check box must be turned off!


That's it for now, if you have any questions, please post them into comments.


Hi Folks!
















and welcome!

This is Babinsky, he will the BOSS of this blog for now and next months ;-)

Babinsky is hero character of experimental short film.
It has been animated in two weeks by the team of animators attending the summer workshop, check it out!

Anomalia Pro: Animating a 3D Short Film


Concept is quite unique, core of this project is in fact education while having fun :) If you never heard of Anomalia, I'll encourage you to check it out!

Well, now, when animation is done, David, me and some other people work hard to make it beautiful and amazing for the rest of you. There is still plenty of work to be done, including look-dev and textures, lighting, compositing along with editorial and sound.

I'll be posting mostly some more technical and production oriented articles about workflows for animated production, specific look-dev, texture painting and renedering how-to articles and so on. I'll start almost the same way like we have started - general workflow.

Heaps of articles how to do certain task, exists on the internet, but I hope you will benefit from broader context, while all the tasks and ideas are based on single project.

I'll try to cover as much as I can, hopefully everything since stages right after animation till final master. If you have any ideas or wishes, what you would like to see, drop me a line and We'll see what we can do for you. If you just want to drop us a line to say "Hi", I encourage you to do it ;-)

Since I've never used any blog services, there is a couple of reasons why I've decided to do it now.
Simply I'd like to try help our community, provide little bit of motivation for creative people and share our happiness and struggle with you, guys :) All the content creation is about sharing motivation, inspiration and constant self-improving. I've taken a lot of it and I hope to give it back!

If you're just interested at pretty pictures, there will be other channels for you to check pretty soon!

Stay tuned!
Vitek