Tuesday, July 31, 2012

Initial Composite


I'm quite pleased with the initial composite for the opening shot. I spent today getting volumetric lighting to work and putting together the nuke script. There are still issues with the textures on the books and plastic bag, but that will be handled in the next round of refinement.

The dust right now is just some noise masked off with the volume light, in the future, this will be replaced by an actual particle simulation. My mentor recommended staying away from a cloth simulation for the curtains, in favor of a VOPs approach, which I think is a good idea. Next step is to go back and fix my shading issues and move forward into rendering the necessary passes.

Here is a short render of my refraction color pass for the melted gummy bears. In the final render the Desk, Wall and sky will be excluded, which should reduce the amount of refracted specular in the gummy fluid. Also my samples will need to be increased to reduce the amount of noise. These are minor issues though, since the refraction color will be masked off by a subsurface pass and combined with a diffuse, refractive and reflective pass.

Friday, July 27, 2012

Gumming up the works

Since the last post, I've been working on finalizing the FLIP simulation for the gummy bears and shading it. The simulation just needed some additional tweaking and came together quite nicely. One of the issues that I was fighting throughout the simulation process was the timing. I wanted to pace the evolution of the gummies in a very specific way, and my previous simulation times were very long (350-500 frames). This final version is appropriately long, and the giant gummy bear forms together in a smooth way, while still looking organic.



The next step, shading the bear, was an interesting challenge. The shader for the individual gummies uses sub-surface scattering and refraction; the subsurface color is tinted with the surface color, because each bear is only one color. When the fluid bears come together, all of the colors mix together. If the same shader was applied to the fluid, then as soon as the FLIP particles are not near the surface, their color is lost. I needed a way to influence the surface color using the FLIP particles in the middle of the bear.

My first idea was so use SSS point clouds, using the FLIP particles as the point cloud. The problem with this is that, since the point cloud is expecting pre-calculated illuminance values for the surface points, by plugging in the FLIP particles as the point cloud to be read at render time, you bypass the ray-marching that occurs during normal SSS calculations. Another aspect which doesn't work the same way as the real gummy bears is the fast that the color we see from the gummy bears is being refracted through the gelatinous fluid that is the gummy bears.

One of the other interns Ethan suggested a surprisingly simple solution. By using metaballs instead of the particle fluid surface, you can represent the metaballs as a surface or as a volume, and in this case, we want both. The basic premise is to create a fluid surface that is a purely refractive material, and then create a colored volume inside the bears. By reducing the density of the volume shader, the refracted rays accumulate the different colors of the volume as they are refracted through the fluid. This approach  worked wonderfully well, creating a look of a multicolored, semi-translucent material that is relatively quick to render.


This is only one component of the final composited image. I will also be putting out a SSS pass, to use as a mask for this refracted color, as well as a colored refraction pass, where the refractions are colored by the point color. The next step for this project is to get some passes rendered out and start working out the composite, then I can start refining shaders, especially for the environment, and lighting. After that it's on to rendering.

Tuesday, July 24, 2012

Lighting and Shading

This last week was very productive; I got the preliminary lighting and shading done. My inspiration for this shot is Toy Story, with saturated colors and lots of primary colors.



Most of the materials are straightforward hard-surface shaders, with the exception of the gummy material and the plastic bag material. The plastic bag material needs some refinement in the transparent area and the reflections. The gummy shader looks nice in this shot, really accentuates the shape of the gummy character. My initial shaders turned out pretty well, still need to tweak some aspects of the props in the scene, notable the pens and books. The wooden desk is reading a little plastic, and the texture seems low-res.


The wood seems slightly over saturated. The backs of the books uvs are smearing, and the AO is heavy. I like the clock, but I think that I might put a logo on the face of it. The bed frame is not quite detailed enough, but in the final composite this area will be blurred out by a shallow depth of field, so it shouldn't matter.


I'm really happy with the look of the pile of gummies in the air. The shader relies heavily on sss and refractions. I've noticed that it requires careful backlighting to look correct, and in this shot I think it's really working.

Tuesday, July 17, 2012

Animatic



This is my current animatic. After putting it together, I realized that I need another shot where the bear falls out of the bag. That will go between the first and second shot.



I've seeded a new FLIP simulation with the the final position of the bears in the RBD simulation. Right now, the sluif is spinning too much more my taste. It's causing all of the colors to mix together, and I want to have distinct streaks of the different colors. Also, the new spinning looks more like it's suspended in space rather than sitting on a surface.

There are a few ways I can go about fixing this, I am playing around with masks and fields in DOPs trying to get just the right look. Unfortunately when I moved my giant gummy bear goal shape, the FLIP particles began behaving a little more erratically. In the end they still take the shape of the bear though, so at this point it's just refinement.

Next step is to block in the lighting and begin some texture work, and nail down the final FLIP simulation. Once I get the floating points fixed and the amount of spin reduced, I can do a final resolution FLIP simulation. My point separation right now is at .1, and that's close to what I need. I think for the final simulation I'll reduce that to .07 or maybe .05. What needs to be seen is how much detail is still visible in the surfaced gummy bear particles; the fluid surface needs to have enough detail that the fluid gummy bears look (close-to) identical to RBD gummy bears.

Saturday, July 14, 2012

Environment and Animatic Progress

This has been a productive week for my project. In my previous post, I noted that I'd fixed the jittering issue and created a method of adequately shaping the gummy bear FLIP fluid. Since then I've fleshed out the environment and refined the RBD motion.



In addition to refining the RBD simulation, I also rigged and animated a simple gummy bear. The animated bear was imported into the RBD simulation as a static object, to help the incoming gummy bears react appropriately to the animated bear. One of the other interns, Ethan, showed me how to create custom ODEs that the bullet solver can use as proxy geometry for RBD point objects. This enables me to simulate 120 gummy bears at real-time speed.



At render time, the high-resolution gummy bear mesh will be instanced onto the RBD points, which saves a lot of memory since Houdini's Fast Point Instancing only loads one copy of instanced geometry into memory; it transforms the one copy in memory to match the point position, scale, orientation, velocity, etc.

The next step to to cut together an animatic by Tuesday, the only part I'm missing for that is the final shot, where the giant gummy bear forms and looks out the window and the shot preceding the above shot, wherein the lead animated gummy bear falls out of the bag and onto the table.

I also might include the following shot:

I like the low-angle, close-up view of the bears

Wednesday, July 11, 2012

Taking Shape!

In my previous post, I had mentioned that there was an artifact of the POP solver that was causing my FLIP particles to jitter and still wasn't giving the defined shape of a giant gummy bear. After talking with Jeff Wagner, he made it very obvious that the POP solver is not the desired solution because you're simply overriding the FLIP motion (using a point attribute "ballistic"). He recommended using more custom fields to control the movement of the fluid.



This approach gave significantly better results, surprisingly quickly. I'm actually still using the POP solver to pull the particles up, because I like the way they cause the bears to lurch upward in a very organic way. I used an enable solver DOP to switch the POP solver on and off.

The basic premise is to take the goal shape, expand it, and then create a field of vectors that point towards the interior of the goal shape. Then, I created a mask field that was the goal shape of the giant bear and plugged that mask into all of the forces, including gravity.


Now, with the overall simulation laid out, I'm moving on to building the environment and making an animatic. 

Tuesday, July 10, 2012

Gummy Bear Progress: Week 1

Well it has been one week since I was tasked with coming up with my mentor project. I chose to create a simulation where a pile of gummy bears falls out of a bag and then melt and swirl together forming one giant gummy bear. In the past week, I have baked out an RBD sim of the gummy bears, and I'm using it as a seed for my FLIP fluid simulation. In the end I may end up doing the entire sequence as a FLIP simulation with varying levels of elasticity and viscosity, but for now my fluid simulations begin when the RBD objects are at rest.

 For the look of the giant bear forming, I wanted to have the fluid first swirl together and then lurch into existence. I wanted the fluid to look as if it were struggling to take shape and to have some organic movement. What I wanted to avoid was the FLIP particles flying to their final resting place, as though weightless. To accomplish this look, I'm using a combination of a custom force field in DOPS and a POP solver plugged into the FLIP solver. The force field is just a SOP geometry with a force attribute that adds a counter-clockwise force to swirl the FLIP particles around. In the POP solver, I put down an attractor that pulls the particles towards their final position (as the giant bear).




With the color channel enabled, we can see how the different colored gummies will mix together. One aspect that I really enjoy about this simulation is the way the legs of certain gummy bears tend to flail along with the movement of the liquid. I also think it adds some nice surface detail as the



To achieve this organic lurching effect, I animated the attractor's strength and added noise to the bezier function. I also animated the strength of the twisting noise.




At this point, the formation of the giant gummy bear is almost to my liking. The only remaining issue is the accuracy of the final shape, which right now isn't as close as I would like to the actual surface of the giant gummy bear. We're learning about FLIP fluids and custom fields tomorrow, so hopefully I will gain some insite into my issues.

Thursday, July 5, 2012

During the first week of the project, I was tasked with developing several ideas for possible projects spanning a 10-week period, during which time, I would receive guidance from an Industry Professional.

My MFA thesis focuses on controlling FLIP fluid simulations using a SOP solver and a custom VOPSOP; I am very interested in fluid simulations and learning how to control them using more standard methods, so for this project I really wanted to work with FLIP fluids and custom force fields. I am also interested in one of the new features implemented in Houdini 12, which is a variable viscosity in FLIP fluids. I've worked with this feature before, and it's tremendously fun to play around with.

So for this project, I decided to go with:

Gummy Bears


More specifically I wanted to make a big pile of gummy bears that began as separate solids and then melted together. This would give me a chance to have fun with FLIP fluids, RBDs, caustics, custom fields and controlling particles.

Initially my idea was just to have a a large pile of gummy bears that fall into frame and then melt, forming a big gelatinous mound of multicolored, gummy goo, but when I presented this idea to my industry mentor, he thought that it was lacking a narrative device, a punchline. What was the purpose of these gummy bears melting together, why was this narrative of the many becoming one. I agreed that there was not enough of a conclusion to the narrative, so after some additional brainstorming, I came up with the idea that after the gummy bears melt into a cohesive goo, they then begin to reform into one giant gummy bear. This will give me a chance to work with custom fields to control the movement of the FLIP fluids as well as making the fluids form into a predefined shape.

Thus far I've completed a preliminary RBD simulation as well as a test FLIP simulation which colors the particles of each gummy bear and then mixes the colors together. The next step is to get the FLIP particles to form a predefined shape (the giant gummy bear). After that, everything has been roughed in, and I can move on to refinement. First refining the RBD simulation, then the FLIP melting, and finally, the FLIP formation of the giant gummy bear.



I am also considering adding an opening shot where we can see the one gummy bear precariously dangling out of the plastic bag of gummies before it falls out, I am undecided as to whether or not this is necessary, but I think it might add a nice narrative element to the piece. It suggests that one gummy bear was trying to escape the bag, only to be covered in an avalanche of his brethren and then melted into one giant bear.