# Polygon modeling
## Goal
- Understanding Polygon modeling.
- Being able to create polygon geometry and to modify its properties.
------------

Polygons are straight-sided shapes (3 or more sides), defined by three-dimensional points (vertices) and the straight lines that connect them (edges). The interior region of the polygon is called the face.
When many faces are connected together they create a network of faces called a **polygon mesh** (also referred to as a polyset or a polygonal object).
## Differences between NURBS and polygon surfaces
The difference between NURBS surfaces and polygon objects is similar to the difference between vector images and pixel-based images in 2D drawing programs. NURBS surfaces are like vector images in that they are surfaces interpolated from resolution-independent curves. Polygon objects are similar to pixel-based images in that they are dependent on the number of polygon faces for their resolution.
-------------
# Fundamentals
## Object vs. component mode
1. Object mode (transformation + shape + Input node)
2. Component mode (you can edit parts of an object)
## Polygon components
**Vertices, edges, and faces** are the basic components of polygons.
When you model with polygons you usually use three-sided polygons called triangles or four-sided polygons called quadrilaterals (quads). Maya also supports the creation of polygons with more than four sides (n-gons) but they are not as commonly used for modeling.


## Normal
Normals are imaginary lines perpendicular to each point on a curve or surface (NURBs), or to the surface of a polygon (Polygon)
In Maya, normals are used to determine the orientation of a polygon face (face normals), or how the edges of faces will visually appear in relation to each other when shaded (vertex normals).
- Face normal


- Vertex normal

You can modify the shading of individual polygons by manually editing the vertex normals associated with the polygon mesh. Since they are always perpendicular to the curve or surface, the way normal lines point toward or away from each other can reveal subtle curvature.
### Shading
In the real world, two main factors determine the appearance of a surface: what an object is made of, and light.
In Maya, the appearance of a surface is defined by how it’s shaded. Surface shading is a combination of the basic material of an object and any textures that are applied to it.

### Texturing
The below image shows how to do UV mapping and the use of place2DTexture node for the 2D texture placement.
- [Maya help: 2D placement](http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=GUID-94070C7E-C550-42FD-AFC9-FBE82B173B1D)

## Smoothing
- [Maya help: smoothing polygons](http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=GUID-8A5D0FF0-9BA1-435F-A4CA-53183311B819)

___________________________________
## Creating polygons: using primitives or creating from scratch.
- Using primitives (Create / Polygon Primitives)
- Creating Polygon from scratch (Mesh Tools / Create Polygon Tool)

Primitives in Maya
## Editing in component mode
- Transform vertices, edges, and faces
- Split faces using snap (Mesh Tools / Multi-Cut)
- Combine or separate meshes
- Merge vertices, edges, and faces
- Delete vertices, edges, and faces
- Append the deleted faces (Mesh Tools / Append to Polygon)
- Extrude faces or edges (Edit Mesh / Extrude)
----------------
# Invalid polygon geometry
Some types of polygon geometry will not work in Maya. Invalid geometry includes vertices that are not associated with a polygon edge and polygon edges that are not part of a face (dangling edges).
## Solution
- Converting polygon faces to triangles is a quick way to ensure non-planar faces render properly.
- Or converting polygon faces to quads is a good way to clean up polygons or reduce the number of faces.

## Two-manifold vs. non-manifold
- Polygonal geometry can have different configurations or topology types in Maya. Understanding the characteristics of these topologies can be helpful when you need to understand why a modeling operation failed to execute as expected.
- **Two-manifold topology polygons** have a configuration such that the polygon mesh can be split along its various edges and subsequently unfolded so that the mesh lays flat without overlapping pieces.
- **Non-manifold topology polygons** have a configuration that cannot be unfolded into a continuous flat piece. Some tools and actions in Maya cannot work properly with non-manifold geometry. For example, the legacy ***Boolean*** algorithm and the ***Reduce*** feature do not work with non-manifold polygon topology. The image below shows three examples of non-manifold topology polygons.

The following operations in Maya can produce non-manifold geometry:
- Select Faces or Edges and select Edit Mesh > **Extrude.**
- **Normals > Reverse** (without extracting geometry).
- Edit Mesh > **Merge** Components.
- **Delete** Face.
- Edit Mesh > Merge Components to Center
You can convert non-manifold topology polygons into two-manifold topology (including the less obvious case of adjacent faces with opposite normals) using the **Mesh > Cleanup** tool in Maya.
__________
## Modeling Toolkit
Modeling Toolkit used to be a plug-in called NEX, that has been integrated within Maya since 2014. It integrates component-level selection and editing tools together (such as selecting vertices, edges, faces, etc., and extruding them, for example) for a more streamlined modeling workflow.

The location of Shortcut in the Maya GUI

__________
## Inspiration
- Low poly art:
[Timothy J. Reynolds](http://www.turnislefthome.com/33005/324719/work/low-poly-isometrics),
[AWWWARDS](http://www.awwwards.com/low-poly-illustration-what-s-the-secret.html)
- Apple iPhone 3d diorama animation video [Youtube](https://www.youtube.com/watch?v=Em2WhCa8cgE)
- Paper City [Vimeo](https://vimeo.com/67658001)
- Modeling based on the still-life masterpiece painting by Pieter Claesz [link](http://commons.wikimedia.org/wiki/File:Pieter_Claesz_001.jpg): HOMAGE TO MASTER CLAESZ By artist KORNÉL RAVADITS.
## Reference
[Maya 2016 online Help](http://help.autodesk.com/view/MAYAUL/2016/ENU//)
- Art of Maya [pdf link](http://web.cse.ohio-state.edu/~parent/classes/682/MAYA/art_of_maya.pdf)
(Polygon modeling. p.48~49.)
_______________
# Review
## Assignment
- [Lab 1](http://2016datt2500.tumblr.com)
- [Lab 2](http://2016datt2500lab2.tumblr.com/)
- [Lab 3](http://2016datt2500lab3.tumblr.com/)
- [Lab 4]((http://2016datt2500lab4.tumblr.com/)
## What is NURBS modeling?
- [digital-tutors video (1:43).](https://www.youtube.com/watch?v=m9U_XmnHQMU)
-----------------
# Lab
## To do list
- Lab practice A: **exercising basic polygon editing**
- Lab practice B: **your toy car**
- Lab practice C: beautiful condo
- Lab practice D: more buildings
- Lab practice E: vector rendering
- Lab practice F: Boolean operation
-------------------------------
## Lab practice A: exercising basic polygon editing
- Transform vertices, edges, and faces
- Split faces using snap (Mesh Tools / Multi-Cut)
- Merge vertices, edges, and faces
- Combine or separate meshes
- Delete vertices, edges, and faces
- Append the deleted faces (Mesh Tools / Append to Polygon)
- Extrude faces or edges (Edit Mesh / Extrude)
-------------------------------
## Lab practice B: your toy car

-------------------------------
## Lab practice C: beautiful tall building
Reference: Absolute World [wikipedia](https://en.wikipedia.org/wiki/Absolute_World), [designApplause](http://designapplause.com/news/people/mad-architects-studio-gang-win-chicagos-george-lucas-museum/42701/)



-------------------------------
## Lab practice D: more buildings
 

-------------------------------
## Lab practice E: Vector rendering
### Rendering
The renderer is where all of your scene data and settings are handed off to the software and render calculations are performed that result in final bitmap images.


________________________
## Lab practice F: Boolean practice
- Polygons
1. Create more than 2 Polygon objects.
2. Choose model 1 and model 2.
3. Click the Boolean operation from the Modeling menu set -> Mesh / Booleans / select among 'Union, Difference, and Intersection'.
-----------------------------
# Assignment
- By Sunday Oct 9th midnight, please upload screenshot images of your polygon models to our class web portfolio Tumblr (caption: **"a04 by your name, date"**):
1. a fun toy with your own design.
2. a beautiful condo with your own design.
Optional assignment: a house or other building with your own design.
- Let's start working on your project 1: [still life modeling](project.html).
____________________________