Saturday, January 12, 2013

Zbrush Render Passes in Photoshop by Josh Crockett



Zbrush meets Photoshop


ZBrush to Photoshop Composite




Basic zbrush to photoshop


create cool renders using ZBrush and Photoshop


angel_full_color_1720.jpg

 create cool renders using ZBrush and Photoshop.
Let’s get started.

Preparing model and document.
Create new document with size twice as bigger as image you want in result. I do that every time I render any model in ZBrush because in the end I shrink the image at half size to get rid of “jagged” lines. I also press AAHalf button to see a preview for smooth-rendered antialiased image.

double.jpg aahalf.jpg

Set up your model on the canvas as you want to see it rendered. You will need masks for easier selections at further comp stage. So just go through all subtools one by one and export image with Flat render turned on.

flats.jpg

As result you get bunch of images with masking for each separate subtools.

masks.jpg

There is also an alternative way to do that: Select each one of your subtools and fill it with a certain color from the ZBrush color palette. As result you get just one image with separated colors for different subtools. So you can group your mask colors depending on what kind of material you have. Here is how it works:

fill_object.jpg

After that you may no longer worry about the model itself and just concentrate on rendering. Save document as *.zbr file. It will convert everything you have on canvas to pixols. You can use that as advantage and add more small details to the surface.
Use Directional Brush with Stroke set to DragRect and Texture turned off. Also make sure you apply it at Zadd or Zsub mode. I used alphas of damaged metal, bullet holes, some logos, etc. You can also add some dirt using Simple Brush with Spray stroke and mode set to RGB. Here is an example how it works

alfa_apply.jpg

Light.
One thing you have to keep in mind is that the light in ZBrush doesn’t affect the same way to MatCap as it does to standard materials. For example: If you change the position of light and use Best render with Shadows turned on for Standard materials you get the full response of your settings including color of the light, highlight and shadow orientation. Dealing with MatCap you get only shadow orientation because MatCap material already keeps information about color of the light. So I usually render bunch of images with different materials and light setup and just combine them together.
Here is my light settings I used for rendering this model.

light.jpg

You can play with Shadow Curve and Shadow Length setting. Depending on what kind of lighting you want to get you may want to adjust these values. Also if you have too noisy shadows you can increase rays amount to get smoother GI effect

Materials.
I’ve found at ZBC tons of super-cool materials and I take my opportunity here to thank those people who do such great stuff and share that to ZBC community. To render this image I apply many different materials to the model and then combined the renders in Photoshop using blending modes of layers. Cool thing about MatCap I’d like to mention is that it’s easy to refine it if you’re looking for something more specific.
Here is a trick:
1.Create a square size document, 1024x1024 is fine.
2.Press “AAHalf” button to get Antialiased half sized image.
3.Create a sphere, subdivide it a couple times until you get it smooth, apply a MatCap you want to refine and export image. Make sure your preview shadows are turned OFF in render menu.
4. Exported image you can edit in Photoshop and do whatever you want from changing color to adding more highlights. If you want to stay in ZBrush just convert sphere to pixols and use ZBrush 2D brushes. To do that just turn off Edit Objet mode (“T” hotkey) and pick a brush you need.
5. Import your edited image of rendered sphere back in ZBrush. I just added more highlights and edited color a bit.
6. Go to Materials/Modifiers/Material Texture and replace old sphere image with a new one.

mats.jpg

You can go further. Combine this MatCap with ReflectedMap Material which is standard in ZBrush:

matcap2.jpg

Rendering and Comp.
I rendered the whole model with applied materials of different metals, some materials for the suit and skin. To reapply a material to your *.zbr document use Simple brush with “M” mode turned on. Select a material you want to apply. Set the stroke to DragRect and fill the model with the new material. Render image with shadows turned On and save it. As result you get bunch of images with different materials applied to it.
This is what I got:

materials_renders.jpg

I combined these renders in Photoshop using masks I exported from ZBrush earlier. It helped to quickly apply a material to proper parts of the model. During gathering all passes together I keep the image values pretty soft for easier control. I also try to avoid overdone shadows or highlights. You can always enhance shading/lighting/contrast after.
Here is an approach I use to organize materials using masks I rendered before:

masking.jpg

To add or enhance reflections at metal surface I put rendered reflection pass on top of rendered metal pass and used mostly “Color Dodge” mode. You can also use Soft Light or Overlay mode depending on what kind of metal or light type you want to achieve, just don’t over-burn the image with too many Overlay passes ? You can also duplicate the layer and keep at the same comp Color Dodge and Overlay for better control. Here is an example:

reflections.jpg

Regarding to different metal renders I mix the layers at Normal mode and just tweaking opacity of layer. When I’m pretty much done with general material look I move to scratches. Here is the trick:
As you can see from previous image I have a Base metal layer below Red metal. I did on purpose: if I use eraser on Red metal, the Base metal material will pop up. That is logically the same what happens in real world when a painted metal gets scratched. But there is a more flexible way to add scratches – it’s creating a mask. The advantage of that is that you can go back/forward in adding/removing scratches by switching color between black and white. This method is good for production texturing as well.

scratches.jpg

Here is a work-in-progress what I got using this approach.

wip_base.jpg

As you can see it’s still pretty flat and boring in terms of color/tone and texture details. So after this I will add dirt, do a quick over-paint. You can play also with fog pass rendered in ZBrush and apply it as Multiple or Overlay pass to enhance feel of depth.
Here is a trick you can use when refining an image: duplicate flattened layer and set to Overlay Mode. Then use Blur filter, play with the radius and pick one what works better. After you’ll probably want to adjust levels and reduce pure black. The image below shows the effect. As you can see the image after applying blur at Overlay mode layer has nicer mood because of contrast and filtered color flow.

blured_overlay.jpg

I did that overlay pass to all painted metal parts. After this I moved to other metal stuff and suit parts, refined the color here and there, painted a background, accentuated some highlights, added more dirt.
Here is work-in-progress image.

angel_wip_1720.jpg

At this point I thought it would be cool to change the light and background to more warm tone. So I duplicated the layer (flattened image), applied blur to it. Went to HUE/Saturation, shifted the color to yellow. Then I refined background a bit. I used a smoke photo and distorted/twisted the image to create the effects.
Here is screenshot:

finishing.jpg

I also wanted to desaturate a little some of the parts of armor, so I created HUE/Saturation layer control with mask. Here where you go to do that:

hue_mask.jpg

And then click here to create mask:

create_mask.jpg


Conclusion
This is pretty much all my tips & tricks for the process of rendering models using ZBrush and Photoshop. At the end I shrinked the image, adjusted a bit HUE/Saturation and added sharpness.
That’s it. Hope you liked that and hopefully you grabbed some useful tricks from this article.
Feel free also to check out my Training DVD about character design and modeling here:
http://www.thegnomonworkshop.com/store/product/544/

zbc_thumbnail.jpg
Attached Thumbnails Attached ThumbnailsClick image for larger version. 

Name: zbcthumb1.jpg 
Views: 1102 
Size: 13.1 KB 
ID: 154581  
Cheers, Vitaly

Rendered Using BPR/Photoshop with Yiannis Tyropolis






AMBIENT LIGHTING- OCCLUSION: I use the Flat Material with BPR AO and very high settings so I a very smooth ambient shading. When you use this pass as an occlusion you don't need to have so much detail but I don't use it like that.
KEY LIGHT - Basic Material with one light with relatively hard shadows, no specular on Material and no Ambient on the Light Palette. Shadow Strength to 1.

FILL- BOUNCE LIGHT
- Like the Key Light with softer shadows
 
REFLECTION - I used this for specular highlights, I think the material is HDRI_SKIN MATERIAL(of course it's not HDR) but any material with an image mapped would do. No shadows no Occlusion. The same direction of light like the Key

FRESNEL PASS
 - This the Fresnel Overlay Material. When I was setting up the passes I didn't know there was a material like that. As I was exploring I noticed that . You could do that differently, but this is by far the easiest .Very handy. no shadows or AO
 

DEPTH
 - self- explanatory
COLOR - Flat Color Mat. There you have your polypainting or textures
CHANNEL MATTES
 - Flat Color Mat. There you polypaint- fill your separate subtools with 100% blue, green, red color so you can separate them in post.
MASK- self- explanatory
BACK SCATTERING - I used a similar setup like the default shader on the SSS demoSoldier. I turn off the non SSS materials, No Shadows or Ao. I used the default position for the backlight. The settings change by the scale and resolution* of the image 
FRONT SCATTERING - Same Settings like Back Scattering but I used the direction of the Keylight.

The Document bkg is set to black or white depending on whether you Multiply, Add or Screen.
 

Compositing made with Shake and the workflow is similar in all node based Apps (Fusion, Nuke, etc) Does anybody care for the Node Tree?
 
I'm replicating the comp in PS so it's more convenient for most users to explain. You can have identical results.










about the comp...

A
 is the Upper Hiera
rchy, a Masks group, a diffuseLighting groupspec Reflection group, an SSS group and a Fresnel group, you can see the blending modes.



B is the middle hierarchy

Masks - these are all the masks of the different objects .With the ChannelsA/B/C you can separate every object, for example if you combine the green channel of the Channel Matte A an the green channel of the Channel Matte B you have the shirt.

Diffuse Lighting -
 these are the most important groups. You can control the lighting ratio by changing their opacity.
Spec Reflection - these control the different specular reflectivity of every object.
SubsurfaceScattering- you can see the objects that have this effect, by the name of the groups, every object has different intensity.

Fresnel - these groups control the different diffuse lighting reflection at the edges of the objects. You can see the color correction at the top of the hierarchy, that changes the hue, the same for every object.



C. is the lower hierarchy. every object masked.
Diffuse Lighting Subgroup - every group the contains the equivalent Light pass,multiplied by the Color pass, if there is color Balance adjustment layer is to control the hue of the light itself, like changing the color in the ZB Lights sub palette (It's not supported by BPR).
Spec Reflection Subgroup - every group contains the Reflection pass multiplied by the Ambient Lighting- occlusion pass.
SubsurfaceScattering Subgroup - every group contains the Front Scattering pass color corrected(color balance) screened by the BackScattering pass. Gamma corrected(levels) and intensity corrected( layer opacity).
Fresnel Subgroup - every group contains the Fresnel pass multiplied by the Ambient Lighting- occlusion pass

I 'd like to point, that renders with Sss, Ao, and Shadow need to change when you Scale-Frame the tool in a document, so whenever you change resolution and framing you have to change settings. Also the subpixel quality varies the result beside the antialising.
*whenever you don't see a blending mode, means it's the same as above