What's Going On
Jamie commented on slide_027 of Dynamics and Time Integration ()

Had the same problem when I was reviewing this lecture. Thanks for the answer!


@rlpo Nice question. It is indeed true that the techniques we've introduced in this class for physically based rendering and physically based simulation look very different. Even within simulation, very different techniques might be used for different phenomena (e.g., solids vs. fluids).

However, there are places where the two worlds cross over. For instance, in graphics we use the geometric optics approximation of light, but of course in reality light obeys Maxwell's equations. These effects are typically unnecessary for making pictures, but you can do E&M simulation on meshes, just like you do for solids, fluids, etc. See for instance this paper on simulating Maxwell's equations using discrete differential forms.

Likewise, there are cases where you can use Monte Carlo methods to solve the kinds of PDEs that show up in physical simulation. My student Rohan Sawhney has some nice work on this topic.


@0x484884 Yes, excellent point. Just because you have a consistent approximation of the differential operator (the Laplacian, in this case) does not mean that you get a consistent approximation of the solution to the PDE (very loosely speaking, this is something like Gamma convergence).

In terms of getting waves that look "visually circular," you're right that using a higher-order Laplacian (like the 9-point version you mention) will do better.


@0x484884 Yes, though you need to be careful: a graph Laplacian with edge weights 1 will not in general give you a good approximation of the Laplacian (e.g., on a triangle mesh with irregular edge lengths, triangle sizes, etc.). But yeah, a lot of the intuition you gain from studying PDEs can and does provide insight into more discrete/computational problems involving the graph Laplacian.


@jifengy Yes, @ngandhi has it right. Take a look at the blue text, which defines the notation. Here, each dot over a variable indicates a time derivative; each prime indicates a space derivative (in 1D). This becomes especially useful when you have mixed time/space derivatives.


In the hair example, do each of the strands have a permanent configuration that can be deformed?

My understanding is that, yes, one reasonable model for hair is to use an elastic rod, which can bend and twist but always tries to restore its original configuration. Real, physical hair will definitely have a yield point past which it breaks; it may also experience some plastic deformation (changing its rest configuration) near this yield point. But since this scenario is pretty uncommon in animation (e.g., pulling someone's hair until it breaks!) these phenomena are generally ignored in the computational model.


In general is every physical simulation just a PDE?

@idontknow Boy, that's an excellent question. Can every physical phenomenon be modeled using partial differential equations? Well, certainly people try to do that, yes. But there are certain phenomena, like contact, where thinking about the relationship between rates of change doesn't quite provide the computational tools you need. For instance, simulating discrete grains (like sand) is a place where you really need to consider both continuous models (based on PDEs) and discrete models, and how they interact.


@dtorresr Mass-spring models can be used as a simplification of the true physics. If you look at a hair under a microscope, it has all sorts of complex geometry and physical behavior. E.g., it stretches and twists in some directions better than others. At a large scale, this behavior can mean that a simple mass-spring model looks almost, but not quite like real hair---resulting in an uncanny valley between reality and simulation. More sophisticated hair models may end up looking, computationally, not so different from simple mass-spring models, but have just the right tweaks and modifications to give the right behavior. If you then want to incorporate effects like wetting of hair, things start to get really complicated! And you need to go back to the physical origins of the equations again.


keenan commented on slide_020 of Dynamics and Time Integration ()

@dchen You can parallelize; it just becomes more complicated. If you have a small number of particles, you can just compute all $O(n^2)$ interactions directly, in parallel. For very small $n$, this is likely just as fast (or faster) than fancier schemes. For larger numbers of particles, you can use hierarchical acceleration schemes reminiscent of those used to accelerate ray tracing of large models. The classic algorithm here is Barnes-Hut... which is often used as an example problem in courses on parallel programming!


@bcagan A lot of hacks people used in the early days of computer graphics were still essentially rooted in some good observation about what phenomena are visually important. Often these "hacks" get revisited from a more principled perspective, since they are still good computational techniques. For instance, Chris Wojtan's group has done some work that could be considered the spiritual successor to these early tricks---but from a much more physically-based point of view:

http://pub.ist.ac.at/group_wojtan/projects/2015_Jeschke_WWAvWPI/index.html

http://visualcomputing.ist.ac.at/publications/2019/FundamentalSolutionForWaterWave/

http://visualcomputing.ist.ac.at/publications/2020/MPWWBa/


keenan commented on slide_008 of Optimization ()

@emmurphy Yeah, stock art is always very illuminating.


Here's a clickable link to the demo above: https://www.adultswim.com/etcetera/elastic-man/


@sponge I love that you now have to ask that question. :-). (In this case, it's a video... I think!)


@enzyme Good point. Yes, mechanical waves travel through solids as well as fluids. Numerical methods for solid waves (i.e., for simulating elastodynamics) look a bit different from those for fluids, but there are of course many similarities and analogies as well.


@bpopeck Yep, you got it! If you understand the mean value property, you understand a lot about the Laplacian---and in turn, a lot about PDEs.

I have a whole lecture about the Laplacian here if you want to know more.


@L100magikarp The issues are slightly different here, but you're right that thinking about where/how a linear solver can be incorporated makes sense.

The basic difference is that with a Laplace equation you're looking for a static, equilibrium solution (just one function) whereas in with the heat equation you're looking for a dynamic solution (you want to know the function at every moment of time). So, it makes sense to setup and solve a big linear system for the final solution.

With a dynamic equation, you might want to take small time steps. E.g., you might need to display animation 30 or 60 times a second---or might need to simulate sound 44000 times per second! So, taking little steps that slowly move toward the equilibrium actually makes sense as a computational technique.

However, if you do want to take very large steps for something like the heat equation, wave equation, etc., you may end up needing to solve a big linear system again. For instance, we talked about how the backward Euler scheme is more efficient than forward Euler for integrating an ODE. In the case of this PDE, we can also apply backward Euler:

$$\tfrac{u^{k+1}-u^k}{\tau} = \Delta u^{k+1}$$

becomes

$$(I - \tau\Delta) u^{k+1} = u^k$$

When (\Delta) is replaced with a discrete Laplacian (whether on a grid, triangle mesh, etc.) this becomes a linear system for the function at the next time step $k+1$.


keenan commented on slide_001 of Optimization ()

@hubbahubba There are a couple courses offered by CMU as a whole, e.g.,

But I'd be interested in hearing whether you've looked at this courses, and if they include the kind of material you're imagining. (There are a lot of different aspects of numerical computing to cover!)


@mdesoto Not just PBR (physically-based rendering), but also physically based simulation is responsible for a lot of the realism in modern computer graphics.


keenan commented on slide_056 of Introduction to Geometry ()

@sponge Quadratic curves (degree 2) have fewer degrees of freedom than cubic curves (degree 3). That doesn't immediately mean you can't do it; you have to count. Can you do it?


keenan commented on slide_033 of Numerical Integration ()

@marshmallow has it right. You could think of this in a more discrete way: suppose you break up the disk into $n$ concentric rings, and pick and equal number of points in each ring. The points on the inner rings will be more densely packed than in the outer rings. That's all.


@oadrian96 Good observation. There have been efforts to conserve mass in the Eulerian setting, e.g., this paper, which takes advantage of the coarea formula. But you're right that in general Eulerian methods struggle more with mass preservation.


@graphicstar11 It's not enough to just be detailed. You also have to be right.

...or at least right enough to fool the eye! ;-)


This slide reminds me of Mohamed Ababou's fantastic paper mind+logic https://vixra.org/abs/1910.0134


sponge commented on slide_056 of Introduction to Geometry ()

Ok and also to answer whether or not we could do this with quadratic Bezier curves, the answer would be yes right? Because you have more degrees of freedom than there are constraints?


mdesoto commented on slide_006 of Physically-Based Animation and PDEs ()

this technology is crazy! everyone talks about ray tracing but PBR is just as important for making things look super realistic.


hubbahubba commented on slide_001 of Optimization ()

In a lot of my courses professors have covered concepts from numerical optimization/numerical linear algebra but just enough to get by. Why do schools generally not offer a dedicated course on this material? In convex optimization they have one lecture on numerical optimization, but I feel like it deserves more attention since so many different fields rely on it. I would sign up in a heartbeat and I think a lot of others would too, particularly graduate students in ML/Robotics/CS.


I was wondering where the line between physically based animations and physics based rendering lies. Is rendering strictly the study of how light behaves and how we perceive it? While animation is more about the movement of actual matter?


graphic_content commented on slide_010 of Physically-Based Animation and PDEs ()

In the hair example, do each of the strands have a permanent configuration that can be deformed?


0x484884 commented on slide_005 of Physically-Based Animation and PDEs ()

I'd guess that these patterns are supposed to look perfectly circular but they look square-like in this slide. Is this due to aliasing since the patterns have pretty low resolution on a square grid, or is it a more intrinsic property of our approximation of the PDE. The discrete Laplacian stencil that we're using looks like its trying to approximate a circle on a square grid but its not that great with just 5 points. Would the pattern look more circular if we used a 9 point Laplacian or some other more complex approximation?


idontknow commented on slide_010 of Physically-Based Animation and PDEs ()

In general is every physical simulation just a PDE? For example, a pile of bricks falling, hair bouncing, water spilling, etc.


0x484884 commented on slide_033 of Physically-Based Animation and PDEs ()

Its cool how the Laplacian matrix of a graph is actually the same idea as the Laplacian operator that we see in calculus and differential equations since they seem like totally different concepts at first.


ngandhi commented on slide_014 of Physically-Based Animation and PDEs ()

Usually the dot means derivative with respect to time i believe


jifengy commented on slide_014 of Physically-Based Animation and PDEs ()

How do we know what the derivative is in terms of when we are using the two different types of derivative notation? (the dot vs the apostrophes)


dtorresr commented on slide_010 of Physically-Based Animation and PDEs ()

So then the mass-spring models used for these types of simulations are represented with PDEs?


dtorresr commented on slide_008 of Physically-Based Animation and PDEs ()

Two Minute Papers is an excellent channel! I love his videos


Unrelated to snow simulation, but I wanted to share a cool video I saw on youtube last year that actually got me more interested in computer graphics:

https://www.youtube.com/watch?v=7SM816P5G9s

It is basically a simulation of a honey dipper in a little cup of honey. At the time I thought it was kind of funny that it was even considered research to be able to simulate honey, but after taking this course... I realize that it is more complicated than I could have ever imagined...

But also I really like how they create these little scenarios where you can literally go and get your own real life objects to see what the desired behavior should look like. There's no uncertainty in what should really happen, because it's really easy to just verify in real life.


dchen1 commented on slide_020 of Dynamics and Time Integration ()

From my limited experience with the Unity Engine, I know that its really simple to make these cool looking particles, that can even interact with other non-particle objects in terms of like bouncing off of them and such.

However I think it's much more difficult to get particles to exhibit any sort of behavior more complex than simple physics calculations, or (correct me if I'm wrong) anything behavior that is dependent on other particles, since you can't parallelize at that point.

I guess it isn't a downside if we only consider using the particle system for very simple behaving objects, and we can approximate more complex behavior with just simple forces too.


I know Wave Race 64 (https://www.youtube.com/watch?v=Ne1vcHhRZyM) was an early example of real time attempts to do fluid simulation (at least in a game). How did these earlier examples compare to more accurate physically based simulations, in terms of implementation?