Yeah, welcome to this. My talk. I will talk about how to make computer graphics.
Some of you may know how to do this. You know, it's pixels, right?
But that kind of different ways to approach this and I will talk about this for a bit.
So one way to make computer graphics is restoration.
This is, I have an example. You probably know it.
But let's look at this. So I have this example right here.
Let me fly around a bit. So basically, you can make these kind of scenes right.
But in the end, if you zoom in enough, it's all triangles.
So it's just a bunch of triangles and then you have something that looks pretty.
So that's one way to make computer graphics, right?
Let me, that's also ray tracing that has become even more popular in recent years because now you can do real time ray tracing.
So let me show an example of that.
So ray tracing, at least in kind of the original days, back back then,
you will see a lot of spheres because those are kind of the existential ray tracing thing.
So here's an example, right? You have lots of these spheres and some lives.
Hitting them and so on, and it looks cool and so on.
And that's just a different way of making computer graphics.
I will skip forward to the next one that I know of.
You can do something which I call simple masks.
It's not really an industry term. I just wanted something that was quick to write down.
I have an example here.
So that's fine, a good example. Maybe this one is not so.
Let's look at this one. It's good, right?
Because you have here a circle and a square.
And they are kind of doing this kind of X or thing over time.
So they are intersecting with each other.
And then they are kind of making a nice mask of which pixels to make black and which to make white.
And it's just like a formula, you know the formula of a circle, you know the formula of a square.
And then you can kind of put them together in fun ways.
And you can extend this and see all kind of nice.
Like this is just a bunch of squares, but then they are rotated and distorted a bit.
So you can make kind of nice graphics in that way also.
So these things that you showed you, I mean there's only a subset.
So many more ways to make graphics on the computer.
But they all kind of share the attribute that you described them in a top down manner.
In the sense that you want to draw a scene.
And then you describe it either in terms of let's say triangles.
Or objects that you can rate face or these masks that I showed you.
So it's very like you describe the scene and then you have some mechanism of rendering that.
So you don't really describe the pixels themselves.
You abstract over the pixels.
And that is very nice.
You can create some really compelling things with that.
But what is the alternative that is to describe the pixels directly?
So instead of thinking about the big picture, think only about the small picture.
And then like the big picture emerged from that.
And that is really hard in the sense that it's really hard to predict what will happen.
If you go to the nitiquity and describe the pixel itself.
It's hard to kind of imagine what the big picture will be when you want to have several millions of pixels on your screen.
But that's also the fun part.
So one way to do this kind of bottom up rendering approach is to use cellular at summer time.
So these are old.
It's in old concepts.
The focus is what's called the cell for our purposes.
That's the pixel is the same thing.
And it only knows about its immediate neighbors.
So if you have a pixel over here, it has no influence over a pixel over here.
No direct influence anyway.
They agree to separate.
They can only look like up or down or lift or right.
And that's really limiting.
But it's also in the sense really powerful because you can do some things that are fun.
Because it's hard to know how it will end up.
That's love this kind of emergent behavior that can look really cool if you get it right.
And then there's this thing called a step function.
So you step over if you pixel.
And then you try to step as much as possible given the constraints of your hardware.
And this is kind of the idea that let's just show it about you have to have this pixel.
And then it knows about its neighbors.
And then there's some kind of calculation going on that determines the new color of that pixel.
So I have some examples.
One example you may have heard of is this game of life.
I will not really show that directly because that is more focused on kind of the model of of
describing in this case a small series of deaths and lives.
And what I really want to show today is not something we are still a similar issue to model something.
Emissating real world.
It is solely for making things that look cool.
So that is the primary purpose.
I will show some examples and then try to illustrate using the systems illustrate the points that I want to make.
So let me start with actually let's start with this one.
This is kind of like game of life but different.
So it starts out a bit kind of wired and wired and then it stabilizes over time.
So these all of these kind of pink things those are the let's me zoom in a bit.
Those are the hallmarks of game of life.
What I have made here in step is a probabilistic game of life.
So game of life has this thing where a cell is either dead or alive.
But as with anything where Boolean logic is involved you can always make it fussy.
So in this case I have turned if you Boolean into a float and then it is probabilistic.
So as cell is never completed that or life is that's always a probability that it is alive.
And that in itself is actually not that interesting.
I tried that and it looked kind of neat but it didn't do much in terms of cool graphics.
So what I tried was to introduce something I call decay.
So let me zoom in a bit more so we have all these green spots.
And that is what I call decay.
So what's interesting in this probabilistic game of life is that if you have a cell,
which for a long period stays either alive or dead so it doesn't change its state.
Then you can say that the decay increases and then once it changes its state,
the decay then inferences the probability of like it's certainty.
So if you have a cell that turns alive and it is in a location with a high amount of decay,
then you actually end up having a low probability that it really is alive and then this kind of evolves.
So you have all these nice spots of green and it doesn't model anything.
I mean I call it decay because that sounds cool but it only proves for this was to make something that looks kind of neat.
So I will show a little bit of code also but not that much because it's not really important for this presentation.
So that was one example. Let me show a different example where it was kind of a different way that in the job.
So let's pick one. Let's pick this one. This is a new one.
So it starts out this very blue but then given enough time.
It starts growing these small spots, small shrals or whatever you want to call them.
So we can zoom in a bit. So it fairly quickly stabilizes.
Now I just zoom in on one area but if you zoom out and zoom in to another area, it's very much the same.
And what's interesting here is that the computation in this one, there's basically no computation.
The way it picks the new color for the pixel is that each pixel has associated with it.
Student random number generator and then it just picks at random.
Either the top neighbor, the right neighbor, the bottom neighbor or the left neighbor.
And decides I will base my new color on this neighbor and then that changes if you step.
And this results in this kind of funny looking swirls that is almost a bit like to see if you squint your eyes enough.
So this one there was very little code involved and I had something much bigger planned and I didn't expect this to happen.
But then I just shortened the code down and now it looks like this and I'm heavier about it.
So that's an example of something that is very stable in terms of I mean that's not so much communication.
If you look in one corner, it looks very much the same like in another corner.
And that's nice but it's also could also be cool to have something where they really do affect each other the different kind of ends of the
program.
So I have one more example showing that.
So this is also something that starts out with lots of small things.
And then you wait for a few seconds and then you see something starting to materialize.
So now with a zoom in a bit, you will see lots of these small kind of cells and let me maybe pause a bit.
So what's really interesting here is that I tried to make something where you have lots of these small.
Maybe it's confusing to call themselves but these small plups.
And then kind of compete for space.
And one of the emergent behaviors that I didn't expect was all of these really cool looking kind of yellow and blue waves.
So when they try to expand, they, they, so each plup has its own color, which is yellow,
I'm sorry, it's like blue or red or green or purple or something.
And then you can see sometimes, oh, this one is gone and now this one is also being eaten.
This purple one.
It's being consumed by other ones, which are expanding.
And if I zoom in it from outer bed again, you can now see that there are much fewer plups.
So if you, if you, if you will, this one continue running for a while.
It will really just be fewer and fewer plups until there's a few winners.
And then it goes very slowly.
So this one is not so stable. If you look at it over time, you will see a major difference.
So sometimes having something that which is stable is nice because you can have a continue run for a long time.
But it's also cool sometimes to have something that is more unstable, just to have some changes.
And you can kind of, it's really fun to watch which ones get eaten by the other ones.
Like this one, something is going down here.
So this was another example.
Let me maybe show an example of something where it didn't quite go as I had hoped.
Let's look, it must be this one.
I had planned something really big for this one.
It was going to be huge supply lines of pixels going all the way across the board.
But then I ended up with this one.
It never changes from this in the big picture.
It's like glittering.
But there's really not anything huge going on.
If you zoom in, you can kind of see that the different parts of it dates fire to inside.
But they really don't succeed.
And I gave up on this one because I couldn't make it work.
And that is the fun of this.
I don't know what you will get because you try to make something work on the pixel scale.
And then that expands to the entire board.
And sometimes it works.
Sometimes you can quickly fail.
But I kept it here just for an example.
I have a few more minutes.
So let me show one where it was not so straightforward for me to have it work.
But it ended up looking all right.
And then I will also show a bit of the code.
So in this one, you have it's very blue.
It's a bit hard to see.
But there will be some things that I will point out.
Let me zoom in a bit.
So I will just pause it and zoom in.
So in this one, you end up having kind of, let's call them lectures.
Where the things from above are bit blocked.
And then once you have these lectures, then if enough blockage is happening,
then you get these things that are moving a bit upwards again.
These kind of broccoli shapes.
And then it repeats things move down again and it repeats.
And what's interesting about this one was that I was really,
I had no idea what I was doing.
I will show you the code for this.
Just to show you an example.
So I have been making this in the food side program language.
It's a programming language for GPUs primarily.
But it doesn't really matter in terms of these cellular automates.
Or you can really do anything in any programming language that you pick.
So this is the step function.
This is a function.
And it's really a mess.
I have no idea why I did this.
But this is, I just tried some things out and then it worked out.
So for example, I'm apparently I wanted to do a module here.
And then I'm multiplying it with some addition.
And yeah, that's how it looks.
OK.
So now I show some examples.
So let's try to summarize.
It's very important to have some local changes that propagate and actually
affects global changes.
Because then you get things that look dynamic and look nice.
There must be some activity.
If there's too little, it just stops.
If there's too much, you can't follow it.
You have to find a balance.
The use lots of color.
I have also used different color spaces.
There's some really nice color spaces out there, which are not just RGB, but something
called okay lap and so on.
Then we'll try it out.
It's fun.
Thank you.
My time is up.
Thank you.