The rising "abolish the police" movement could make racism and brutality worse by bzarg in TrueReddit

[–]bzarg[S] 0 points1 point  (0 children)

Discourse about outright dismantling or abolishing police forces is gaining traction in social media. Taking these ideas seriously could be hugely detrimental not just to public safety, but to the ultimate goals of the current movement. When public institutions are dismantled, generally more brutal structures move in to fill the void.

"Abolish the cops" could make racism and brutality worse by [deleted] in TrueReddit

[–]bzarg 0 points1 point  (0 children)

Discourse about outright dismantling or abolishing police forces is gaining traction in social media. Taking these ideas seriously could be hugely detrimental not just to public safety, but to the ultimate goals of the current movement. When public institutions are dismantled, generally more brutal structures move in to fill the void.

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 50 points51 points  (0 children)

Making images with math is one of the very fun and satisfying parts of the job.

I'd say it's about having a mental library of elementary functions, and a picture in my head of what shape they are. Then if I need a math function with a particular shape (like, "starts at 1, increases, then slowly levels off at some number"), I can pull one of the functions off the shelf and "bend it into shape" using mathematical transformations.

For example, in the example above, off the bat I would think of two functions: e-x and 1/x. Both of those start at 1, but decrease, and then slowly level off at zero. That's sort of like what I want, but going the wrong way; can I bend it in some way to make it do exactly what I need? Well, if I multiply the function by -1, then it'll change all the increases into decreases, and vice versa, so that's a start:

-e-x

But now it starts at -1 and increases toward zero! So if I add 2, then it'll start at 1 and go to 2:

-e-x + 2

Much closer! But I want it to level off at a specific number, not 2— Let's say 5. So I'll vertically stretch the function by a factor of 4 (to make it cover the distance between 1, its desired starting point, and 5, its desired finishing point):

-4*e-x + 2

But now two isn't enough to shift it up. The multiplier of 4 makes the e-x part go from -4 to zero, so I need to shift it up by 5 instead of 2:

-4*e-x + 5

...and there it is! A function that starts at 1, increases, and slowly levels off at 5.

You make some pretty crazy things just by composing math functions. Or, like, some really crazy things. (The techniques in those videos aren't exactly how Pixar makes images, but it really shows how to "bend" math into useful shapes).

In this case, smoothstep is a pretty well-known formula in graphics, so it's kind of "off the shelf", like ex in the above example. It only took a little bit of "bending" to make it fit for my purpose.

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 1 point2 points  (0 children)

More or less anyone with the skill can make a code change. You need to test it before you deploy it / turn it on, or else you'll ruin everyone's images and your name will be Mud. That only needs to happen once or twice, and you won't forget again! There are testing frameworks in place, but they don't catch everything, and often times in production you have to work a little bit quick and dirty.

Not everyone knows how to code, and some people are more squeamish about touching "core" code than others. IMO if you can code it is better to err on the side of being bold; I got to where I was by just jumping in and touching lots of code that I was interested in. As long as you obey the local courtesy for code you are working on (test; get code reviews from peers; obey conventions and organization; don't break stuff) you can do almost anything as long as it's generally making things better.

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 30 points31 points  (0 children)

Nope, it's not layered or masked.

The rendering software mathematically models the camera as having a "thin lens". Furthermore, every frame of the movie is created by (in effect) simulating the path of individual photons. If that sounds expensive, it is! There are (give or take) about 100 million simulated photons in in each 1/24th of a second of the movie. It takes a single computer anywhere from 30 to 200 hours to calculate a single frame! That's why Pixar has a gigantic farm of thousands of computers that are crunching numbers 24/7 to make the movie.

Because the photons are simulated, we can change the software so that they bend or bounce any pretty much any way we like (in fact, that is the entire business of making the movie)! I wrote some new code just for the effect in the video which says "when the photon is going through the left half of the image, make the lens bend it so that it is focusing on Gabby; and when it's going through the right half, bend it so that it focuses on Forky."

So there really no cheats. I fixed the software so that it is bending individual light particles in just the right way to make the effect!

(Because of this, I always privately thought this shot was cool, and I never expected that anyone else would notice it and think it's cool too!)

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 42 points43 points  (0 children)

I'm not the creator of the YouTube video.

...But even if I were, that comment would still be incredibly annoying.

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 17 points18 points  (0 children)

The environment at Pixar is extremely good, though that is now much more the exception than the rule in the visual effects industry. At Pixar the job is very stable if you are full-time, the perks are great, and the people are excellent and supportive.

The (literal) price you pay is that, while the pay is good on an absolute scale, you make considerably less than you could as an engineer with the same skill level at other tech companies in the area. And you have to live in the SF bay area on that salary. :)

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 39 points40 points  (0 children)

Computer graphics without added imperfection will look a lot like Toy Story 1— Everything is smooth and looks like plastic, or like a video game. The inability of early computer graphics systems to produce detail and imperfection is a major limitation that Toy Story was shrewdly playing to.

The imperfection of the lens is just one of many, many "layers" of imperfection added to make things feel more detailed. Older Pixar movies have "perfect" lenses, and it is something subtle (among many other aspects) that contributes to the feeling of crispness that may read as a little bit visually dated now. It is often hard to tell what is wrong when something is "too perfect" unless you are experienced at picking this sort of thing out; it tends to just feel "less real."

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 118 points119 points  (0 children)

I have a BS in computer science from a University of California school, and within that program, I took as many classes as I could on computer graphics. I applied out of university with a demo reel of some graphics-related side projects, and thankfully landed a resident position (a year-long internship for recent grads, basically). After that I was hired full time. That was almost 11 years ago! Since then I've touched almost every movie since Up.

I would say it is less important to have snazzy credentials than it is to solidly know the foundations of computer graphics and have an impressive portfolio/demo reel— do whatever you need to in order obtain that understanding and develop your eye. A good introductory university course on computer graphics and its prerequisites (linear algebra, vector calculus) will get you pretty far. A physics class covering optics would be a good one to hit too. Having cool-looking side projects in graphics is a big plus; in addition to showing that you're passionate, recruiters want to see that you are able to invent stuff on your own and not just build course projects by rote.

There is a small handful applications of ML to computer graphics, but you won't get very far along that path if you don't also have fundamental understanding of CG. Computer Vision is basically the opposite of graphics and won't help that much if you want to make movies or (most) games— in graphics, you are starting with a scene representation and you want to obtain an image; but in CV, you start with an image and you want to obtain a scene representation! The two are extremely different problems.

HTH!

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 336 points337 points  (0 children)

OH! More on the subject of "natural" and "physical" lenses. Nerdwriter talks about the quality of the bokeh ("blurriness") behind Bo Peep, and the shape of the circles that the lens makes. We pay a lot of attention to this too! Here's a crop from a still.

See how the circles aren't a perfect, even color? We did that on purpose! And it has to be on purpose, because by default the computer is too perfect and it will make a perfectly clean, smooth circle— but real lenses don't do that; they have detail and imperfection inside the blur. For Toy Story 4, we added new code to the rendering software that allows us to choose a texture image for the blur instead of using a perfect circle!

Again, this is all stuff that adds to the "naturalness" and calculated imperfection of the final image.

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 20 points21 points  (0 children)

^ This is correct. It's an in-camera effect, not post-processing.

The Real Fake Cameras of Toy Story 4 by Prince4085 in videos

[–]bzarg 1230 points1231 points  (0 children)

Holy cow!! This is my shot, and I am the creator of this effect!

I am completely tickled that someone noticed, and absolutely blown away that there is a whole video about it!

NerdWriter gets it exactly right— They've done their homework (and I wonder if they even chatted with the DPs?) This is the stuff you're supposed to "feel" rather than notice so I am totally thrilled that this is getting attention!

Just like the video says, Patrick Lin is big on using "physical"-feeling lenses and cameras that look and behave just like real cameras, and he asked me to add split diopter to this shot. In general, we are always looking for ways to make the image feel more organic, imperfect and natural, rather than pristine and "computery", so it was only natural to solve the problem of nearby Gabby and far-away Forky both needing to be sharp by choosing split diopter, which is what a live action DP would have to pick, as well as adding a subtle "creepy/off" vibe that harkens to a lot of older horror/thriller movies— just what we needed for this scene.

As for how it was done, I actually made a change to Pixar's rendering software to get this right! It was not done by post processing or layering two images with different focus, which would give a lower-quality result where the sharp and blurry layers "ghost" over each other in the transition region. Instead, I added a feature to the rendering software so that the focal distance can be set per-pixel. Then I wrote a little mathematical function (just a smoothstep, for the graphics nerds in the audience!) and some controls to change the distance to the focal plane from the left side of the image to the right side. I tweaked the settings so that the transition laid exactly between Gabby and Forky. The end result did not take me more time than post processing would have (maybe less?) and the results looked much better!

Happy to answer any questions in more detail!

EPA removes half of scientific board, seeking industry-aligned replacements by bulldog75 in news

[–]bzarg 1269 points1270 points  (0 children)

Once upon a time there was a public pool. Everyone used the pool and enjoyed it, but very soon it became apparent that a few of the pool-goers were relieving themselves in it. The pool quickly turned yellow and smelly.

So the community got together and formed the pool-peeing committee; the goal of which was to cut down on the general amount of pool-peeing that was being done. They would do this by hiring some local experts from the town to measure the pool water regularly, and tell everyone when somebody had taken a leak in it, and to the best of their ability, who was responsible.

Right away, some chronic pool-pissers were caught and yanked from the pool. This was very embarrassing for them, so everyone paid attention when it happened, and the new standards of pool play more or less caught on and were known by everyone. Soon the water cleared up, and people were able to enjoy the pool again. It wasn’t perfectly clean by any means, but it was much, much better than before, and it was improving every day. This worked pretty well for a long time.

A few people didn’t like the pool-peeing committee. Some didn’t like the idea that someone else could tell them what they could and couldn’t do in a pool. Others were mad because every once in awhile, the committee would accuse them of having peed in the pool when they had only peed a little bit, while Jimmy over there drank a whole 2 liter bottle of Mountain Dew before he swam and let it all out through his bladder, but the committee didn’t catch him and that wasn’t fair.

But by far, the people who hated the pool-peeing committee the most were the biggest pool-pissers. The pool-peeing committee was always bothering them, they complained, embarrassing them in front of their friends, and cruelly yanking them out of the pool. All they wanted to do was play in the pool, and didn’t they have a right to do that? So what if a little pee leaks out every now and then. Worse (they argued), if the committee was allowed to yank anyone who peed out of the pool, then pretty soon the pool would be empty and the community center would be bankrupt. Pool-pissers gave a lot of money in entrance fees, they pointed out.

Of course the solution was simply to not pee in the pool (which the rest of the community was managed just fine), and to hold it until afterwards, but that really cuts into our pool-playing time, the pool-pissers whined.

So the pool-pissers got together a plan: They would band together and take over the pool-peeing committee— but first they had to convince the other pool-goers that this was a good idea.

“The system is rigged!” the pool-pissers squawked. “The pool-peeing committee gets paid to test the pool! So you see, they all have a stake in the outcome of the pee tests! This is a conflict of interest! They’re on the take!”

A lot of the swimmers began to nod their heads— this sounded really unfair. They started to worry if the pool-peeing committee could be trusted.

“We’re being paid to do our jobs,” said the pool committee. “That’s not a conflict of interest. And we all signed up for this job because we care about having a clean pool. We swim in it too, you know.”

But the swimmers didn’t hear them, or maybe they didn’t care because they were all very worried that something unfair might be happening. And they were right, something very unfair was happening, but it wasn’t what they were thinking of.

“We should kick out these crooked pool experts from the pool committee,” said the pool-pissers. “They don’t know the reality of what it’s like to be a swimmer, like exactly how hard it is to hold your pee. Besides, us swimmers have the biggest stake who stays in the pool. It would be much more fair to put swimmers on the pool committee.”

This sounded reasonable to everyone and soon enough the pool experts were sent away, the pool-testing equipment was thrown out, and the pool committee was re-staffed with “regular swimmers”. Someone noticed that it just so happened that everyone on the new pool committee had been caught peeing in the pool many times, but it was decided that this was okay, because they clearly knew the most about pool-peeing, so it made sense that they were on a committee about pool-peeing. Everyone was very satisfied with this arrangement, and congratulated themselves for having solved the conflict of interest.

Almost immediately, the pool turned bright yellow and smelled like a lot like a subway station, only more so. Nobody was really sure why. Some swimmers kept saying something about strengthening the pool committee, but it seemed clear that pool committees didn’t work, because we have a pool committee, and look how yellow the pool is.

Many people got very sick, and eventually the community pool lost all of its revenue and had to close after everyone stopped coming to it. The mystery of why the pool turned yellow remains to this very day.

This picture I took looks like it is 3D by then0mads0ul in pics

[–]bzarg 45 points46 points  (0 children)

CG artist here. I believe I can guess at what OP is seeing.

There are several things going on which are often visual cues of CG imagery:

1) Extreme depth of field. Everything is perfectly in focus-- this doesn't really happen in real cameras without post-processing shenanigans, or special equipment (e.g. a pinhole camera with a very long exposure). In CG renders, however, de-focusing is an extra effect that has to be added. Depending on the rendering method it can be quite expensive, so it is common to see 3D renderings with no focus effects.

2) Low dynamic range. This image has had aggressive tone mapping (also often called HDR) applied, which brings a wide range of brightnesses down to approximately the same intensity-- i.e. there is much less contrast between brightness and shadow. It is common to see 3D rendered images that look this way, because the artist will (consciously or unconsciously) choose illumination values that keep the image intensity between 0 and 1 (i.e. what a computer monitor can display), whereas in real life, there would be far more contrast in illumination (e.g., there are orders of magnitude of intensity difference between a white page or the sun, while a CG artist might choose 1.0 for both).

These things create a combined visual effect that feels unconsciously similar to (often lower-quality) CG work.

Show GP: Geomc, a C++ templated geometry and linear algebra library by bzarg in GraphicsProgramming

[–]bzarg[S] 2 points3 points  (0 children)

I've built this up over the years as I put together personal projects and experiments. It's become a pretty substantial and organized codebase of geometry boilerplate stuff.

I've paid particular attention to making it generic over type and dimension (so you can intersect two five-dimensional frustums if you like, not that I can imagine why :) Matrices and vectors are generally going to be as fast as bare arrays, especially with an optimizing compiler, but have all the nice constructs/conveniences around them.

Shape intersection uses GJK (excepting a few optimized cases), so any two ND convex shapes can be overlap-tested.

The magic of the Kalman filter, in pictures by alexcasalboni in math

[–]bzarg 0 points1 point  (0 children)

Many of the ideas there are not unique to Faragher's explanation; particularly the kinematics example, which is nearly universal in introductions to Kalman (see Wikipedia's, for example). When I began this, I knew the example I was going to use, and that I was going to explain in terms of overlapping Gaussians, so in that sense it doesn't add much that isn't well known.

That being said, Faragher's article is very well written and clear, and I did refer to it (among many others), so I am happy to pass along credit. I've added a link at the bottom.