vfx

Contribution to PopcornFX 2.10 Now Released

The PopcornFX team honored me recently by including content I’ve created as part of the official 2.10 release. As they work towards a version in which user content can be uploaded and shared freely, the team approached me knowing I had a pack of templates and example projects I was intending to share out to other users. I was flattered and pleased to share this content out via an official release like this.

It’s worth noting that PopcornFX is free to download and use for personal learning, as is this content pack. https://www.popcornfx.com/ The content I’ve contributed can be downloaded directly from the editor and is among the “official” learning content and examples.

By including this content in the 2.10 release they have a demonstration and first test of how new nodes and files can be created by a third party and shared among users.

The content is a collection of 31 “templates” or custom nodes I originally created for myself as I worked with PKFX. The nodes are documented and tested and vary widely in both their usage and usefulness. A few are so helpful I use them in practically everything I do now, while others are very specific in their use cases. 

In addition there is a small suite of “example” files showing various effects, each cleanly presented, commented and documented. 

I tend to clean and document files for myself as part of my creation process so it didn’t take much effort to prep these files for the public. Hopefully they will spark interest and prove useful as examples of one user’s workflow, in tasks both simple and advanced.

Read more for descriptions of each of the nodes included:

New nodes

Random Spherical Vector
Produces a pure random vector from a unit sphere.
Random Value In Cone
Generates a random vector in a conical arc with the center by default oriented in the positive Y axis.
Test If Points Intersect Plane
Tests point position to determine if it intersects an infinite plane.
Spring Force
Plug into acceleration. Updated position is the particle position on current frame. Rest position is the point the spring seeks to reach. Spring constant is a measure of the “tightness” of the spring.
Wander Around Position
Randomly moves offset around center point position. Two methods available, with their own strengths and weaknesses. Keep seed values low.
Normalized ID
Applies a unique ID ranging from 0 to 1 for all spawned particles. Only works when there is a total (fixed) number of particles spawned.
Time Based Rand
Instead of a unique value per-point this random function delivers a single random value at spawn or per frame.
Animated Noise
Noise function animated over the effect age.
Linear Probability
Produces a boolean and optional values based on a random probability between 0 and 100.
Spiral Trails
When used in a “trail” layer this template causes resulting trail to be a spiral around the parent particle’s path.
Spin on Axis
Animates an incoming vector (position) to rotate around axis over time.
Point Visibility By Facing
Outputs a number 0 or 1 based on whether a point is on the front, back or edge of the sphere of the point normal.
Sparkle Color
Flickers colors over the particle’s lifespan.
Flicker Value
Flips between two values based on a random noise.
Position On Circle
Outputs a vector which lies on a circle defined by input values.
Oscillator
Oscillate between two values. User can choose between several waveforms via a dropdown on the node. Speed is in seconds.
4 Pole Switch
Choose between 4 inputs via a dropdown list on node.
3 Pole Switch
Choose between 3 inputs via a dropdown list on node.
2 Pole Switch
Choose between 2 inputs via a dropdown list on node.
Value by Distance To Camera
Sets a range of values based on each point’s distance to camera.
Kill by Camera Distance
Deletes particles closer or further than a set distance from the camera. 
Identify Single Point
“Tags” a single point or range of points and returns true when graph evaluates them. Use with billboard “enable” to render a single point.
Newtons Universal Gravitation Force
Simple implementation of universal gravitation. Plug into acceleration. Position should be discretized (updated per frame.) Values are arbitrary, not real-world.
Set Circular Orbital Velocity
Calculates velocity needed to place point into a circular orbit when using a universal gravitation force. Normal vector is typically the effect.up vector.
Position On View Axis
Outputs a position along the axis of the camera into the scene, with distance 0 being the camera position. Useful for defining focal planes etc. 
Color Turbulence
Defines a color based on the location of a point within a vector field.
Spatial Basis Rand
Returns random values based on position in a vector field. Must have a “turbulence” node added to sampler input.
Generate Ring
Distributes all spawned points in a ring or arc. Requires a static (total) number of points.
Generate Cyber Rings
Distributes spawned points into a series of circular arcs. Total spawned points must be static, though they can be animated in the layer.
Generate Line
Distributes spawned points on a line between two input locations. Unlike the debug “draw line” this line is made up of spawned points which can be further animated. Requires a static (total) number of points spawned. 
Random Static
Useful for “glitch” effects. Offsets positions by a random value at random intervals. Spatial mode requires a turbulence sample.

 

Creating Bezier Curve Nodes in PopcornFX

While making a demo scene for PopcornFX I found a need to make individual particles move on arcs where I could choose a start and end position, height of the arc, and overall placement in 3d space. Depending on how you approach the problem you can easily find yourself slogging through some pretty involved math, at least for the level I’m at. An “arc” can be a parabola, or a section of a circle or so on. A few directions can take you into the woods pretty quickly. I wanted simple.

The simplest approach I’m aware of is to construct a quadratic bezier curve, since it is defined by a start, end and midpoint and can easily be plotted out using a few LERP functions. If you define a start point, end point and midpoint a quadratic bezier curve describes a very intuitive arc, and if you restrict the control point to be perpendicular to the midpoint of the line between your start and end points you get a beautiful parabolic curve in a very intuitive fashion.

Once I had decided on a quadratic bezier, creating a template in PopcornFX was quick, and it wasn’t long before I had a very useful new node in my toolbox. To extend the idea a little further I decided to take a little extra time and make another node for a cubic bezier curve, which is a logical extension of the same approach.

A cubic bezier curve is defined by a start point and end point like before, only this time those two points each have a separate control point to describe a 3d curve. The resulting path can now diverge from a single plane but is still simple enough for the results to be intuitive. In cases where a quick spline is needed in PKFX, this template should allow the artist to describe a simple motion without having to import in a curve or animation. It’s made up of a series of LERP functions and while the idea can be extended further to create fourth or fifth order curves actually wiring up so many LERP’s gets crazy. We’ll stop with our two handy new nodes, the quadratic and cubic beziers.

Here’s what the two look like in PopcornFX. The more complex cubic bezier is the top curve, and the bottom is the quadratic curve, with the midpoint restriction mentioned above:

So from there I had a nice tool to create motion paths of as many separate particles as I needed. To celebrate, I made the following simulation. Yes, we are playing a game of thermonuclear war:

There are a myriad of ways in which the above animation could be approached, but by abstracting out the “arc” motions into templates I am able to finish the project in a way that leaves me with tools for further work in the future. And of course these nodes can not only be re-used, they can be shared out with other artists.

A final benefit is a much more simple graph overall, and best of all we’ve avoided relying on simulation. Sure you could fire each particle like a little mortar and let a physics node calculate the motion up to the point where the particle collides back to earth. But that’s computationally wasteful and worse it cedes control of the results to the parameters you give the simulation.

By abstracting out the arcs the way I did, I am able to easily able to set conditions so that every arc starts from a populated region and ends in a populated region. If you watch the animation you will note no arcs start or end in the ocean. (I admit however that I didn’t go so far as to prevent Canada from nuking the USA and vice versa…)

Similarly I have control over the heights of the arcs, their angle respective to the surface of the world, and the range or distance any point is allowed to travel. Simple procedural approaches can yield visual complexity while retaining control and easing the difficulty of projects!

By the way this image is entirely particles. 

The “land” and “city” areas are the result of taking some texture maps of the earth from NASA into Houdini and using them to create PKFX-friendly emitter geometry as .FBX polygonal meshes. This lets me quickly spawn particles exactly where I wanted them as well as define start and end positions for arcs in areas already predefined as valid. No dart-throwing approaches where particles are spawned and then accepted or rejected based on texture maps or the like.

You can’t always predefine information this way but in this case having re-usable meshes defining the landmasses and cities of Earth was another useful set of tools for future projects. Perhaps the next one won’t be quite so apocalyptic…

Misc Shots

I haven’t edited an “official” demo reel in a very long time. People know who I am, and hire me for projects based on peer testimonial and having seen past work directly. A reel just hasn’t been needed, since I’m fortunate enough to be a freelancer who gets approached regularly. So when I started teaching students who knew nothing about me I had the challenge of presenting myself to an entirely new audience who were eager to see some work I’ve done in films. I really haven’t had time to edit much, so instead I spent an evening grabbing various shots from films and the like. Stuff I’ve either worked on directly, supervised, or had some hand in.

I have only grabbed a portion of the films I’ve worked on, plus some TV and game stuff, pretty much in the order they were stacked on my desk. The choices are fairly miscellaneous – at the moment I just don’t have time to go through film after film and say “oh yeah, I did that,” then tighten it all down into an edit with music and polish. I know, this breaks all the rules where I’m supposed to present only the very very best, nothing less. But the policy that seems to work best for me is to just be open, good or bad just get it out there and get back to making the next thing. I will never be a charismatic showman or clever self-promoter. I’m a creative geek and frankly I like showing failures, too. It’s part of the process, and that’s what really motivates me.

So all of that said, here’s about 6 minutes of footage and, well, stuff. I basically play it in the background when I introduce myself to students, so it is what it is. Enjoy!

Propagation in PKFX

PopcornFX is a great tool for realtime applications in that it brings to developers a ready-to-integrate particle system which can be used to author sophisticated effects in a nodal/visual style akin to Houdini, ICE etc. I find it much more intuitive than Niagara while easily being as powerful, and it’s integration into After Effects brings those users a level of sophistication with particle effects they simply haven’t had access to before. That said, when I push the limits it understandably can’t chew through the millions of particles Houdini can handle.

For example in PKFX this frost-like propagation effect, which is admittedly computationally expensive, tops out in usefulness at about 50,000 particles. The in-editor framerates are still good (relatively speaking) at 220 ms, comfortable enough for cinematography work in After Effects for example. But when you push the number of particles up beyond that times go up exponentially. By 100k particles (for this particular task, which involves getting neighboring particle information) the editor becomes increasingly likely to crash.

But to be fair this kind of propagation effect is waaay beyond what most realtime engines are engineered to handle. Other effects in PopcornFX can get into the realm of millions of particles without too much trouble, which means those After Effects users have a system which lets them perform most particle effects they are likely to need extremely efficiently… and only need to go to a package like Houdini for the really intensive stuff.

And at the moment these computations are only on the CPU as PKFX is still implementing its GPU support. There is a lot of improvement on the near horizon for these kinds of intensive effects… we may see sph fluids and the like running realtime soon enough.

(It’s also worth mentioning that there is a LOT of room to optimize the effect as built, both with regular settings and as one of the PopcornFX devs points out massive increases in efficiency should be possible by only performing spatial queries on the particles changing values and depositing stable values into a static layer.)

It’s significant that those integrating PopcornFX into realtime tools get a system sophisticated enough that a comparison with Houdini is even possible.

In all, I’m pretty impressed with PKFX and as an effects guy would welcome jobs where it’s integrated into custom pipelines dealing with realtime media even over Niagara and certainly over Unity’s particle system. It is elegant to use without sacrificing power, and it’s universal nature means one day artists might be able to share and use particle assets across multiple engines and custom pipelines.

Newtonian Universe Simulation

I’ve been using PopcornFX a lot lately and have been using it as a playground to explore some simple physics simulation. For example Hooke’s law and compressible springs:

And it was pretty fun exploring Newton’s law of universal gravitation with a classic “orbit” simulation:

But then it occurred to me… PopcornFX is pretty efficient, why not scale up my basic simulation to handle not only a few orbiting bodies, but hundreds of thousands? While not correct to the universe we live in the result should look a bit like elliptical galaxies, right?

Let’s try it.

Ok then, here’s a screenshot of a sim of around 900k particles, running 30-50ms per frame. Too slow for game work but pretty fast for cinematics, and PKFX is integrated into After Effects so I really should try rendering out a movie.

In motion the effect is mesmerizing, with “galaxies” merging, splitting, devouring each other and for some reason periodically seeming to explode into rope-like strands. Nowhere near physically correct of course, but evocative of space imagery and very beautiful. 

Why no spiral galaxies? In the real world a lot more is going on, with gasses compressing and angular momentum preserved. This little simulation doesn’t account for more than the most basic, crude motion so, alas, the “galaxies” which form are elliptical only and rarely stable for very long.

Popcorn FX fractalFlame

Popcorn FX is capable of some pretty sophisticated particle effects. With a little effort one can get past the “usual” turbularized effects and push the limits a bit. Here’s a “fractal flame” look made by spawning, coloring and moving particles with layered noise fields. Given the number of particles used to give the soft look it’s not really something you could include in a game or application but was a fun way to explore some techniques which could be used for more efficient effects. You can get a similar look with much better performance using a vertex shader to distort a mesh and a fragment shader with an additive fresnel transparency, but again the point of the exercise was more an exploration of PopcornFX. That said, this does run in realtime with about 24 fps in the editor, pretty nice.

The free .fga vector fields work fine with PopcornFX

Be advised the scale of the vector fields in this pack should be around .01 or so. If your vector field appears odd, try tweaking the overall scale and magnitude of the fields. The orientation of the vector fields may also need to be adjusted, -90 on the x axis should do it. 

PKFX has a very nice vector field visualizer, but some fiddling around is probably going to be needed since each one of these vector fields was built for other purposes and on a different platform.

Once you get dialed in, however, these .fga vector fields are great.

Example: LK Fabric early test scene

Since LK Fabric is out I dug up one of the early test scenes we used on Nike “Evolution” at Royale in which we developed some of the techniques we used to get various looks. This setup is very basic but covers some of the key tricks for getting a natural result and was used as a starting point for a number of shots.

LKF_demo1b_am

I have replaced the original many-versions-old compounds with ones from Leonard’s public release, and have also left in a few “helper” compounds I built which weren’t part of his official release. I then removed everything superfulous to the basic effect and commented the resulting ICE tree throughout. Any typos or misspellings are entirely my fault. :D

LKF_demo1d_am

 

LKF_demo1_am

The actual setup is very simple.

This scene demonstrates:

  • A basic setup of a single evolving swatch of fabric, with the most basic pattern and the modifiers we used most often.
  • Using the “slide profile over U/V” compound and other techniques to shape the leading edge of fabric growth.
  • Using the “offset” core parameter to make the leading strands animate and form a shape for the thread tips.
  • Using a second ICE “post” effect to add per-strand variance and “frizz” effects.

 

 

LKF_demo1c_am

The early tests like this were pretty chaotic, we knew the system did a good job of creating a “perfect” weave so we were pushing in the other direction and adding ways to create chaos and randomness.

Ironically despite the first briefs being focused on “organic” and “evolving” concepts the client spent much of the latter half of the job dialing in a more out-of-box mechanical look… that’s the way it goes sometimes. But this means there is a lot of capability which hasn’t been seen yet. I’d love to see some people use some of the per-strand and per-thread modifiers, and the capability to create patterns beyond the basic “canvas,” to create a more organic, aggressive look.

LKF_demo1e_am

 

Here’s the file (Softimage 2013 scene file, ~0.6mb): LKFabric_AMexample1

CG Supervisor gig: Nike Tech Fleece

Softimage, Arnold, ICE and LKfabric, intensive small-team project @ Studio Royale, I think this video is meant to play in the Nike stores inside of a sculpture/model of the loom. If anyone sees it in one of the store sculptures, send me a pic, it sounds cool. :)

 

Fleece_s04a

Fleece_s04b

 

Fleece_s04c

Fleece_s04d

 

nikeFleece-s08

Image converted using ifftoany

CG Supervisor for 3 Nike Spots

Two of 3 spots. “Evolution” was a small team, 3 weeks, lighting and effects with Softimage and Arnold.

I love small but intense projects like this.

“Run” was primarily Maya/Vray with a touch of ICE. The studio (Royale) is only 6 years old but advancing fast, and it’s been a real pleasure working with them. For their first exploration of ICE, Royale invited in some familiar SI friends – Ciaran Moloney, Steven Caron, Leonard Kotch, Billy Morrison and yours truly doing a first gig start to finish as a CG sup (which with guys like this mostly involved saying “go for it.”)

Like the Psyop “Telstra” spot, this commercial essentially required us to create a system for knitting cloth from massive numbers of strands. Leonard Kotch wrote a system which performs many of the same tasks as the Psyop “Entwiner” tool, but he took a slightly different direction, it was fascinating to compare how the two diverged. The progressive animation required for these two shots resulted in a pretty flexible and broad system, which we are currently using for the last of the three spots, which will wrap in production soon.

strandlayoutb_s40_062613 NikeEvo_shoe_comp_v001 NIKE_evolution_shot40

Royale has been an enthusiastic and fun group to work with and it’s been great getting to show a studio as strong as they are in design some of the possibilities ICE can bring to jobs like this. Expect to see some version of Leonard’s “LKFabric” system gifted to the community before long – very cool Royale, thanks! (They also throw good parties, their 6’th birthday celebration was impressive and… unusual.)