2D Graphics

Niagara Game Effects

I did a little job for a studio in Prague recently which consisted of a series of “spell” effects for a RPG. I can’t show any of those effects of course but along the way I made a number of other interesting little Niagara effects, here are a few:

The images below are a mixed bag, design wise. But they were fun to make. Oddly the brief was to make effects which were baked down into spritesheets, for a mobile release. It was strange, but it did allow me to up some particle counts and rely less on billboards in Niagara. I’m not sure I like the look but it was nice to be able to explore Niagara in this way.

 

 

 

Dot Product and Edges in Vex

Getting the dot product of two vectors is infinitely useful, and easy in Vex. In this example I get a vector pointing from scattered particles to the camera and then get their dot product with the surface normal at that point. This gives you a very good idea of whether the surface is facing or perpendicular to the camera at any given point.

In this case, I simply cull any point which isn’t close to a value of zero, indicating the surface is perpendicular to the camera. If instead I culled particles that were less than zero I would be removing all back-facing (occluded) particles, which is perhaps more useful but less visually interesting. Since I am left with only particles near the edges of the geometry it’s easy to connect them with lines and get an “edge detection” kind of look.

Here’s the Vex wrangle I used. Note an earlier polyframe node gave me point normals on the scattered points to work with.

float threshold = chf("Threshold");
//User input threshold
vector camPos = point(1, "P", 0); 
//The position of the imported camera
vector toCam = normalize(camPos - @P); 
//A vector from each point to the camera)
//@N = toCam; 
//Use to visualize toCam as normals
f@angle = dot(toCam, @N);
//The dot product of the normal and toCam vectors. 
if (@angle > threshold || @angle < -1*threshold){
removepoint(0,@ptnum);
}

I’ve used this edge culling in production a few times, to create anime style speedlines and particle effects like rain strikes and halos. Culling particles behind geometry is of course also handy, though raycast solutions are much cleaner for that kind of thing. Next, we’ll use a simple dot product calculation to cull points and create a gradient effect.

Cheers.

Scraps

My harddrive barfed up these scraps. What to do with all this? Put ’em on the internet of course.

Progression of a shot

I had nothing to do with the making of Tangled, but it’s a great Disney film which blew me away, and I always like “making of” breakdowns. So I took a look at this, and felt it did such a good job of showing how a successful final result comes from a steady progression of improvements. Whether you’re making a fully animated film or a live action sequence, the best results come from a back-and-forth iterative process of test images to build up the final product.

In today’s “faster/cheaper” production mentality there is often significant pressure to reduce iterations and the time spent making a shot – if you watch through this sequence and imagine cutting out a lot of the improvements you see which are made over time you can get a feel for how the extra time and effort makes all of the difference. The flip side of this, of course, is that without good artistry and good direction all the time in the world won’t make a difference.

Too many great ideas are killed by a rush to minimize costs and get stuff out fast. This may make profits for those who deal with high-volume-low-quality kinds of projects, but I note that the giants with some of the most incredible work (and full coffers) tend to follow a mentality where extra time, effort and resources are spent to make a final product which is clearly of superior quality.

In the end, quality pays, and its the result of investing in talent, tools, and organization.

In this sequence we see a lot of things being done right…

  • Time taken for previsualization.
  • Tools available to allow communication via painting on frames, showing thought and investment in pipeline.
  • An area set aside for the artist to make reference, showing insight into artistry and the willingness to spend money to enable it.
  • Many iterations, showing time was spent to get the shot right, and the production was organized with regular milestones in place (and time set aside to achieve them).

The final result, a great film which not only was a creative success but one which did well financially ($590 mil box office revenue and a new and lasting Disney heroine providing decades of continuing income.)

“LitSphere” aka MatCap Materials in Softimage and Maya

It had been a while since I wrote anything technique-specific for softimage, so I decided to come up with a rendertree setup for “lit sphere” rendering and share it on this blog. I would talk about normals and angles of incidence and it would be completely cool. Well, it’s still cool, but no need for much in the way of discussion…  it turned out to be ridiculously simple.

Have you ever used mudbox or zBrush and noticed how nice their realtime clay-like materials are? That’s what we’re talking about.

A “lit sphere”, or what zBrush users might recognize as a “MatCap” material, is a technique first described (as far as I know) by Bruce and Amy Gooch, Peter Sloan and William Martin in their 2001 paper  “The Lit Sphere – A model for Capturing NPR shading from Art.”

The basic idea is simple: a spherical image can act as a stand-in for the lighting of a more complex surface, by mapping the angle of the surface normal  (as seen from the camera) to XY coordinates of an image, such that the center of the image relates to a surface facing the camera and every other angle of incidence maps to an X (horizontal angles) and Y (vertical) coordinate on the texture.

The result is “lighting” defined for every possible normal via a simple texture, and what’s really cool is that the result can easily approximate various painterly, sketchy or waxy surfaces. Since everything derives from a texture, it’s fast enough for realtime shaders and easy to change and edit.

Ok, so how do we get this result in realtime, and how do we get it in Mental Ray? Well, realtime requires a realtime shader. It’s easy to make a HLSL shader in Mental Mill without any shader programming expertise at all. Here’s an admittedly junky one for use in Maya, which works in Softimage as well.

But if you don’t want realtime display in your viewport, it’s just as simple to render litspheres in Mental Ray, regardless of what package you’re using. Just use the mipGrayBall shader, and feed it a “litsphere” texture. That’s it. Done.

So, while this topic didn’t prove to be a basis for a insightful tour through the rendertree, at least it’s cool in the sense that you just can’t get a more powerful shading tool any simpler than this. If you are looking for an interesting approach to NPR or “Painterly” rendering styles, you want to specifically mimic a sketchy or painterly style of a traditional artist, or you want a good realtime material to model with that has the same feel of lighting you get in mudbox, now you’re set.  Enjoy.

Darktable

I’m going to have to check out “Darktable,” a GNU-license photo management app similar to Lightroom and Aperture. It’s claim to fame (aside from being free) is it’s blazing fast performance thanks to GPU acceleration. If you like photography as much as me, and you are using a *nix OS, this is probably worth a look.