Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

6. Motion Blur


ent

1. Introduction

 

Hello all!

 

Today I'm gonna tell you a bit more about different blur styles and settings that you can use in jaMME.

 

Hopefully it will help you pick the right settings for your material.

 

As you probably know, there are several commands which affect the way mme will blur your frames.

 

Those are:

 

mme_blurframes [0-32]

mme_bluroverlap [0-32]

mme_blurtype [gaussian,triangle,median]

  • mme_blurframes determines the amount of frames that is taken into the blending. the bigger the number, more smooth the final image is, but also longer processing is required.
  • mme_bluroverlap is similar to blurframes, but it is the number of frames that are kept from previous frame and blended into the new frame. higher number results in smoother image.
  • mme_blurtype governs the algorithm of the smoothing.

The tutorial is divided in few sections.

 

Hope you'll enjoy it.

 

 

 

2. Theory

 

In case you are not interested in the beneath the hood part, you may skip to next section, but at least check the "in short" part. This will get slightly mathematical and all. ;)

 

First lets say a bit on different blur shapes.

 

Triangle

 

It is the simplest of blurring methods. It uses the linear average between multiple pixels.

 

It is what is more commonly referred to as mean average.

 

Mathematics:

Example 1: (2 + 4 + 3 + 11) / 4 = 5.

Example 2: (2 + 4 + 3 + 111) / 4 = 40.

 

Store all pixel data into a 3d matrix, with width [x] and height [y] the size of a single image and "length" [z] of the mme_blurframes. For each [x,y] calculate the linear average of all [z]. That is your new image.

 

Example 1:

We have only one gray-scale pixel over 4 frames, with values of 0 (black) - 255 (white).

[0,100,5,255] -> [(0+100+5+255)/4] -> [90]

As a result we have a dark gray pixel.

 

Example 2:

We have only one gray-scale pixel over 5 frames with values of 0 (black) - 255 (white).

[0,0,0,0,250] -> [(0+0+0+0+250)/5] -> [50]

 

As above examples show extreme values have a big impact on final image.

 

Gaussian

 

Gaussian blur is based on the "gaussian curve" also known as "bell curve" (due to its shape). That curve is a representation of "probability" that some combination of events happens.

 

Easiest way to picture it is if you take 3 dice with 6 sides, throw them and add the numbers. You will get 10 or 11 as a result on average, and you will get 18, or 3, only extremely rarely. If you would write all that down on a graph, you would get the bell curve.

 

Mathematical part is a bit hard to explain in short, but it gives most impact to average values, and very little to extreme values.

 

Example 1:

We have only one gray-scale pixel over 4 frames, with values of 0 (black) - 255 (white).

 

Note that the result is not accurate, it is my own estimate. http://auri.co.uk/files/images/forum/mme/smilies/wink.gif

[0,100,5,255] -> [50]

As a result we have a very dark gray pixel.

 

Example 2:

We have only one gray-scale pixel over 5 frames with values of 0 (black) - 255 (white).

[0,0,0,0,250] -> [(0+0+0+0+250)/5] -> [3]

 

As you can see extremes have an impact to final value but it is very low.

 

Median

 

Median blur is a blur based on the median of numbers. It is also a way to determine the average (like linear and gaussian are).

 

In statistics median is the number dividing the higher half of some sample population from the lower half. It has a tendency to completely ignore extremes, and it is always a value that appeared, therefore being an existing value within that population, and not some value that is derived from a calculation (and might not be a part of that population).

 

Example 1:

We have only one gray-scale pixel over 5 frames, with values of 0 (black) - 255 (white).

 

[0,100,5,255,75] -> [0,5,75,100,255] -> [75]

 

Example 2:

We have only one gray-scale pixel over 5 frames, with values of 0 (black) - 255 (white).

 

[0,0,255,0,255] -> [0,0,0,255,255] -> [0]

 

Note how extreme values are sucked out of a median calculation, having absolutely no effect to final result.

 

In short:

  • Triangle (linear or mean) blur: extreme values affect the final result a lot.
  • Gaussian blur: extreme values have an effect to the final result, but not so much.
  • Median blur: Extreme values are ignored.

3. Action

 

OK all that mambo-jumbo up there wasn't really that helpful. You know what would help you, don't you? Examples in actual movie making? Well here they are! :)

 

Example 1:

 

Capture settings: mme_blurframes 32, mme_bluroverlap 0, mov_captureFPS 30.

Camera is static.

 

http://i1.minus.com/i2dZ4tFwiZrlV.png

Triangle

 

http://i5.minus.com/ib1W1HcVJF7p0a.png

Gaussian

 

http://i6.minus.com/ibjyws0VhdhUTD.png

Median

 

Note the differences.

 

On linear the player is well defined, but notice that edges are a bit sharp, and that even small things, like black edges on textures, effect the rest of the image (due to slow camera movement) and therefore that image is slightly darker.

 

On gaussian the player is slightly less defined on edges, but still visible on entire area of the model. Rest of the image has better light and color data, due to reduction in extreme values. Notice that textures have the most sharpness of all 3 pictures.

 

On median you can notice that the player looks ghostly. If he was moving faster, he would stop being visible! Note that textures look more blurred, but organically so, not like linear blur has them.

 

On linear the textures are much less defined than on gaussian, yet look artificially blurred, unlike median.

 

On gaussian the textures are well defined, yet smooth.

 

On median the textures are heavily blurred, but notice that they are not recalculated, instead they look sort-off like our eye would see them (you notice that there is a texture going on, but you don't see it exact).

 

 

 

4. So what now?

 

OK so you saw examples. What to look after when you go making your own movie?

 

First, examine your material.

And also decide what you are after.

 

If you want sharp images, gaussian or triangle is the way to go. Triangle is much faster, at the cost of a bit less precise smoothing.

 

If you want images that look as if the human eye would watch them, use median. Just be careful that nothing moves too fast on your capture, cause nobody will see it. Unless thats what you want, that is. ;)

 

In short it all depends on your time, and how much you consider enough.

 

I've seen clips rendered in mme_blurframes 4 and mme_capturefps 200, than later merged in Vegas to 25 fps, that looked super-smooth (InstaUnlagged demo), and also clips that even on well over 12000 frames just don't look smooth enough (excessiveplus ctf run).

 

Note that the faster the action, the more frames you should be using to keep the quality of blend good. But that usually also results in nothing being visible. Sometimes its better to go for less smoothness, in order to keep content clear. It is a delicate line, and walking it can be hard at times. :)

 

 

 

5. End

 

Hope you enjoyed the read, and that it helped you.

 

Keep the following in mind:

 

mme_blurframes [0-32]

Smaller value will render faster, but loose smoothness as action speed increases.

mme_bluroverlap [0-32]

Same as blurframes, but can be useful to even more increase the speed of rendering and amount of smoothness in the same time.

mme_blurtype [gaussian,triangle,median]

Gaussian gives that usual motion blur that you are used to. Good quality and speed.

Triangle is fast, but tends to be a bit choppy.

Median gives the look as if human eye was watching, so fast action is often not visible. But looks organic if done properly.

 

 

Thats all folks, till next time. :)

 

Credits: Foksie; original: link.


User Feedback

Recommended Comments



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...