NokiMo
taxiderby
taxiderby

patreon


Tutorial: That one cube explosion (free!)

Hey dummy here's that tutorial I meant to put up like days ago but it took longer because I'm an idiot and didn't realize it would TAKE SO LONG TO DOCUMENT!!!!!!!

Due to its simplicity, and the overwhelming interest in it, I'm putting this one up first for free. Keep in mind that I have no plans for further free tutorials at this time, with future tutorials being reserved exclusively for $2+ patrons. 

This is a nice and easy one though, because we can build it entirely from objects you'll find lying around the house! Which is to say, default to Unity. 

Let's begin with the actual particle effect. There's a dozen ways to get this into your scene that you probably know if you've used unity for upwards of no seconds, but just in case you don't, you can go to the GameObject menu from either the top menu or right clicking in the Hierarchy and then selecting Effects -> Particle System.

BAM!!!! wow it sucks

let's dig into the core parameters — the base (up top), Emission, and Shape. Select the particle system in the hierarchy and bust open the inspector window like a crowbar to a crate full of amiibo you stole.

This is basically what you wanna change. Everything highlighted in blue depends on what you're using it for, but I change the simulation space from Local to World because I typically want the effect to linger from its point of creation instead of following the source around. In fact, pretty much all of these can be tinkered with to get something more to your liking, but the most important are the last three — you'll want to reduce Rate over Time to 0 and increase Bursts to something along the lines of the numbers I dumped into it, and change the shape from cone to sphere.

Additionally, you'll wanna make sure Start Lifetime, Start Speed, and Start Size are set to "Random Between Two Constants," in order to prevent the cubes from appearing particularly uniform.

WELL, THAT'S, BETTER, I GUESS, BUT THESE PARTICLES NEED TO CALM THE HELL DOWN I THINK

"Limit Velocity over Lifetime" is out secret weapon here. The reason we put the start speed of the particles so high is so they get a decent amount of distance before limit velocity brings them down to a near complete stop. Make sure dampen isn't to close to one or they'll stop before making any distance.

nice okay uhhhhh what's next

oh yeah the cubes let's get the actual cubes in here

You'll wanna open up the render options right at the bottom, and change all this. Any material will do, but it's naturally preferred you go with something opaque, even if it's the default texture. In my case I used the default Probuilder texture, which is free on the unity asset store now and you should really get it (!!!!!!!!)

Alright, cool, now let's get our stretching and colors going.

 Be sure "set individual axis" is enabled for scale, and that the x and z scales are identical. You can just copy/paste one into the other, or save one for later use from the menu right below it.

Alright, time for that upwards momentum. Enable Force over Lifetime, set ONLY the Y curve to this, and set the space to "world." Thanks to the render alignment setting we selected under "Renderer," the cubes will automatically rotate upwards when they go that way. Make sure this curve starts at/right after the 0.5, and its value (top left) goes up to something high like 50.

OH NO!!!!!!!!! We have a problem: Despite cranking up that raise speed to 50, it's barely moving. This is because Force over Lifetime is directly conflicting with Limit Velocity over Lifetime. So let's change limit's speed settings from a constant to a curve that looks like this. Make sure that the shift is shortly before Force over Lifetime starts doing its thing. If your Force over Lifetime node is still open, the curve will appear faded out, making this a little easier.

Additionally, to get the curve to "jump" like that, right click on the actual nodes in the curve and change the tangent settings to "constant."

NICE, we're ALMOST THERE. But the cubes themselves look a little stiff, we need them to look a little more volatile. And our best buddy for making thing volatile is the "Noise" node. Enable that bad boy. That terrible child. That awful adolesc

Woah that's actually pretty sick but it's not what we're after. We want it to be MORE volatile, but not impact the position or rotation any (unless you want this???) so decrease strength, ramp up frequency and scroll speed, drop Position Amount and Rotation Amount to 0 and increase size mount to 0.25.

Frickin', nice.

Now that it works, make sure to finally disable looping.

With the particle effect done, now we need a cube for these to explode out of. All you need to do is make a new empty object (please tell me you know how to do this) and a cube w/ a scale of approximately 2x2x2, and parent the cube and the particle system to the empty object, making sure they're pretty much in the same spot.

What we want to do is simultaneously disable the cube's renderer and play the particle effect. There are a TRILLION ways to do this, but if you need a simple test, I've quickly set up and attached a pair of scripts that let you test functions/methods pretty easily.

Add em both to your unity project and attach an "EventTest" component to the empty parent object, and set it up like THIS

Okay! Just start play mode and click on "Do The Thing!"

YOU DID IT!!! I'M SO PROUD OF YOU. take off your cleats and have an orange slice or maybe a rice's crispy

Try messing with various settings we have touched recently — shape and noise in particularly. For example, to work better with Puro's 2.5D format, the "Scale" settings under "Shape" are set to 1, 1, 0.5, making the cubes fire out in a somewhat flatter fashion.

Play around with it. Lots of particle effects ideas can be made by just tinkering with settings and seeing what happens!! If you have any questions feel free to AAAAAAAAASK

anyway documenting this took way longer than expected, I think I might switch to videos after this???? thanks bye

Tutorial: That one cube explosion (free!)

Related Creators