30 June 2010

Insomniac SFX

Well, I've spent the last few days working on an SFX test for Insomniac Games. Had to build a weapon firing sequence with a modeled projectile, muzzle flash, and weapon damage sim. I was limited to 800 particles at any given time, 4 256x256 textures for sprites, and the dynamics sim could have no more than 32 meshes. They wanted not only a realistic sim, but also a stylized sim. So for my realistic sim I created an RPG firing a grenade at a car. I used sprites for the muzzle flash, smoke, and explosion. This is the first time I've ever used sprites. Texturing isn't my thing. I'm used to memory hogging fluids and realflow. My stylized version was a ray gun blowing up the same car. It was pretty fun to do and I learned how to use sprites. I might find a use for these little guys later they make it rather easy to make magical effects. Sorry no video yet.

27 June 2010

Explosion Test 2 / Explinations

So I got a few tips from CG Talk that I'd like to talk about here. More or less talk about the entire explosion technique, or at least my understanding of it.

Fluids run on 4 basic grids: Density, Velocity, Temperature, and Fuel. Density is pretty straight forward so we will start there. Density is basically where you "see" a fluid. At least this is the default way of viewing the fluid shader. Where there is density there is fluid. Velocity is how the grid values are pushed around. Temperature and Fuel are a little more tricky to define in layman's terms. Temperature can be thought of as similar to density. It has most of the same attributes. But think of it as another layer of density that can add velocity vectors to the fluid and add another level of shading: eg incandesce. Temperature is also linked to fuel. Fuel is emitted the same way as temperature and density. Fuel, however, reacts to temperature, converting fuel values into temperature values.

So now that you have a little bit of back ground. I can talk about how my set up works. By the way, that paragraph condenses 6 months of research. So if you're still feeling lost on fluids do yourself a favor and read the flippin documentation in Maya. Then come back. This will make more sense. It will also make more sense if you also do some fluid testing of your own to get a handle on how it all works.

Now my explosion works with 2 emitters and one fluid. The emitters emit fluid values into the grid for about 8 frames then stop. There is a reason why I'm using two of them. One is emitter positive values and the other is emitting negative values. Both emitters also have emission turbulence, one is positive the other negative (inverted if you will). I learned about this from watching and reading some of David Schoneveld's posts. You can see the effect in action here. Anyway this give a nice break up of the fluid emission, the idea is to make sure it doesn't look like a prefect round blob of fluid during the first few frames.

An essential part of an explosion sim is having large emission values. As in emission values over "1". Mine are set to values ranging from 4-10. Just play around with them till you get something you like.

I say play with the values and I mean it. It's very easy to pick them and keep them because it's your little explosion and you like it and want to keep it. But you need to get used to the idea of changing lots of settings and running the sim many, many times. This is why it's good to keep things at a low resolution durning this stage. Now if you are new to fluids "low res" may not mean much to you. So I'll spell it out. My fluid container has a size of 20x40x20 and a resolution of 40x80x40. I feel anything lower than this won't be accurate enough to sim and anything higher will probably be wasting your time. So try to keep your res at about twice your container size. This will sim a lot faster than container that has 4 times or 8 times the resolution.

I think the next important factor is detail. You may notice that your sims tend to look blobby. So lets mix that up. There are several ways to make a fluid behave more erratically. Velocity has a nice swirl function, and there is a built in turbulence function as well, but both of these will tend to break up the fluid after 50 frames or so. Temperature has a turbulence setting. It's the only setting that makes it different from density. This will push the temperature values around the grid in a random fashion, but since the temperature should be dissipating rather quickly this turbulence won't be affecting the sim later. So it's how I add the detail in. Don't be afraid to really crank this value.

Fuel plays a big part in this sim. Now if you're like me you probably started out not knowing what the heck fuel is even useful for. Fuel creates temperature; so what I can emit that you say. And you are right. But by playing with the ignition temperature and the reaction speed you can affect the shape of the temperature. In other works you can keep emitter temperature in places the emitter is not present. Say in the cloud of rising smoke that happens to by carrying the burning fuel. To visualise this you will need to view the fuel values by themselves. Bet you always wondered why you would want to view the fluid in any mode other than "full render". You will see you fluid as just fuel, the fuel will start out full and then burn up. Depending on your settings the fuel may all burn up in the first few frames. You want the fuel to rise and burn and be completely spend with in the first half second or so. This is the trick to getting those gasoline like movie explosions.

The last thing I want to talk about is key framing. Some people seem to do this and others do not. Some people prefer to let the sim do its thing. I prefer to keyframe some of the values to make the sim do things. One value I key is the buoyancy. I start with some high values then key in some low values part way through the sim. The makes the fluid rise quickly in the first few frames but allows it to rise gently for the last part of the sim. It's a bit stylized but I think it adds a good look. You can key just about any value. So I'd start looking at values the work at different times in the sim and key them on when they are needed.

Anyway that's my research in a nutshell. I hope this helps. Here is my 2nd explosion test. It is a resolution of 250x400x250 and uses the principles mentioned above.

Explosion Test 2 from Calibrix on Vimeo.

23 June 2010

Test one

So here is my 1st test for an explosion. I'm using both fuel to drive my temperature and my temperature to drive some swirls it works ok. I'm using a texture to help add detail to what is a lower res sim. Anyway enjoy.

Explosion Test 1 from Calibrix on Vimeo.

Hardware woes

So I cannot do anymore 3D work on my laptop. I've now had my macbook pro for nearly 4 years. And it's now about ready to quit. I think the thermal requirements finally got to it. It's common knowledge that these things run hot and those reports are true. It's a shame, I have had a lot of good memories with this laptop, but it's time to get something that can handle my need for extreme processing power. Once I find some money to do that with anyway. Who knows... all it takes is a decent summer job and I might just be able to an i7 iMac. Untill then I'll be trying to run maya on anything that I can. Hopefully I'll be in luck.

21 June 2010

Projects

So here's the new idea. 1 month, 1 project. Seems simple enough right. So where to start. In honor of the FX Wars challenge on CG Talk, I'm going to start with a Nuke. Yeah I know that was over 6 months ago. I'm just a little slow starting. Anyway, things are going to heat up in the kitchen. Maybe when I'm done I'll have a neat little tutorial on Fluids. Or not. You never know.