BACK TO TEACHING HOMEPAGE    

GA2211: Hard Surface and Organic Modeling

This course covers advanced modeling techniques used for building organic and hard surface objects and environments.

 

JUMP TO A SPECIFIC SECTION:

Week 6: Zbrush Flowers and Leaves

Sculpting Leaves in Zbrush (VIDEO COMING EVENTUALLY)

 

 


Creating the Leaves: Planar Mapping

For the leaves, I will be using an 8 quad plane, shaped to be narrow (as you see below). I will then select the plane, and choose Polygons-Create UVs-Planar Mapping-Options.

In the ensuing options box, Here the settings that I will use. Make sure that "Keep image width/height ratio" is check to preserve the proportions of the 3d model to the 2d representation. Also, make sure that you are mapping from the Y axis (in this case at least, since my plane is oriented along the X-Z plane, Y faces up and down, and is the direction we want to be looking at when we create the map). Hit Project (or Apply) to create the UV map.

But what exactly are UVs?

UVs- are an additional component that coordinates 3d space with a 2d representation of that space onto a map (known as a UV map). Very simply, there will be a UV point wherever we find a vertex (at the intersection of multiple edges/at the corners of a face). However, there most certainly can be more UVs that verticies, as some vertex points will have there UVs seperated into different parts of a map. A line of UVs that are sepereated into more than one part is known as a boarder edge. Think of UVs like the city of San Francisco represtented on a Globe. There it is an identifiable place in 3d space and that is the Vertex. If there was a sudden Volcanic erruption underneath the city and it rose up off the globe due to the volcano underneath, we would have to manipulate the vertex since it has moved in 3d space. However the UV is like a representation of San Francisco on a map such as a Mercator or Robinson map. Even though the map is different between these two types, the city itself has not moved based on the way we draw the map. UV mapping will be discussed more in Materials and Lighting. The UVs define space differently from verticies in that that vertex points are manipulated in X,Y,and Z space (think of earth in terms of the larger galaxy), and UVs are manipulated in UV or local space (east-west and north-south).

Projecting UV Maps: These are all options that may be found under the Polygons-->Create UVs menu
For more Info on sub options, click here

The UV Texture Editor:

You can find the UV texture editor under Window-UV Texture Editor:

0 to 1 space-This quadrant of the graph that we see in the UV texture editor window is in the top right corner. It represents the positive space on the graph, and is where your UVs should be placed to prevent texture repeat. The other quadrants, as well as the area outside of the 0-1 space can be used to store UVs temporarily while laying them out, and then must be moved back inside the first quadrant of the graph.

cut uvs-This function is used to seperate UVs that have been sewn together so that the faces adjoining them can be independantly positioned and moved.

sew uvs-This option is used to connect two parts of the same uv that have been seperated by the cut uvs function or by mapping.

relax uvs-To automatically untangle and even out UVs distribution based on the geometry and the UV borders. Selecting target UVs (one sample is enough) and click the tool (Check Options!) to relax UVs. You may need to repeat this action to see the desirable result. Under the options, make sure to set Edge Weights to World Space instead of Uniform.

move an sew uvs-To merge UVs by selecting polygon components edges, vertices, faces, or UVs. To avoid un-necessary stretching caused by Sew UVs, use Move and Sew UVs instead. Number of vertices does not equal to number of UVs. Be conservative with the amount of UVs for game models. Sew as many overlapping UVs as possible.

align uvs-To align / straighten a roll of UVs. Selecting target UVs (minimum 2) and click the tool (Check Options!) to align UVs.

split selected uvs-Will split all selected UVs into one UV for each connected edge.

rotate uvs-Will rotate selected UVs clockwise or counter-clockwise. Select the target UVs, and click the tool.

flip uvs-Use these options to flip the UVs of the selected faces either horizontally or vertically. Horizontal is the default Direction. Open the option window (click the box beside Flip UVs) and leave it open. Select your UVs and choose the axis which you wish to flip by.

UV Snapshot -When you're finished laying out your UV map, you need to make a snapshot to use as reference for painting the actual image. Make sure all UVs are within the top right corner boundaries of the UV Editor and then (see 0 to 1 space) , in the UV Editor, click "Polygons > UV Snapshot". Define the output location, the resolution you'd prefer (256, 512, 1024, resolutions with the multiples of 2) and the file type. You should have a nice wireframe image in the output directory after you perform the operation.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Nowback to the plant. You can see how my 3d plane is being represented in 2d in the UV texture editor. Well, what we neeed ot do is to take a UV Snapshot of what we see in the UV Texture Editor so that we can export this out to Photoshop and use it as a guide for creating the transparency (alpha). I go to the Polygons-UV Snapshot window, and enter the settings you see below. I use 512x512 as my file size as it is a moderate, powers of two, size (which you will learn more about later on). I also set my image format as jpeg, since this file type does not natively support an alpha channel, meaning that the gridlines won't also create transparency.

Here's my file, opened up inside of Photoshop. I personally don't like painting ontop of the white lines with a black background which is provided, so I usually alter the image before proceeding.

First, I go to Image-Adjustments-Invert


---Then I double click on the Background layer to unlock it, and naming it Layer 1.
---I set Layer 1 as a Multiply later (the white will disappear, leaving only black lines visible.
---Then I create a new Layer underneath Layer 1 which I will draw on.

In this demo, I am only creating transparency, but generally, I would create color too. Here's a look a the whole process in more detail:

Here is an example of the broad, tropical leaf that I am trying to recreate:

I paintbucketed a black background (which is lighter here just so you can still see the outline of the UV snapshot, and I drew white on top of that. Whatever is white will read as solid, black as transparent.

Since my texture was wasting UV space (a concept you will also learn more about later on), I decided to add 2 more varriations to my texture flat, creating an atlas of 3 leaves, which I can position my UVs on to alter the look of each leaf.

Now I have to take this image which I painted on layer 2 and:
--- Select the whole canvas (Ctrl-a)
--- Copy the canvas (Ctrl-c)
--- Go to the Channels palette and create a new channel (this will be your Alpha1 where transparency is stored)
--- Paste the information that we just copied into Alpha 1: select the Alpha 1 channel and hit Ctrl-v for paste (edit-paste)
--- Go to the Layers palette again and create a new top layer and paintbucket it with medium gray (127,127,127 RGB)
--------------- If we were color mapping here, we would paint out actual leaf color instead, but that is for another time and another project
--- Save the image as a .TGA file format. This file format supports alphas (unlike jpg files for instance), and is the prefered file format for textures in Maya


Creating the Leaves: Linking a Texture in Maya

Now we go back to Maya. Go to Window-Rendering Editors-Hyperhade:

Click on the Lambert Icon in the Create section of the Hypershade, this will add a new material to the Hypershade materials library.

Double click that new Lambert 2 to open it in the Attribute Editor. Here you can name it something appropriate like Leaves.To attach a file texture, click the checker box next to Color. Since our transparency (Alpha) is storred in a color map (even though that map is gray), we only need to attach to the color slot. The Transparency slot will be automatically textured for us. Transparency can also be textured via a separate map, but this eats extra file space, and also isn't visible in the Maya viewport (by default)

Once the texture is selected and loaded in, there are 2 ways to assign the material to the leaf objects:
1---- select the object(s), then right click-hold on the material and choose Assign Material to Selection as you see below
2---- RMB-drag the material directly onto the object (this method you have to do 1 at a time)

I can then open up the UV texture editor. I made 2 more duplicates of the leaf here and have hit "6" on the keyboard to enter textured view. You can also hit the icon shown below. With the two duplicates I have edited the UVs so that I have some varriation. To edit the UVs, right click-hold, and from the component marking menu, choose UV. In the UV texture editor, you may edit the UVs just like any other component, with the move, scale or rotate tools. Set your maps so that they cover the areas you desire.

After a little bit of manipulation:

 


Creating the Leaves: Placing the Leaves

Now it's time to round out the leaves so that they have a more natural bend. I also bend them down the center so that they don't give away their "paper-thin" quality:

To make them easier to place, I will edit the pivot points of each leaf (one at a time)
---Get the move tool active and have an object selected
---Hit the Insert key (Home on a Mac) to active the "manipulate pivot point" mode
---Hold down "v" on the keyboard and move the pivot point to the middle vertex on the base of each leaf. "v" enables you to snap to vertex exactly
---Hit Insert (or Home) again, and you are done.

Since the leaves are paper-thin, we should make sure that they render as double sided (this is the defauly, but worth checking on)
You can find this information in the attribute editor in the object's Shape node under Render Stats. Make sure "double sided" is checked.

Now, click the large magnet at the top of the Maya interface while one of the stalks are selected. This will make that stalk live. The object will now display a dark green wireframe and the move manipulator will have a circle at it's intersection, rather than a square. Now you should be able to drag the leaves directly onto the stalk. Since the pivot point is at the base, this will hit exactly where it needs to be, and avoids minutes of painful moving and rotating to get into place. I am examing my reference here as well (image on right) to see how the leaves grow out of the stalk.

Repeat the process by duplicating, moving, and rotating leaves, making various stalks live until you complete the model. My finished version is 1,300 tris... a little dense, but considering the room I am placing it in, a doable polycount.

 

 

JUMP TO A SPECIFIC SECTION: