Main content

## Pixar in a Box

### Course: Pixar in a Box > Unit 7

Lesson 1: Introduction to particle systems- Effects overview
- Introduction to particle systems
- Simulating water
- Water simulation
- Smooth collisions
- Smoothed particle hydrodynamics
- Create water surface using particles
- Calculating contour lines
- What else can you make with particle systems?
- Fireworks simulator
- Genesis effect
- Getting to know Matt Wong

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Create water surface using particles

How do we draw a surface of water using only particles? In this video we'll introduce a powerful analogy using heat to help us out.

## Want to join the conversation?

- What is the method of treating each particle like a heat source to create a more realistic water simulation called?(5 votes)
- Sometimes, graphics programs call them 'meta-balls'. But you can impress your friends by calling them 'iso-potential surfaces', which is the long version of 'isosurfaces' mentioned above.(4 votes)

- how did you make the program?(4 votes)
- How do I move from simply viewing the videos to trying out the simulations?(4 votes)
- I made some basic Metaballs, you can see them in this program:

https://www.khanacademy.org/cs/_/6181938268798976

But, I was wondering if there was a more efficient way of generating Metaballs other than just going through each "cell" and seeing if its inside one.(3 votes)- There's something called marching squares that can be used for efficient meta balls, though I've not yet had a chance to try it myself: http://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/(2 votes)

- Is there a program on Khan Academy that I can use to do the math of generating contour lines?(3 votes)
- I guess it's an algorithm who calculates contour lines which is programmed with a mathematical formula?(2 votes)
- how is it possible to make paint look real(2 votes)
- It is the same way you make water look real, you just need to set the viscosity higher and probably adjust some other formulas. Of course, the artwork is different since the colors, the reflections of the light, and other visual clues are completely different. The point is, with paint you also use particles to simulate movement.(2 votes)

- what program do you use to simulate the water surface?(2 votes)
- Why is it loading so long ?(2 votes)
- This is getting very interesting and real. I appreciate the particles system tutorials and video.

Please share with us the codes for creating water surface using particles, thank you in advance.(2 votes)

## Video transcript

(bouncing) - In the last video, we saw this preview of a shot from Finding Nemo where we've drawn the particles as balls to illustrate their motion. For the final shot, we
used the particle positions to compute a surface. Then we rendered that surface
to look more like water. To draw a smooth surface
using individual particles, we use an analogy involving heat. First, imagine these
particles are little heaters. Next, pretend we have a thermometer which tells us the temperature
at any point in space. For example, the particles
might be exactly 1,000 degrees, and as we move away, things cooled down. Let's say this point over
here is exactly 100 degrees, and there isn't just one point in space which is 100 degrees, but many points. So if we connect all points
where the thermometer says 100 degrees, we get a
curve shown here in yellow. And that's the trick. Now we can fill in this yellow
curve with a solid blue color to give us something that looks
more like a puddle of water. If the particles are far apart, they each form their own
isolated region, like a droplet. As they get closer, the
droplets start to glob together, mimicking real water. Here's a version with
a few more particles. This is starting to look like water. It would really look like water if we had a few thousand particles. For use in our movies, we
work in three dimensions, and the curve becomes a surface like in this shot from Finding Dory, or in this more extreme water simulation also from Finding Dory. Here's an example from
Monsters University. Here we're simulating
paint, instead of water. We've turned up the viscosity since paint is more viscous than water. We weren't exactly sure
how paint would behave so one of the first things
we did to create this shot is to videotape reference of real paint. The reference really helped
us create a believable look. Let's pause here so you can practice using the next exercise. Good luck. (playful music)