Vector rendering

From TOI-Pedia


Introduction

Vector rendering uses fills for meshes and lines to emphasize the edges of the object. Vector rendering can thus be used for more technical and abstract visualizations. The vector rendering method does not support textures. When exporting to a vector format shadows and reflections can not be used.

Vector mental examples.jpg

Vector render with post processing steps in Illustrator.

The workflow for vector rendering is normally placing the cameras, creating a light setup and adjusting the common render settings and those specific for vector rendering. Like with all rendering methods the workflow is a process of trial-and-error, adjusting cameras, lights and settings.

Shaders (Materials)

The Vector render plug-in will only work using the Maya Base shaders: Lambert, Blinn and Phong. Assign Lambert shaders for all diffuse surfaces and use either Blinn or Phong for reflective surfaces.

Light setup

Point lights are the only lights in vector rendering that can cast shadows. Other lights can be used, but won't cast any shadows.

The light setup for vector rendering generally consists of 3 point lights: a three-point lighting setup. These 3 lights all have their own purpose which should be kept in mind when placing.

For architectural scenes, don't forget to place a light beneath your model (in most cases a 4th light is used) to illuminate the bottom of cantilevered parts.

Make sure the point lights are not too close to the model otherwise spots will appear on the model.

Shadow

The vector rendering method only allows for basic shadows. These can be created by letting one or more lights cast a shadow. In a normal light setup only one of the point lights (the key light) acts as the sun (direct lighting) casting a shadow. For interior visualizations or for instance a stadium more lights might be added and set to cast shadows.

To make a point light cast a shadow select the point light and open the attribute editor > Shadows > Raytrace Shadow Attributes > check Use Ray Trace Shadows. The channelbox can also be used to turn on the raytrace shadows. Before the shadows will be rendered these also need to be checked in the render settings. Go to the Maya Vector tab > Fill Options and check the Shadows checkbox.

Pointlight shadow attr.jpg

If a point light is positioned to close to an object it will give a divergent shadow as the rays from the point light are divergent. Unless when the point light is for instance supposed to simulate a lamppost this might be an undesired effect.

Render settings

To use the vector rendering method open the Render Settings by going to Window > Rendering editors > Render settings or click the outer right movie clapper icon in the status line. Set the Render using to Maya Vector.

If the Maya Vector option is not shown in the pull-down menu of the Render Settings, go to: Window > Settings/Preferences > Plug-in Manager and make sure the check-boxes for Vectorrender.mll are checked.

For vector rendering specific image formats can be chosen in the render settings common tab. All vector rendering settings are found in the Maya Vector tab.

Image formats

In the common tab > image file output > Image format on the top of the list above the separation line the following vector formats can be selected: swf, swft, eps, ai and svg. When creating a vector animation use either swf or svg. To play swf the Flash Player plug-in must be installed, while svg uses an internal script or JavaScript to run the animation. When selecting either of the two format specific settings can be set in the Maya Vector tab > Image Format Options. To render an animation use batch rendering.

When you render your model the image in the render view is a bitmap image which you can not save as a vector image. The vector format file is saved (by default under the scene name) temporarily in the image folder of your project. Open the folder using explorer and rename the file to prevent overwriting it by the next render.

Before rendering your model make sure your project is set. All rendered images are by default placed in the images folder of your project.

Vector render img formats.jpg

Maya Vector tab

Vector render settings.jpg

Appearance options

Curve tolerance and secondary curve fitting determine how accurately the curves of the model are approximated in the render.

The detail level preset and determine the level of detail in the render image.

Always keep in mind that the higher the quality settings are set the longer it will take to render the image.

Fill options

These settings determine whether meshes should be filled and how, with how many colors and if shadow, reflections and highlights should be rendered. When meshes aren't visible in the render it is because they are not facing the camera (the normal of the face is pointing away from the camera). When these meshes should be visible in the render check the Show Back Faces checkbox.

Maya vector fills and edges.jpg

vector renders: mesh gradient (no edges), no fill, single color, four color, mesh gradient, shadows and reflections.

Edge options

These settings determine if edges should be rendered and how they should be presented.

In some cases some of the edges in the model will not be displayed in the render. If it is desired to display them, you can use the following technique to solve the problem.

VR missing edges.jpg


If the angle between two adjacent surface patches isn't sharp enough, the vectorrender-engine will not show an edge. This threshold is configured in the render settings through the Min edge angle setting. This is a global setting, so it applies to all surfaces.


VR Edge detail render settings.jpg


In the Maya Vector tab of the render settings, locate the Edge Options section. First check Edge detail, then the Min edge angle can be set. This value will determine the minimum angle between adjacent surfaces for displaying the edge between both surfaces (surface patches). The default is 90 degrees.


When working with Nurbs this technique might not always do the trick. In that case you might have to adjust the geometry. See Rendering Nurbs > edges.

Rendering nurbs

Tesselation

When using Vector Render in Maya gaps on the edges of NURBS surfaces may appear. We use a simple example to minimize these gaps with the use of tessellation. These gaps may appear because Vector Render treats the NURBS surfaces as triangular polygon faces. With tessellation you can increase or decrease the number of triangles on surfaces. After vector rendering you can use Adobe Illustrator to edit the image. We explain some Vector Render Settings to optimise the appearance of the image in Illustrator.

The picture below shows the model we will use in this explanation.

Maya tessel persp.gif


This model will look in Vector Render like the picture below. This may happen without changing any setting of a NURBS surface in the Attribute Editor.

Maya vector render nurbs tessel standard.jpg

Click on a NURBS surface and open the Atribute Editor. Find the Tessellation attribute and click on the black triangle to see more options.

Maya tessel attr standard.gif

Check the Display Render Tessellation and Enable Advanced Tessellation checkboxes. After checking the checkboxes triangles appear on the NURBS surface in the viewport.

Maya tessel persp standard.gif

Change in Primary Tessellation Attributes the Number U and Number V by moving the sliders.

Maya tessel attr modified.gif

In the viewport you can see an increase of the number of triangles on the selected NURBS surface.

Maya tessel persp modified.gif

You have found the right setting for your model when you do not see any gaps on the edges of the NURBS surfaces in your Vector Render.

Maya vector render nurbs tessel modified.jpg

You may still notice that the round corners are angular and not round. Increase the number of U and V in the Primary Tessellation Attributes of all adjacent NURBS surfaces until you are satisfied.

Edges

In some cases some of the edges in the model will not be displayed in the render. If it is desired to display them, you can use one of the techniques described in this section.

VR missing edges.jpg

  • Changing the minimum edge angle (global)

See Vector render settings > Edge options.

  • Alternative solution

Another option is to detach the surface along the edge (isoparm).

Isoparm selected for detach surface.jpg

Note that you might need to delete History from objects that are dependent from this surface before you detach it. In the example above, the two planar surfaces highlighted in purple to indicate a history relation.

Detached surface.jpg

This will create two separate surfaces and will result in the edge being displayed when rendering.

VR missing edges solved.jpg

The benefit is that you can apply this to a single area where a problem with edge detail arises; you don't need to change the global setting, which may introduce unwanted effects in other areas of your render.


Common Problems

The option Maya Vector isn't listed in my Render Settings

Vector rendering requires a plug-in to be loaded. Go to Window > Settings/Preferences > Plug-in Manager. Check 'loaded' for VectorRender.mll. When you also check auto load, the plug-in will be loaded automatically when you start Maya.

Tutorials



Overview of Maya topics

Maya main index

Personal tools
Actions
Navigation
Tools