Thursday, April 26, 2012

Exploring Houdini 12: SDF Fluid Madness



As this test was to decipher the SDF system in Houdini 12, the render is minimal and not terribly artistic.  I HAD modeled a super detailed high-poly fountain in ZBrush that was going to be snapped up to snuff using a displacement map...if anyone knows how to get the ZBrush to Houdini workflow to produce good results please let me know as I am still looking for a solution.

At first I was not sure what the white mesh at the center was near the end of the animation, but then realized that it was a reflection of the light source above the entire setup.  Moral of the story, when lighting, light for water and not the scene.  This will not complicate things too much as the water is usually a separate pass that is later comped into the scene, so from a workflow standpoint lighting the water separately will not screw anything up at all!

Loading...
  
First we will create several Geo containers, one to be the fountain .obj import or landscape and the second to be the emitter of water.


Next we will make a Liquid Container from the Fluid Container tab on the shelf by Ctrl + Clicking on the blue box icon.

 That One

It will automatically create an AutoDopNetwork for you as well as import_fluid and import_fluid_interior nodes.  Dive into that and select the fluid node to adjust the Size.  Make sure that both the landscape and the emitter you have created are within the Liquid Container.







Select the object that is your emitter, then click on the Source from Surface button in the Populate Containers tab on the shelf.  Next select your Liquid Container and press Enter.  

If you press the play button on the bottom left, you should see particles begin to flow from your emitter, notice how it does not interact with your landscape object.                      

We'll fix that next.






Select the landscape geometry and click the Static Object button in the Rigid Bodies tab on the shelf.


Now when you start playing the simulation, the water will pool around your object.  Sadly, the liquid seems to be ignoring a lot of the detail in our landscape object.  We can fix that.  Dive into the AutoDopNetwork.


There will be a node in the AutoDopNetwork with the same title as whatever you called your landscape geometry, mine is called Landscape_Geo and has the same icon as the Static Object button on the shelf.  Select that node.


In the parameters, click on the Collisions tab.  Under the Volumes sub-tab, at the very bottom check the Show Collision Guide Geometry box.  The red mesh that appears represents the actual surface the liquid will interact with...it would not make sense to calculate every nook and cranny unnecessarily, so Houdini takes it from this rough approximation of our landscape's surface.  It is easier to view this difference in wireframe mode (easy to get into if you are in the viewport and press w.


In order to better wrap the liquid around the object, raise the Uniform Divisions number.  It defaults to 30 but 86 worked much better for me.

30 Uniform Divisions, the liquid kind of ignores the bumps.

86 Uniform Divisions, notice how the water runs between and over the bumps.
This result is much more dynamic.

Be sure to uncheck the Show Collision Guide Geometry box when you are finished.  As is, the liquid will pool up inside your Liquid Container, creating a box-like shape,  this can be circumvented through the parameters in the fluid node (still inside your AutoDopNetwork).  Unchecking the Closed Boundaries box in the Initial Data tab or just the specific sides, will help better control how and if the fluid disappears instead of hitting the container. 

 All Boundaries Closed

The water can flow out the +Z now, so there is less buildup in that direction.

All Closed Boundaries

All Boundaries Open (box unchecked)


At the moment our emmitter is streaming water as though it were from a hose or the kitchen sink.  For producing more of a natural result, it is important to add some chaos to the water before it even hits your object or landscape.  In order to do this we need to animate our emmission object.

To better illustrate this I will jump into the fountain project I showed at the top of the post...unlike the sphere I've been showing up until this point, in the fountain project I used a grid as the base geometry for the emitter.  There is no reason why you could not apply this process to any other type of emitter though.

Pretty Basic Emmitter


In order to produce variation I have attached a mountain node to my grid.  In the Offset I have typed the expression $FF/20.  This will allow the emitter to change shape every frame which then allow the water to splash with a random and natural feel from the emitter before it even hits the object.

There is, of course, much more involved in making a fluid sim but this is more than enough to get started.
I will continue to post when I have time!
Josh Evans 

Wednesday, April 25, 2012

The Creature Design Workflow

Currently, while pursuing my Masters at the Savannah College of Art and Design, I am taking a class called Creature Look Development. Sadly, we do not actually design any creatures and had to have our model before the first day of class. Most of class thus far has been taken up with the details of what bring a character to life, from the eyes to the way light interacts with skin.

1) Concept
Before touching a polygon, one must first have a concept.  As my thesis will be taking place in a strange, warped, and child-like version of Atlantis, I wanted to focus on a creature that lives there.  This creature is by no means the main character and in fact is never directly featured on screen, I wanted to use a side-character in the plot as a way of learning the skills to make my main characters.  The creature would be one of many to entrance our hero as he travels to Atlantis atop his floating couch.

Upon describing the creature in question to my lovely girlfriend (a talented Illustrator with a whimsical style), she roughed out this concept. 





My mental concept was quite a bit darker initially, but seeing the character through the interpretation of another pushed me toward my final design.  

Bits and pieces translated to the design below that I ended up importing into Maya.

It is of the utmost of importance that an artist has a full and complete plan for their creature, a process book of sorts that allows them to communicate with the team exactly what they need.  Not only is this helpful when building as texture reference library, as you know exactly what it is for, but it keeps everyone on the same page.  

Inspiration pages help set thematic and visual tones for the entire team to follow!





2) Model

Before loading the blueprint images into Maya, be sure to draw everything you need to successfully model the creature from several angles. 


 I usually load the file into the Color channel on a Lambert shader and crank the Ambient Color to the max.  After setting up several poly-planes, I apply the shader to them and cut the excess plane away.  I used Maya 2012 and found the new Interactive Split Tool to be utter bollocks.  You COULD delete your prefs and dive into a ton of menus to dig up the old one...or you could just run this MEL script and save it to your shelf for the future... SplitPolygonTool;


Box modeling is the technique I usually start with and is surprisingly simple to pull off.  Simply create a polygon box  and using the Edge Loop tool and the Extrude function, create a rough model.  


For rigging and animating purposes, a model must be more relaxed than the one in my picture is.


I fixed this later in the process but will show you now as it would have saved much time if I had realized it this early in the process.  Start by cutting your model in half, select all the faces you don't want and delete them.  Select the remaining half and go to Mesh and click Mirror Geometry.
In your Channel Box / Layer Editor change the direction of the polyMirror#, I had to change mine to +Z to get it to work properly.


In the same section change the Merge Mode to Merge Border Vertices.  


This is why it is so important to get a clean cut when halving your model...or you could just do it right from the beginning! :P  If there are still gaps, go in with the Merge Vertex Tool to clean things up.

Regardless of whether you nailed it first shot or had to fix the model up, remember to go to Edit, Delete All by Type, and select History, before exporting the base mesh of the model to a sculpting and surfacing program. 


2) Sculpt 
You now have a low-poly base mesh, what should you do with it?  
I recommend using Mari, Mudbox, or ZBrush to continue with your model.  

Mari is quickly taking the industry by storm but will very quickly crash your computer unless you have an insane rig.  Upon opening, the program defaults to 4K...that's how awesome it is!

Mudbox is great for a streamlined and easy to learn approach if you are using Autodesk software, it plugs right into the pipeline with minimal fuss and quite a bit of power and functionality.  If you are just starting to sculpt/paint and you want something that is a mix of Maya and Photoshop, I would immediately recommend Mudbox.

ZBrush is a complicated powerhouse.  It has a steep learning curve but many people swear by it and, in its defense, is capable of truly amazing things!  The makers of ZBrush also have an entirely free sculpting program on the market called Sculptris that is actually quite good as well.  I made a review of that program as well as others here.

As the world of sculpting is not part of the class, here are some great tutorials to get you started.

3) UVs
Why are UVs important?  

The truth is, they are increasingly becoming unimportant as the world of Visual Effects and Animation bounds forward in technology.  
A brand new form of displacement, developed by Disney and used by Pixar, is the technique known as PTEX.  Through my research, I have uncovered several methods of using this amazing technology.
Here are several tutorials I have written on the topic.

(I recommend this method, it is both easier to set up and more accurate)



However, not everyone has access to Renderman or the patience to fiddle with the intricacies of Houdini.
If you must fiddle with UVs and the archaic problems it presents, a good workflow I have found is to start with the model (.obj) in a free program called Roadkill.


The navigation tools should be familiar to you, and it is quite easy to quickly cut up your model. 

A word of warning, Roadkill does not recognize Ctrl + s as a save hotkey.  Be sure to save progress by going into the menu and manually clicking the Save button.  Annoying, yes...but the program handles unwrapping the UVs so well that this glitch is easy to overlook.

You want the little blocks to be the same size across the entire creature with zero stretching.  It used to be important to hide the seams but with tools like Projection Painting in every tool mentioned in the sculpt section, this is much less important now than it used to be if you handle the painting correctly.

A great map to use for checking the model for stretch and distortion is a numbered, colored grid.


This lets you be more precise about your UV cuts and welds as you can refer to sections specifically.  You may have noticed, but Roadkill is not great about making the best use of space on your UV map.  I usually bring the model back into Maya and re-arrange my maps before continuing on to the land of painting.

4) Texture
It is important at this stage to closely follow the style-guidebook you created at the beginning of the process.


Whew, that was extensive.  Now back to work.
I carry a camera with me nearly everywhere I go and snap texture reference, so my texture library is quite large.  Using the above pages as a guide I then build a specific library for the creature, like a palette for a fine artist.  I work as large as possible and always make my textures tile-able in Photoshop so that I can just use the Stencil tools in Mudbox and ZBrush without worrying about where I am on the texture map.

Since I love painting in Photoshop, my brain is wired to understand layers.  
I usually paint the following layers in the following arrangement using my Wacom Tablet.

Painted Fine Detail and Texture Fixing
Painted Detail
Detail Photographic Texture at low opacity
Messy Photographic Texture

Here are some results I have gotten very quickly:






5) The Eye
Eyes are complicated things, eyes without the necessary life in them will create undead digital monsters.  I suppose I could argue that my creature IS a monster, so lifeless eyes suit him, however, that would not let me learn from this assignment.

When modeling an eyeball in Maya, it is essentially two spheres and one distorted plane.

The outer sphere is a fully transparent and very reflective, I used a Blinn and added a very light bump map to it in order to lightly break up the reflections.

The inner sphere is white, I just used Maya's marble texture with the veins changed to be red.  I plugged this into the bump map connection and inverted it so that the veins in the eye were slightly raised.

In order to texture the plane, I painted over photographs of my girlfriend's eye, my own eye, and that of a crocodile in order to produce color and bump maps.



Here is a rough of the eye.




6) Hair and Fur
As my creature is a bit lizard-like, he is severely lacking in the hair/fur department.
Here is a quick breakdown as to what Maya offers:
Fur - takes a while to render, but is very direct-able and produces beautiful results.
Hair - reacts to the forces of gravity, is dynamic.

If this is something you are looking for in your creature/character, I have written a comprehensive tutorial on setting up Fur and linking it to the behavior of Hair.

I was very inspired by Pixar's new film when writing the tutorial, so the example used is from Brave.

Hair so amazing, it is it's own character!

7) Sub-Surface Scattering
Sub-Surface Scattering occurs when light shines through something solid, like when you hold a powerful flashlight behind your hand and the entire hand glows red for example.


My method is to typically use the Mental Ray Fast Skin SSS shader and tweak it to full potential.
Many people plug texture maps into the various inputs on this shader, but a method that works better for me personally is to just render the SSS as a seperate pass and then composite it onto the creature in a program like Nuke.

No matter where you are in skill level, a refresher is always of benefit.
I did not write the following tutorials, but can attest to their accuracy.




Final Thoughts
It is important to test your creature in a variety of light setups in order to ensure that the shaders and textures will hold up in a large variety of circumstances.  In a film production pipeline, your creature will share the screen with many other elements and it must be adaptable in order to make integration less of a nightmare.




Hopefully this overview has provided good insight for you to create your own workflow.  I look forward to modifying, fine-tuning, and overhauling my personal workflow as I progress and grow as an artist.

Happy creation!
Josh Evans



Wednesday, April 18, 2012

Exploring Houdini 12: Setting up Voxel Fluids

Currently I am using Houdini 12.0.572, I have greatly enjoyed the changes that come with H12 and fully recommend it to all.

The first thing to understand about fluid dynamics is that it applies to a wide variety of procedural effects that may not be immediately considered to be fluids, such as smoke or clouds.

 So...Much...Fluid

Particle Fluids are fantastic for liquids while Voxel Fluids are great for things like dust or smoke, this tutorial is going to focus on Voxel Fluids.


1) The Container
On your shelf (top right bar with all the icons) click the Fluid Containers (or Fire and Smoke for those using older versions) tab.  Select the Smoke Container button.


Ctrl + Click on the Smoke Container button will automatically place the container in the direct center of your grid if you dislike the interactive placement tool.


The tic marks on the edges of your container represent the voxels within it.  Every ten tics there is an extra long one, meaning that my box is 30 voxels long and wide.  The Size of the box can be changed in order to affect the shape.  This will not stretch the voxels but will add more divisions, so keep that in mind when you play with it.  If you really want to stretch them then above Size is Division Method, change that to Non Square.

2) The Emitter
Make a shape within your container that will act as an emitter, I chose a Sphere.
Navigate on your shelf to the Populate Containers (or, still, the Fire and Smoke for older versions) and click the Source from Surface button (or Source from Object in older versions).


Select your object and hit Enter.
Select your container and hit Enter.

It should look something like this.

3) Control
Hitting the play button on the bottom right hand of the screen should give you a nice preview of what the final render will look like.

Back in your AutoDopNetwork in the options within the smoke node, there is a checkbox for Closed Boundaries (this was defaulted to the unchecked position in Houdini 12).  Checking the box will contain your smoke and allow it to pool and channel.  Unchecking various portions of the Closed Boundaries option will change the end result, for example, unchecking the -Y will let the smoke drop down from the ball and straight through the bottom of the box into oblivion.
All boundaries closed.

Unchecking the -Y box allows the smoke to keep flowing through the bottom.

Use Wind Tunnel Direction to better direct your smoke-stream.

4) Caching 
Saving out your simulations for future use is most helpful indeed.
Make a file node in your AutoDopNetwork and affix it to the bottom of your node tree.
When saving a simulation change Operation Mode to Write Files.  Make sure you have a File path set, then hit play through the simulation.  To read what you have saved, simply change the Operation Mode to Read Files and have it point to your previously saved cache.


More Houdini 12 fun to come.  Stay tuned!
Josh Evans

Sunday, March 4, 2012

Overview of Free Software for Digital Artists

Originally written (by me) for Loris Attacks! and posted HERE.

From a traditional artist seeking a better way to transpose ideas onto the canvas to a digital visual effects wizard with a small pocketbook, the following tutorial will be of great use to you.

I've spent the last several weeks researching packages that are not only free but have a strong user-base behind them.  It is important to have resources to turn to if there are bugs or issues, so simply being free was not enough for a program to make our list.



Download Gimp Painter
Windows only, for a cross platform version of regular Gimp go here.

Loris Attacks Digital Paint Workflow (the concepts apply to Gimp as well)
Gimp Paint Studio Introduction
For Traditional Artists:
Gimp Painter is an intuitive way to quickly sketch out ideas and play with color/light concepts without ever having to use up precious materials.  Saves money and time in the long run.
For Digital Artists:
Photoshop and Corel Painter cost money, granted there are free version available, but if you want all the features in one package without torrenting or purchasing then Gimp Painter is your new best friend!



Download Sculptris
For Mac and Windows
  
For Traditional Artists: 
Perhaps you may not be the best digital sculptor, but that does not meant that you cannot benefit from the possibility of viewing something from any angle to sketch or paint!  You can download free .obj models (here, here, and here) and load them into Sculptris for an object, character, or place in the round at your disposal!  Free reference that allows your creative freedom to flourish?  Yes please!
Does importing a strange file into a (perhaps) terrifyingly digital program sound like a bit of a stretch for you despite the benefits?  Here is a quick guide to importing those .obj models and even getting started with a bit of sculpting yourself!

For Digital Artists:
What if you could have the ease of use that Mudbox offers, from the makers of ZBrush, and all for free?  That's the beauty of Sculptris, you can build up your texture and modeling portfolio for free.
Download Google SketchUp
For Windows and Mac



For Traditional and Digital Artists:
Google SketchUp is fantastic for pulling perspective on tricky situations.  
With only several minutes spent, it is possible to rough out an entire environment of primitive forms that serve as excellent reference.
From digital paint to oils, Google SketchUp is a handy free tool for everyone!



Download Blender
For Windows, Linux, and Mac
Crazy Amazing Things you can do with Blender!




For Traditional Artists:
Unless you are planning on transitioning from traditional artist to digital animation or visual effects artist...you may not want to touch this one.

For Digital Artists:
There are some people who have a strong hatred for Blender simply because of how genuinely good it is.  If Blender were a presidential candidate, the media would ignore it.  This is a dark horse of a program simply because it is programmed by and for digital artists.
As a free alternative to Maya, 3DS Max, and Cinema 4D, Blender is fantastic.
I personally like this program better than all of the programs listed aside from Maya.
Blender is polarizing, yet impressive.


Download Picogen
For Windows or Linux
Gallery of Images made with Picogen 
For Traditional Artists:
Sometimes the fantastic or surreal landscape you want to paint or draw does not exist.  The ability to generate an environment from your mind's eye to use as a reference is valuable, the nonexistent price tag is an added bonus.
For Digital Artists:
Whether you need a landscape for an environment sphere or a dynamic plate to base a matte painting off of, Picogen is a nice (free) alternative to Vue.