Category: Art

More Experiments with Trees

August 16th, 2012
Comments Off | Permalink

Every once in a while, I return to trying to make a good looking tree. Here’s a frame from my latest attempt:

Have I finally managed to create a tree that I’m happy with? Well….. no. But I do think this batch comes closer than previous attempts! I’ve had a workflow for creating base tree geometry for a while now that I’m fairly pleased with, which is centered around using OnyxTREE as a starting point and then custom sculpting in Maya and Mudbox. However, I haven’t tried actually animating trees before, and shading trees properly has remained a challenge. So, my goal this time around was to see if I could make any progress in animating and shading trees.

As a starting point, I played with just using the built in wind simulation tools in OnyxTREE, which was admittedly difficult to control. I found that having medium to high windspeeds usually led to random branches glitching out and jumping all over the place. I also wanted to make a weeping willow style tree, and even medium-low windspeeds often resulted in the hilarious results:

It turns out OnyxTREE runs fine in Wine on OSX. Huh.

A bigger problem though was the sheer amount of storage space exporting animated tree sequences from Onyx to Maya requires. The only way to bring Onyx simulations into programs that aren’t 3ds Max is to export the simulation as an obj sequence from Onyx and then import the sequence into whatever program. Maya doesn’t have a native method to import obj sequences, so I wrote a custom Python script to take care of it for me. Here’s a short compilation of some results:

One important thing I discovered was that the vertex numbering in each obj frame exported from Onyx remains consistent; this fact allowed for an important improvement. Instead of storing a gazillion individual frames of obj meshes, I experimented with dropping a large number of intermediate frames and leaving a relatively smaller number of keyframes which I then used as blendshape frames with more scripting hackery. This method works rather well; in the above video, the weeping willow at the end uses this approach. There is, however, a significant flaw with this entire Onyx based animation workflow: geometry clipping. Onyx’s system does not resolve cases where leaves and entire branches clip through each other… while from a distance the trees look fine, up close the clipping can become quite apparent. For this reason, I’m thinking about abandoning the Onyx approach altogether down the line and perhaps experimenting with building my own tree rigs and procedurally animating them. That’s a project for another day, however.

On the shading front, my basic approach is still the same: use a Vray double sided material with a waxier, more specular shader for the “front” of the leaves and a more diffuse shader for the “back”. In real life, leaves of course display an enormous amount of subsurface scattering, but leaves are a special case for subsurface scatter: they’re really really thin! Normally subsurface scattering is a rather expensive effect to render, but for thin material cases, the Vray double sided material can quite efficiently approximate the subsurface effect for a fraction of the rendertime.

Bark is fairly straightforward to, it all comes down to the displacement and bump mapping. Unfortunately, the limbs in the tree models I made this time around were straight because I forgot to go in and vary them up/sculpt them. Because of the straightness, my tree twigs don’t look very good this time, even with a decent shader. Must remember for next time!

Creating displacement bark maps from photographs or images sourced from Google Image Search or whatever is really simple; take your color texture into Photoshop, slam it to black and white, and adjust contrast as necessary:

Here’s a few seconds of rendered output with the camera inside of the tree’s leaf canopy, pointed skyward. It’s not exactly totally realistic looking, meaning it needs more work of course, but I do like the green-ess of the whole thing. More importantly, you can see the subsurface effect on the leaves from the double sided material!

Something that continues to prove challenging is how my shaders hold up at various distances. The same exact shader (with a different leaf texture), looks great from a distance, but loses realism when the camera is closer. I did a test render of the weeping willow from further away using the same shader, and it looks a lot better. Still not perfect, but closer than previous attempts:

…and of course, a pretty still or two:

A fun experiment I tried was building a shader that can imitate the color change that occurs as fall comes around. This shader is in no way physically based, it’s using just a pure mix function controlled through keyframes. Here’s a quick test showing the result:

Eventually building a physically based leaf BSSDF system might be a fun project for my own renderer.

Speaking of which, I couldn’t resist throwing the weeping willow model through my KD-tree library to get a tree KD-tree:

Since the Vimeo compression kind of borks thin lines, here’s a few stills:

Alright, that’s all for this time! I will most likely return to trees yet again perhaps a few weeks or months from now, but for now, much has been learned!

Shanghai Xiao Long Bao (small steamed buns with meat and soup inside, sometimes called soup dumplings) are one of my absolute favorite foods in Chinese cuisine. Some Chinese places in the US claim to have xiao long bao, but I’ve never been to a place in the US that gets it exactly right. Shanghai is the only place I’ve ever been where I can find perfect xiao long bao; of course, that means every time I’m in Shanghai, I head straight for places with xiao long bao. Established in 1900, the Nanxiang Steamed Bun Restaurant in Shanghai’s Yuyuan Gardens area is one of the most famous xiao long bao restaurants in the world, and hands down my favorite place to eat in Shanghai. Unfortunately, actually getting a seat at the Nanxiang Restaurant can take hours of standing in line…. it is sort of extremely popular.

Fortunately, it turns out the Nanxiang Restaurant has expanded! My dad and I recently found out about a new branch of the restaurant in another part of Puxi, so we decided to go try it out to see if it is as good as the original Yuyuan Gardens location.

31°13'54" N 121°27'17" E

Seriously, crab xiao long bao are absolutely incredible. This Nanxiang branch didn’t serve the xiao long bao on lettuce beds though, which was a bit disappointing. But they still tasted exactly like they should!

31°13'54" N 121°27'17" E

31°13'54" N 121°27'17" E

Usually at Nanxiang, I order just xiao long bao, in massive quantities. This time around though, my dad wanted to see what some of their other stuff was like.

Curry dumplings:

31°13'54" N 121°27'17" E

31°13'54" N 121°27'17" E

Egg noodle soup:

31°13'54" N 121°27'17" E

Curry crusted egg rolls:

31°13'54" N 121°27'17" E

The most amazing thing we found was something best described as a gigantic xiao long bao. Seriously, this thing is amazing… it even comes with a “Caution: Hot” flag on a straw for the soup inside:

31°13'54" N 121°27'17" E

31°13'54" N 121°27'17" E

31°13'54" N 121°27'17" E

For dessert, I got this giant mango icecream float thing. Not mango flavored icecream, but rather, mango chunks and mango juice with vanilla icecream:

31°13'54" N 121°27'17" E

Next post: I have no idea. Maybe more food? Maybe the place I got my Totoro from?

Shanghai is split in to two halves by the Huangpu River, a fact reflected by the names for the two halves of Shanghai: Puxi and Pudong, which literally translate to East of the Huangpu and West of the Huangpu. One section of the east bank of the Huangpu is known as The Bund; about 150 years ago up until World War II, The Bund was the site of the Shanghai International Settlement, controlled by Britain, the United States, and France. As a result of the former colonial influence, the Bund waterfront today is made up entirely of European colonial style buildings. The Bund’s architecture provides an interesting contrast to the ultramodern skyscrapers on the opposite western bank of the Huangpu, an area known as Lujiazui.

For this trip back to China, I’m not actually using my normal trusty Nikon D60. Instead, I’m using my brother’s Nikon D5100. In a few months my brother will be heading to Shanghai as well, so he asked me to bring his D5100 for him ahead of time. Since the D60, Nikon has made a number of huge improvements in the low light performance of their sensors, seen most prominently in the D3′s ability to take perfectly lit, noise-free images in the dark. Of course, the D5100 also has heavily upgraded low-light capabilities compared to the D60.

What better place to test out that low-light performance than the Bund at night?

Here are a pair of panoramas taken from the Bund. The first one is a full 360 degree panorama of the Bund and Lujiazui across the Huangpu River, while the second one is just of Lujiazui.

31°14'26" N 121°29'10" E. Click for huge version.

31°14'26" N 121°29'11" E. Click for huge version.

Some of the component images that went into the above panoramas:

31°14'26" N 121°29'10" E

31°14'32" N 121°29'11" E

At the northern end of the Bund proper is a giant concrete monument called the Monument of the People’s Heroes (what a typical Communist Party style name!). It looks kind of like a Forerunner structure from Halo (yes, I realize that reference paints me as a quite a dork). The monument is a pretty good place from which to get pictures of the Oriental Pearl TV Tower across the river.

Left: 31°14'32" N 121°29'11" E. Right: 31°14'37" N 121°29'13" E

Left: 31°14'40" N 121°29'12" E. Right: 31°14'46" N 121°29'10" E

31°14'40" N 121°29'13" E

The Monument of the People’s Heroes sits next to the point where the Suzhou Creek flows into the Huangpu. At night there’s usually a small fleet of old dredging barges parked in the creek confluence; during the day, the barges are used to dredge deep shipping lanes in the middle of the Huangpu. The Waibaidu Bridge crosses the Suzhou Creek, and on the other side of the creek are more European style buildings, such as the modern day Russian Consulate.

31°14'41" N 121°29'10" E

31°14'40" N 121°29'12" E

Left: 31°14'41" N 121°29'10" E. Right: 31°14'41" N 121°29'9" E

The Waibaidu Bridge is wired up with LEDs that cycle through a number of colors over the course of a few minutes. I managed to catch the bridge in mid-change from red to blue:

Left: 31°14'46" N 121°29'10" E. Right: 31°14'46" N 121°29'10" E

31°14'46" N 121°29'9" E

When I visited China in grade school, very few families had cars. Today, however, China has the largest automobile industry in the world; even the Bund is packed with cars during the day. I especially like the following two shots, which I got by pivoting in place to track cars with my camera, hence the cool streaky background effect:

31°14'43" N 121°29'9" E

31°14'43" N 121°29'9" E

Next post: food in Shanghai!

Nanjing Road East is the bustling shopping heart of Shanghai; running from People’s Square to the Bund waterfront, Nanjing Road East today is entirely pedestrianized and is home to some of the largest, oldest, most expensive stores in China. Think 5th Avenue in Manhattan meets Times Square meets the Champs-Élysées in Paris with a dash of Blade Runner.

31°14'19" N 121°28'41" E

Left: 31°14'23" N 121°28'46" E. Right: 31°14'17" N 121°28'38" E

Left: 31°14'20" N 121°28'45" E. Right: 31°14'21" N 121°28'34" E

31°14'12" N 121°28'18" E (Note: this photo is from a previous visit to Shanghai in 2010)

Left: 31°14'12" N 121°28'18" E. Right: 31°14'14" N 121°28'21" E (Note: these two photos are from a previous visit to Shanghai in 2010)

Fifteen years ago, Nanjing Road East was home mostly to only Chinese establishments, but today the stores here are a mix of western and Chinese. Alongside Chinese department stores are everything from Pizza Hut to James Bond. High end wristwatch makers like Rolex and Omega are so popular that Omega has two separate stores on opposite ends of the street:

Left: 31°14'18" N 121°28'38" E. Right: 31°14'28" N 121°29'7" E

The biggest western brand here is, of course, Apple. The Nanjing Road Apple Store is one of the largest Apple Stores in the world, and is packed pretty much 24/7.

31°14'21" N 121°28'47" E

Left: 31°14'23" N 121°28'46" E. Right: 31°14'37" N 121°29'13" E

31°14'40" N 121°29'12" E

31°14'40" N 121°29'13" E

Nanjing Road is always under construction too, it seems, as old stores are ripped out and new ones put in. Almost always, the construction work is being done by the Shanghai Construction Group. Everywhere you look in Shanghai, you can see SCG logos stamped on construction sites; SCG more or less built the entirety of Shanghai. Most of the supertall skyscrapers in the skyline, the entire metro system, apartment complexes, bridges, government buildings, shopping malls, stadiums… you name it, SCG probably built it.

Left: 31°14'25" N 121°28'51" E. Right: 31°14'25" N 121°28'51" E

When rich folks visit Nanjing Road aren’t buying Apple products, they’re usually buying designer clothes, expensive cameras, or expensive watches.

Left: 31°14'24" N 121°28'50" E. Right: 31°14'28" N 121°29'5" E

Next post: photos from the Bund!

Here is a cautionary tale about why backing up one’s harddrive is EXTREMELY IMPORTANT.

Over the summer, I started making a little scene based off of the GH House Challenge from RonenBekerman.com, partially as a way to learn Vray and partially just for fun. I was working off of my laptop for the entire project, since I was in California at the time and didn’t have access to more powerful machines at home. Being out in California for the summer, I brought as little stuff with me as possible.

One of the things I decided to leave home was my backup Time Machine drive. “Oh, I won’t need this over the summer, what are the odds of file corruption or harddrive issues anyhow? I’ll be fine”, I thought to myself.

Which means, of course, that halfway through the summer a bunch of my files got corrupted and were therefore lost forever, and of course that block of lost data included my in-progress GH House project. NEVER ASSUME THAT YOU DO NOT NEED BACKUP.

What follows are some random in-progress renders that survived through being in posts I made to Facebook and Tumblr.

Here are a series of small in-progress renders showing shading and lighting tests:

I also started playing with some ideas for the interior:

…and finally, some larger in-progress renders. These renders represent where the project was when I lost all of the data:

In the end, the fact that I lost the project isn’t as important as the fact that I learned quite a lot from tinkering with this project. However, losing all of the data for this project was definitely a major bummer. But, lesson learned: BACK UP ALL THE TIME.

Last weekend I went to Sketchcrawl 32 with fellow Pixarians Kendra Phillips, Stewart Hills, Aimei Kutt, and Jeff Gipson! The basic idea behind Sketchcrawl is a bunch of artists gather, sketch all day, and then scatter. We sketched in and around San Francisco’s Ghirardelli Square.

Some of my sketches:

I’m still not a very good drawer and I still have massive difficulties drawing people. :p But I think I’m improving…. more practice!

I was hoping that Enrico Casarosa would be there, but he couldn’t make it to this one. I’ve only ever seen Enrico in the halls at work and at a screening of La Luna. I got to meet some really cool people from Dreamworks at Sketchcrawl, though. I met Francesco Giroldini and Lindsey Olivares! You can see everybody’s Sketchcrawl @ San Francisco stuff on the official Sketchcrawl forums.

I spent the Fourth of July weekend with my aunt and uncle and little cousin. :) Well, I call her my little cousin, because I always remember her as being little, but now she’s like 12. Not so little anymore. Anyhoo, on Sunday I showed her around Pixar and then my aunt and uncle took us to the beach.

Here are some crappy doodles I made at the beach:

Yup. I am not good at drawing. :p

On a sidenote, I can’t post any Pixar stuff now due to NDA, but I might be able to post a few project things at the end of the summer. We shall see.

More later!

For my Computer Animation class’s final, I decided to go for a change in pace and work in 2D instead of in Maya. I want to tweak a few things before I post the finished animation, but I have two more finals to get through first. So for now, here are some stills:

Oops, I haven’t posted in a while…

A few weeks back I decided to try out overhauling one of my previous projects with VRay. I figured the chairs project would be fun, so…

Wwwwaaaayyyy prettier than before. I really like VRay, although I feel that setting it up is a bit more involved than MentalRay is. Still haven’t made too many inroads with Photorealistic Renderman yet, so I can’t comment on that quite yet.

Oh, also, as you can see, I added balloons too. I like balloons.

I decided to add balloons after seeing an article on RonenBerkerman.com a while back about shading balloons using VRay in 3DSMax. I’m using VRay in Maya, however, so I had to figure out how to recreate the shader in Maya’s Hypershade. The shader network winded up looking like this:

It’s *almost* fully procedural, minus that one black and white ramp image that I wound up using for a lot of things. Replacing that image with a procedural ramp shader to make the entire shader fully procedural probably wouldn’t be very hard at all, but I got lazy :p

I was originally going to post breakdowns of all of the settings for each node in the shading network as well, but again, I’m lazy. So instead, here’s the shader in a Maya .ma file!

A few more renders:

As soon as my last finals are over in about a week, I’ll catch up with my backlog of things that need to be posted. I’m planning on posting a series of posts introducing some concepts in graphics programming that I learned in CIS277 this semester. I’m not going to go super duper in depth (for that, take CIS277! Dr. Norm Badler is an awesome professor.), but at the very least I’ll highlight some of the cooler things I learned. That class was really neat, we wound up writing our own 2D animation software from scratch and our final team project assignment was to build our own 3D modeling software. Basically, we made mini-Maya. My team (Adam Mally, Stewart Hills, and me) got some really neat stuff to work.

Speaking of Stewart, Stewart and I both will be interning at Pixar this summer! We got into their Pixar Undergraduate Program… uh… program. PUP essentially is a 10 week crash course on Pixar’s production pipeline, so we’ll be learning about everything from modeling to simulation to using Photorealistic Renderman. I’m really looking forward to that. :D

VRay Tree

March 28th, 2011

After being frustrated with Mentalray for a few weeks, I’ve decided to start experimenting with VRay. VRay is… pretty amazing.

I’ve been continuing my tree experiments using VRay. VRay’s Sun&Sky system is much nicer than Mentalray’s system and VRay has this crazy useful two-sided material for flat two dimensional planes… such as leaves. Here’s what I managed to cook up over the weekend:

I’m still working out some kinks in my new tree workflow. I’ll post a full breakdown in a few days.