Friday, September 30, 2016

Project Notes: Bonsai Tree

Project Notes: Bonsai Tree

Objective:



I had two key objectives with this project. The first of which, was to create a complex object utilizing ZBrush. The second objective is to create an organic model.

I have been meaning to dive into ZBrush for a while now, and my previous attempts showed that I had a lot to learn. But the other projects had a lot more going on, and trying to add learning ZBrush into the mix was just distracting from my other objectives. So now, the whole focus of this project is ZBrush.

As well, I have plenty of models now that I’m happy with, but they’re all hard objects: props and buildings. So I want something organic to work with and display. I don’t want to deal with character creation right now, but I have always found bonsai trees to be interesting, and they offer a lot of variation and creativity.

Look Dev:

To begin the project, I first delved into pictures of bonsai trees. To Google and Pinterest I went, and I searched through dozens of images and picked trees that appealed to me, but also all offered something for me to reference down the line.




Then I did some research into the art of bonsai, which is not surprisingly, quite complicated. I found that the most popular tree species are Fig and Juniper. While almost any tree can be made into a bonsai, there are certain species that are chosen more often for their ease of growth and manipulation. 

Various coniferous trees are particularly popular due to their evergreen nature and hardiness. Broadleaf, deciduous trees are also popular. Thinking ahead, I am thinking that I will pursue a coniferous tree of some sort. I most likely will attempt to use a Fur Shader to create the needles later on. But I will get to that later.

Trunk and Bark surface are important in the style, whether the trunk is twisted or straight, contain dead branches are all living. As well, trunk orientation is an important consideration, taking into account where the apex of the tree is in relation to it’s base. There multiple variations here including upright, informal upright, cascade, and semi-cascade.

I must also take into account the Root Status. While most roots are planted directly into soil, other variations also will plant the roots atop stone, or sometimes inside of old trunks of other trees. As well, grass or moss may be planted alongside the tree.

Yet another important variant to consider is the number of trunks the tree will have. Some trees will be a single trunk, and very much resemble a miniature tree, while other trees are sometimes created with numerous trunks to invoke a forested feel.

After searching through various tree species, I decided upon a Juniper tree. The bark pattern looked like it would be fun to sculpt, as well it would offer me a fair challenge, rather than a smooth barked tree. I really liked the look of Cyprus and Cedar, but Juniper ultimately won out. 

I have also found that I like the look and style of the informal upright with twisting bark. I intend to add some dead branches as well to give some variation to my design. I also really like the look of the tree growing on top of stone. So if I’m correct in my research, my bonsai will be a: Nebikan Deshojo Deadwood Juniper.

Before I began modeling, I started out by sketching what I wanted my tree to look like. The key focus here was to get a pleasing silhouette and form that I could later turn into a sculpt. This also allowed me to explore various shapes before I became too invested in the model.






Modeling / Sculpting:

Once I selected the design I wanted to go with, I started off by creating a very basic model in Maya. The model was mostly worthless, but it provided me with the basic geometry that I would use to bring into ZBrush to begin sculpting. It covered the basic shape and slight twist.



I then took my object and exported it as an .obj. I then took the .obj and imported the object into ZBrush. 

Once inside ZBrush, I Dynameshed the .obj model I brought in from Maya. This produced a large number of polygons for me to work with and begin sculpting. I used the “build-up clay” brush and began to create the twisting bark texture that I desired.

I eventually got to a point where I could not get the detail I wanted with the amount of polygons that I had, so I divided the Dynamesh to get further refinement. I went through this process a total of 2 times until I achieved the desired result.



Once I had the the mesh where I wanted it, I then created a sublayer. On this sublayer, I then decimated the mesh and brought the polygon count from ~2 million, to 200,000 polygons. This way, Maya would be able to read the file without crashing or chugging. I then exported the sculpt as an .obj and brought it back into Maya.

With the model now in Maya, I had the sculpt, but the mesh was an utter mess and completely unusable. So I created a new texture, that I then animated the transparency on a scale from 0 to 1. This way, I could adjust the transparency of my sculpted object by using the time slider. I then created a new object, to generate geometry. I selected the sculpt and selected the “make live” button, and then selected the quad draw tool on my new object.

From there I began to manually draw the polygons for the object. I was pretty thorough on this step, as I intended to create a very high resolution model. What I did not anticipate was how long this step would take. Nonetheless, I eventually finished the retopology with a pretty decent edgeflow and minimal triangles. The triangles would disappear anyways once I added subdiv layers.

After retopping, I brought the model back into ZBrush to create the displacement map. I discovered that I did something wrong when I created the sublayers. As such, I would not be able to create the displacement map. But no worries, I could create that with little trouble manually in Photoshop.



I utilized a box modeling method to create the stone and the terra cotta pot. As well, I created small pebble like stones to populate the pot.

For the branches and the leaves I took a different approach. While initially, I intended to create the leaves with a fur shader, I quickly realized I really didn’t know where to begin with that, considering the leaves were different than I had originally thought. 

While I’ve certainly seen the varieties before, I had for some reason always assumed that there were only two types of leaves: broad leaf and needle. It turns out, there is a third (probably even more, but I digress), scale-like. Juniper leaves happen to have scale like leaves. 






So because of the leaf type, I instead hand modeled the leaves, and then used lattice deformers to give them further individuality. I duplicated the leaves and populated them on the branches, which I created by extruding cylinders along CV curves. This method created a huge poly-count though and severely slowed my computer.

Texturing:

The majority of my texturing for the bonsai was already done with the sculpt. But as I mentioned above, something went wrong at the back-end of the export, so I had to rely on my own displacement map in Photoshop. This turned out quite well, and I was pretty pleased with final result. 

Creating the UVs were a challenge though. Because of the complexity of the sculpt, there was no real clear way to begin the process. I started by just pulling large chunks that seemed to flow together, flattened them and smoothed out the UVs. Once I had all the pieces, flattened, I then stitched them back together to try to get one big cohesive piece so I could avoid seams. This was not possible, unfortunately, but I did manage to get it into two primary pieces, and then a few smaller pieces for the branches.

The leaves were shaded using a subsurface skin shader, very similar to what I used in my Raspberry project previously. I think it resulted in a nice color and translucency. 

Rendering:

When It came time to render, I had originally set up a very basic scene to render, but due to the high poly count, and the numerous displacement maps I had running, it was causing my render to not work very. So I deleted everything but the essentials model and set a Physical Sun and Sky to render.

Once I had my initial renders, I then brought them into Photoshop to make a few color corrections.

Conclusion:





All and all, I am quite pleased with how the project turned out. I think I accomplished my goal of creating an acceptable sculpt in ZBrush, and I know feel comfortable with the software to begin exploring it’s wide variety of uses. I would like to figure out what went wrong when I attempted to create the displacement map, but I at least know where to look when I approach that on my next sculpt.


I am not very happy with how my leaves turned out, but I will have to look at better methods of producing leaves. I will perhaps look into instancing in the future, or really exploring the fur and hair shaders, as well as any foliage type brushes that may be available. But, the leaves were not the primary focus of my project. 

Monday, September 19, 2016

Project Notes: Dhoros Greek Orthodox Church



objective:

So while my last few projects have been heavily focused on materials, texturing, and lighting, what I really want to accomplish with this is a nice exterior model. Aside massive exterior sets I created back in college, I have not produced many high quality exterior models. Nearly everything I create is a prop, whether it be a small object like my teapot or a vehicle. So with this project, I want to create a high-quality model of a building. Specifically, the Dhoros Church just down the road from where I've been house sitting.

Look Dev:

The church is (obviously) not small enough for me to take the standard reference shots that I would with a small object. No photograph can I take really encompass the entirety of the building. So my first approach was to figure out the perimeter. My foot is almost exactly one foot in length, which makes for a nice measurement tool. I walked the perimeter and counted my steps, which I then recorded onto a piece of paper and drew a rough outline. it's not perfect, but it will allow me a good enough approximation. I tried to use google maps, but the resolution was so bad, I had to resort to this.

After getting my perimeter scoped out, I then took as many pictures as I could to document the many sides, and angles. So with all these photos, I should be able to reproduce the church.

For the tile roof, every home around here as the same, so I was able to pick one up in the yard and use it as my reference.

modeling:

I began the first model by creating a rough and basic shape. I was not going for real accuracy with this, but rather was trying to get the form and key shapes and blocked. Because I did not have the greatest reference photos nor an accurate measurement perimeter, I knew there was going to be some tweaking that would need to be done. As well, this allowed me to better plan for my objects I would be modeling later.

With my reference model created, I set the transparency to about 30% and then began my modeling shapes on top of the reference. I decided to opt for multiple objects, as opposed to one single mesh. I chose this to simplify the geometry as well as to give me more control in my UV and texture process later one.

I had three key objects: the main body of the church, the bell tower, and the central dome. After these three keys pieces, then I modeled pieces that were duplicated throughout such window frames, window inserts, door frames, doors, and various other decorative pieces.

Because the church is Greek Orthodox, there were two distinct features present across the whole model. The first is that of hard edges and octagonal geometry. This is most notable in the central dome, which is an octagon. The second is the heavy use of arches. There are both decorative and supporting arches across the entire structure. 

The arches to get the look right, I used the bridge tool, setting the angle of curve to either 15 degrees or 30 degrees depending upon the specific spot. I found that these settings provided a nice arch when I added in subdivisions and was quite easy to work with. When needing to make a keystone at the top, as some required, I simply extruded the top face and then scaled up the specific spot.

The most complex geometry was created the decorative iron work above the doors and the single side door. In both cases, I utilized the bridge tool extensively to get arches and curves. I also meticulously extruded and individually modeled each sun ray.

The tiled roofs were pretty simple to create, I utilized the box model method that I've been using mostly throughout and ensured that the pieces would fit and overlap each other nicely. Here I broke from reference a little, because I did not want to create a crazy amount of geometry. I enlarged the tiles so that I could keep it down to around 800 tiles total. If I had gone by their actual size, I would have been far closer to 20,000 tiles. While it would have been more accurate, I do not think that my change detracts from the look, and is worth saving time for rendering and computation.

Overall, I was able to keep the geometry rather low and only added additional geometry sparingly. I instead utilized the Mental Ray Subdiv approximation throughout at a level of 4-N and also softened Normals. However, in order to get the Subdiv to work properly I still did have to go in and add a little more geometry. Most notably, I added small bevels at all sharp corners.




texturing:

UVing the objects were pretty straightforward. The approach I used for the main building and bell tower was to start with an automatic mapping. With the Automap created, I then sewed the pieces together to get my the UV sets. Because the models were pretty square, this worked out quite well, and I had a minimal amount of smoothing and unfolding to do. 

The central dome required a cylindrical projection, combined with a y-axis planar projection, but again, the object remained a rather simple one to map.

I did run into one issue however with a few of my window fillers. The problem is that I used booleans to cut circles and clean the mesh. What I did not realize until now, was that doing this prevents manipulation of the FOA. While it can still have a projection, I could not move the handles inside the UV editor. Luckily I remembered a tutorial I watched years ago, that went over the UV process before all these tools became available. I keyed the vertices of my object on 1 frame and then scrubbed the timeline a bit and manipulated to flatten the vertices and scale them how I would want them to appear as FOA. With this flattened version, I then projected a planar map. From there, I then scrubbed back to the original geometry shape, but with the new UV projection applied and then deleted the animation. While not a perfect project by any means, it was by far better than not having any projection at all.

With the FOA created, I then went into photoshop and created my texture maps. I wanted to keep them simple, but I really wanted to capture the appearance of sandstone that really was characteristic of the church as well. I opted to create three maps: a diffuse, specular, and displacement. I added a Normal map as well, which I used Perlin noise to give a random bumpy feel to the rock.

All of the materials were mia_material_x materials, to which I gave a roughness value of 1.0, and glossiness of 00:15. This gave the materials a sandy stone look, which was exactly what I was looking for.

For the objects I did not UV, I instead created shaders such as for the tiled roof. These were simple, but aside from having applied maps, still followed the same principle as the textures.

Applying displacement maps was an interesting, yet successful endeavor overall. Initially, I ran into the issue of having all of my hard edges and seams split open and leave ugly gaps throughout. I was able to fix this problem by using Subdiv approximation and Mental Ray. This resulted in fixed seams, but also resulted in rounding out of awkward geometry. Because of this, I was required to add more geometry, but I still managed to keep the poly count down.

Rendering / Lighting:

Cyprus is a pretty sunny country. Everything is under intense sun almost year round, so I figured that the best way to render this out was to apply a Physical Sun and Sky. I tweaked the Gamma filter to 1.1 and did a few of the basics such as adding ambient occlusion, bumping up the quality, and a few other such items.

I was really surprised that the final renders were so quick. Considering that most objects had a displacement map, and all had at least normal maps, I was expecting longer renders, but each image came out to around 5 minute render times.

conclusion:

I'm really happy with how this project ultimately came out. The model looks really good and captures the building as it stands in Dhoros. The texture is pretty close, and the church does justice.

From a learning point, I'm really happy with what I got out of it. I picked up a lot of knowledge on displacement maps, Subdiv approximations, and various workflows.

There are a few areas I'm not super happy about though. The textures, while acceptable, I do believe could be improved upon. They are okay, but all could use a little more finesse and adjustment. As well, due to the issues I ran into with the Subdiv approximations, I was forced to add geometry after the fact, which resulted in a not perfect edge flow. In the future, I'd like to plan for this in the beginning as opposed to force it work towards the end. But basically, this project has made me feel far more comfortable in attempting more complex geometry utilizing displacement maps and textures.


I'm also happy to finally put up a building model, considering most everything else I have is a prop.




Thursday, September 8, 2016

Project Notes: Turkish Coffee Pot


The murmur of voices in a dimly lit cafe. The drone of an oud in the distance. The heavy air of hookah smoke floating through the air, with the pungent aroma of cinnamon and anise. Tea poured from a relic teapot, on a worn, rough hewn, wooden table, in an intimate corner of Istanbul. 

This is the feeling I want to evoke.

Objective: 

In my recent projects, I have come across two realizations. One, my metal textures are severely lacking. Two, I keep trying to bite off more than I can chew. So what I really want to accomplish in this project is to produce an exceptional metal texture. 

I’m inspired by what looks to be a Turkish (probably Cypriot) coffee pot. It is old, and tarnished, and looks to be made of bronze. Though, bronze does not tarnish, so it is some other sort of metal, so I will figure that out shortly.

My key focus will be on creating the texture. I want the model to also sell the fact that the object is a little beat-up and worn, but the texture is the key here. 

After that, I want to create an atmosphere with my lighting/rendering. I want to create a night scene, lit by candle or lantern - something dim and warm.

The scene itself will be minimal, and is not the focus of this project - though I do intend to make it nice.

Look Dev:

So upon initial, closeup viewing of my reference, it turns out it is not tarnished at all, just dusty (so it is indeed bronze). This is not exactly what I want, but it still provides excellent reference, I will have to go online, or look around for something that will serve as further reference.

While it is not tarnished, there are small spots and dents throughout which I will replicate.

The teapot has small engravings which I will be able to tackle through a displacement map. I do not plan on attempting to utilize Zbrush at all in this project.

I tested the lighting that I wanted by putting the coffeepot in a dark room and shooting it with my iphone against three lit candles. It should provide great reference when I get to the lighting stage.



Modeling:

I created the model by starting off with a cylinder that I divided into ten segments with three cap segments. I used this to create the primary body of the pot. I then deleted faces to create a hole and then extruded out to create the spout. For the handle, I did simple extrusions until I got the basic shape I wanted. 
The top was created much the same way, starting with a cylinder. I then extruded up and adjusted the scale of my edge loops to create the curves.

The hinge was created with a simple box that I then added various edge loops and adjusted the shape to meet.

In preparation for the high-poly smooth, I added numerous edge loops to reinforce hard edges. I also utilized bevels to create the divots in the handle. 

During the smoothing process, I ran into an awkward issue during which time it caused Maya to either crash entirely, or to generate new (unwanted) geometry. Trying to delete this geometry resulted in a crash so I had to pursue other methods to smooth. Ultimately, I found that I needed to switch from an Open-Subdiv Catmull Clark method to a Maya Catmull Clark smoothing. The result fixed my issue, though did generate far more polygons than I was anticipated. In the end, this was not an issue, nor undesired, but had this been a different model or if I’d had polygon limits, it would have presented a problem.

To create a little extra variation, once I had my final high poly model, I then utilized soft select to create dents, and other imperfections evident of a hand-hammered pot.


Texturing:

I UVd the model entirely within Maya. I decided to create one large map, encasing all three objects, as opposed to three separate maps, to ensure continuity of texture, and contrasting scale. Due to having three objects together, as well as no limit to render, I chose to create a 4k map to use.


I started off with a mia_material_x. I have used this in past to good effect, however, I usually don’t modify the materials much beyond adding a color map or a bump map - generally I use the presets. However, I know that they do well with Mental Ray, so that is where I started. I spent a bit of time trying to perfect the texture, but I just couldn’t get it to what I wanted. The material looked pretty much like my reference. Since bronze doesn’t rust or tarnish this was technically correct, but not what I was going for. I applied a hand drawn image of a flower as a displacement map, and then used a layered color map to add paint inside the flower engraving. While the resulting texture looked fine, it wasn’t what I wanted - plus the hypergraph seemed a little cluttered for such a simple material.


So I decided to create another material to see if it would fare better. This time I chose a Blinn material to begin with. I used a layer node to mix color and diffuse maps for my resulting color map, and then used another layer node on top of that to add the paint for my displacement map. The Blinn seemed to produce better results than the mia_material_x but still wasn’t quite what I wanted. However, I was happy enough with my result for the scene I wanted to create.

Additional Assets:

Once the teapot was finalized, I then went on to create the additional assets I wanted for my scene. I decided to keep the scene light so only created a few other items. 

I made a rough wooden table and stool. Both of these items I made by starting off with boxes and getting a rough shape. Then I selected random edges across the models and created bevels and chamfers. With these created, I then smoothed my mesh and went into soft select mode and moved vertices around to give it a more organic and worn feel. For both of these models, I created a single material that I applied to both. Because of how dark the scene was, and the distance away, I elected to use a Normal map instead of a displacement map.

Atop the table I created a simple cloth. This was created procedurally in Maya. To it I applied a normal map and color map to achieve the look I wanted.

I also created a teacup model which was basically just a cylinder. For it’s textures, I followed the same format and files as I used for the teapot, but I altered the colors to be a more gray look.

The wall and floors were both simple planes upon which I projected a strong displacement map utilizing stone textures I got from the internet.

Lighting / Rendering:

I had fun with the lighting for once on this project. I knew that because this was supposed to be a dark night scene, there would be no need to create an area or spot light. Instead I created a volume light and two point lights. Both lights were set to an orange color as I wanted them to be mimicking the color that a lantern would give off. Once I got the lights set up and was happy with the result I began the rendering process.

Rendering was interesting this time around. I ran into an odd issue, half of my objects would render correctly in Mental Ray, and the other half would only render correctly in Maya Software. Ultimately, I decided to create various render layers for the assets, and comp them together in post. This actually worked out quite well for me.




The post comp allowed me to have more control over the individual items of my scene. I was able to add slight blurs to the background as well as a very light smokey atmosphere. The table and cloth I felt were too bright initially, so I brought them down some as well. Because of the nature of my layers, I did lose my shadows though. But, luckily, I did have a beauty shot for reference, so I used that to go in and manually paint the shadows and reflections on the table from the pots and cups.

Conclusion:

So looking back at the objectives I set for myself in this project, I am pretty happy. My metal materials, while not the perfect nor exact look I was going for, do sell me on the metal texture, as well as look pretty spot on to my reference. 

The scene I was going for I think I hit perfectly. I love the atmosphere and lighting I managed to achieve, and I’m very happy at how I was able to keep the scene very minimalist. As well, I am happy at my ability to create simple work arounds the various problems that arise, rather than sweating the small stuff.


I learned a bit in the creation of the materials and objects, and am feeling far more comfortable in lighting and rendering abilities. I have just now seen that Maya 2017 is switching to Arnold Renderer as the default render, so I will have to make a point of learning that very soon, but that is the nature of this industry I suppose.