Sunday, December 9, 2012

matcap's

MatCap™

From ZBrushInfo

Jump to: navigation, search
by Meats Meier
What if you could create a surface material and lighting environment simply by painting an object so that it looks like you want it to look? What if you could create that surface material by sampling points from an existing image that already features the material and lighting environment you want?
  • No tedious tweaking of numerical material values.
  • No need to set up any lights.
For a great many (probably the majority) materials and lighting environments, this is exactly what MatCap, a new ZBrush proprietary feature, allows you to do.

MatCap™ - using this ZBrush feature

From ZBrushInfo

Jump to: navigation, search
The appearance of an object depends on several things; the surface normals (which determine how the object is shaded), the point from which the object is viewed, the lighting setup (orientation and types of lights) and how the surface reacts to that lighting (for example, how shiny it is).

The MatCap tool uses calibration markers to capture this information from photographs and other images. Each marker samples a single point on the image, defining the surface normal and capturing the color. Several samples are used to build up a material map that simulates the lighting and material properties from the photograph.



  1. Pick a photo that shows a material you want to capture.
    • The material you want to capture should be uniform, i.e. of one color, roughness, etc.
    • The picture should show a surface with different angles, to capture all of the possible lighting conditions.
    • The surface can be illuminated by multiple lights, of any color.
    • Load the image into the Texture palette, select the Flat Color material and press Texture: CropandFill.


Define normal vectors for some points on the surface.
    • Make sure the MatCap tool in the Tool menu is selected.
    • Select a MatCap material in the Material menu, such as MatCap White.
    • Click and drag on the image to define a normal for the point you clicked on. This tells ZBrush what the angle of the photographed object is at that point.
    • Do this a few more times, to give ZBrush enough information to work with. Choose parts of the surface at different angles. 4-8 samples is usually enough.
    • To adjust a previously marked normal, move the cursor until the square marker appears then click and drag.
MatCap gives you feedback as you go along
    • The red arrow, and circle around it, let you see the surface angle you're defining as you create a normal.
    • The lightball that appears whenever you define a normal shows how the cumulative effect of all of the normals will look on a sphere.
Define specular normals.
    • Normals defined as previously shown apply to the diffuse color of the material (and shouldn't be sampled at specular highlights).
    • To define specular highlights, set a normal on top of a specular reflection on the surface, and then without releasing the mouse button, press and hold the Ctrl key and move the mouse to adjust specularity.
    • The direction of the normal will not change, but the distance and direction you move the mouse will determine the appearance of specular highlights.
    • Watch the lightball for visual feedback as you adjust the specularity.
Fine-Tuning
    • During or after defining all of the surface normals, you can adjust special MatCap controls at the bottom of the Material palette, to tweak the appearance of the captured material. Typically you don't need to do much.
Final result
    • The final material is very similar to the photo reference. Apply it to a model as with any other material.
Note: If you select a standard (non-MatCap) material to use with the MatCap tool, the material is not modified by the capture process. Instead a texture map is created in the Texture palette. This texture can be used to modify an existing MatCap material.

MatCap™ - Modifying Materials

From ZBrushInfo

Jump to: navigation, search
All MatCap materials can be modified to vary their effect and to create new materials. As explained in MatCap™ - using this ZBrush feature, some modifiers are for adjusting the material while capturing a material.

MatCap™ in Action: Photo Integration

From ZBrushInfo

Jump to: navigation, search
Because MatCap can easily recreate a lighting environment on a model's surface, it's ideal for realistically incorporating 3D models into photographs of actual scenes. Let's take a look at this in action.
The photograph is of chilies in a vegetable bin. We can see subtle color gradations, specularity, and (as will become apparent) other environmental lighting effects.
We'll start with a simple chili model, and set it up with a MatCap material initialized to an orange color sampled from the scene.
A simple chili model.
Enlarge
A simple chili model.
The model with an orange MatCap material applied.
Enlarge
The model with an orange MatCap material applied.
Let's sample the reddish tinge at the top right rim of one of the photographed chilies. As the mouse is dragged to position the MatCap vector, the light ball updates to indicate the effect that vector will have on the created lighting environment. The new MatCap lighting is applied to the model when the mouse is released.
The light ball at the upper right gives continuous visual feedback.
Enlarge
The light ball at the upper right gives continuous visual feedback.
Once the mouse is released, the shading is applied to the model.
Enlarge
Once the mouse is released, the shading is applied to the model.
Creating the specular lighting is similar, except that Ctrl-dragging out from the vector determines the sharpness of the specular effect.
Ctrl-click on a defined vector...
Enlarge
Ctrl-click on a defined vector...
...drag to sharpen the highlight...
Enlarge
...drag to sharpen the highlight...
...for a very shiny surface.
Enlarge
...for a very shiny surface.
After defining a few more MatCap samples (total of perhaps six were used for this example), and standard sculpting and other operations in ZBrush to place the chili (but not a single stroke of painting!), we're left with the final result:
Chilies just don't come from plants anymore.

MatCap™ in Action: Capturing Other Materials

From ZBrushInfo

Jump to: navigation, search

Capturing another ZBrush Material

Use the MRGBZ tool to capture Material Maps from the canvas.
To do this,
  1. Select a Sphere3D.
  2. Press Tool:Make Polymesh to convert it to a polymesh.
  3. Draw it on the canvas and press the 'F' key to center the sphere.
  4. Enter edit mode 'T'
  5. Divide the sphere several times to make it smooth.
  6. Select the Basic Material and modify it or load the material you wish to capture.
  7. Select the MRGBZGrabber tool and, when ZBrush asks you for confirmation about leaving 3D edit mode, press OK to drop the sphere to the canvas.
  8. Drag out a rectangle around the sphere to select it. By default, AutoCrop is on so the texture will be cropped tight around the sphere.
  9. Now, to add the cavity map properties, adjust the material properties of your basic material to your liking.
  10. Press and hold Ctrl and, using the MRGBZ tool, drag out a rectangle around your sphere.
  11. The new texture will be added right next to your previous texture and you will have two sphere to represent your real-time cavity enabled material!


Capturing a Material From Another 3D Application

Keep in mind that MatCap will only capture basic material properties such as diffuse color and specularity. It won't handle complex properties like transparency or procedural coloring effects.
  1. Open your other application and create a sphere.
  2. Apply your desired material to that sphere.
  3. Set the camera/render settings so that it will output a square document. 1024x1024 is good for most purposes.
  4. Scale the sphere so that it is very slightly larger than the render. (So that it just barely goes outside the render frame.)
  5. Render the image and export it as a PSD.
  6. In ZBrush, load the image into the texture palette.
  7. Select one of the MatCap materials and open its modifiers.
  8. You'll see a small texture patch that shows the current MatCap source texture. Click that and select the new image that you just imported.
That's it! You can now draw a sphere on the canvas and apply your new MatCap material to it. It should look just like how the sphere had rendered in your other application




 

No comments:

Post a Comment