Image File Filter And Animation

i personaly prefer to use no filters in my image file nodes and if i want to blur them i just do that in motion blur so i get perfect control on everything.
Now i heard that when rendering an animation this can cause "texture swimming".
does anyone have any exemples?

i did a quick test (2 animations) with filter on (mimap) and the other with filter off.
(rightclick save as)
i didn't notice any changes, only some subttle flickering in the backrounds rugs.
here are the frames (you will have to fcheck them): Frames:

http://sor.typepad.com/files/persp1.rar

so is this the artifact that you get when you don't use filtering in textures?

You probably dont want to ue mipmap but soem of the other shemes instead, try elliptic

QUOTE
i want to blur them i just do that in motion blur so i get perfect control on everything.

Yes but also you render for a longer time. Basically the cost is in more samples than otherwise would be neccesery. In fact sometimes the texture filter is far superior than even Insane amount of sampling. PLEASE note your vieports allmost allways are turned to filtering and indeed yoru splays look better with filtering than without. Also sometimes a 256 filtered image does better than a 2048 nonfiltered one.

I would only do thsi for still images Because theres no temporal aliasing to think about.

QUOTE
i didn't notice any changes, only some subttle flickering in the backrounds rugs.

Its called temporal aliasing. To be hones youd get even better results if you use elliptic filtering. Thing is the filer is NOT a blur, it can cause blurring if you over exaggerate the filter amount.

See the problem is that no filtering works like this

CODE
      /  |  |  \
     /   |  |   \
    /   /    \   \    Eye rays
   /    |    |    \
|----|----|----|----|
pix1 pix2 pix3 pix4

Here it kind of works fie each pixel gets hut quite nicely by a eye ray. But imagine the eye reyes coming very steep, remember the Angle between the rays is same over the area

CODE
____
\  __\___
\   \    \______
  \   \          \
|----|----|----|----|
pix1 pix2 pix3 pix4

See how the rederer skipped pixel 3. Now whet does the filter do? Well it trues to integrate the are of the pixels so thet the third ray sees the average of some kind of pixels 3 4 and 5 Some flters di thsi better than others.

Also sometimes if you use low sampling settings (say mr -2 0) you can get a blurry representation of the texture simply because the starting ray sampling is so few apart but the filter is doing too good of a job. You can allways turn the filter down a bit. Turning in more samples helps only up to certain point at the horizon you will need allready millions of samples to compensate.

QUOTE
subttle flickering in the backrounds rugs

Well you may find the human eye is VERY VERY good at seeing aliasing. So even slight flicker is significantly worse than sight blurring. In fact this si the kind of things TD's constantly fight at in big studios. Its a tradeof, flicker or blur*. It turns out that slight blur is way better than the flicker.

Incidentally filtering mechanisms make the rendered render at significantly higher speeds, good testament to this is prman that does motionblur at astonishing speed Its does this by filtering fast moving objects more than slow moving ones. So at teh end of the day filter can mean 99% samne images with 1/10 of the time it takes to render. Now if you do a 1 hour film where average frame takes 1 hour versus one with 6 minutes is 90 000 versus 9 000 hours Now guess howmuch money you saved

You can manually controll the amount of filter so you maya catually set the mipm,ap texture not to filter in foreground but do in the back

QUOTE
didn't notice any changes, only some subttle flickering in the backrounds rugs.

Well your textures are not very high frequency ones in this context (a 0 2 sampling can cope with this easily), sometimes the aliasing can indeed be very very much more pronounced. But yes people will notice that flicker. And instantly recognize it even non trained eyes spot this immediately. On the other hand they dont notice a bit of extra blur.

Try turning the images into perspective and make a pan/rotate. Now your in trouble

  • every sistation has a different optimum area.

PS here is a nice explanation:

http://www.fundza.com/rman\_shaders/high\_fr...sing/index.html

By the way the ONE OF ONLY page on that site thats worth anything, many of the rest are a bit misleading. Especially the mel ones.

Thanks alot Jooja.
this is a crystal clear, great paper.
-If i get it right, the only way to avoid spacial and temporal aliasing is texture filtering ( wich is way more powerful then render globals filtering to "correct" temporal aliasing). And who says texture filtering says bluring.

-So elliptical filtering* is suppose to "blur" background textures but not forground textures, right?

-"manually controll the amount of filter so you maya catually set the mipm,ap texture not to filter in foreground but do in the back" are you talking about eliptical filtering here ? if not i would really like to know how to do that?

-So the main function of texture filtering is to fix temporal and spacial aliasing,but what if i didn't had any aliasing problems what will texture filtering be useful for?

-If i am using 3D motion blur (for exemple in a scene with 100 flying rugs at different distance from the camera wouldn't that 3d motion blur be enough to fix the temporal/spacial aliasing of background rugs without texture filtering (regardless of render times)?

-my fear is that if using texture filtering + 3d motion blur, one would ger over blured images.

*this doesn't work in Maya 2009 because if you create a mib_texture_filter_lookup node and click on the tex slot, you will get this error message: // Error: (Mayatomr.Output) : file error:, guess it's another 2009 bug

QUOTE(ROYTERR @ 05/28/09, 06:45 PM) [snapback]308470[/snapback]
-If i get it right, the only way to avoid spacial and temporal aliasing is texture filtering ( wich is way more powerful then render globals filtering to "correct" temporal aliasing)

Well actualy they are not related to each other. The purpose of the rendering filter is to reconstruct the signal you have gained, whereas the texture filter helps make a better signal.

QUOTE
-So elliptical filtering* is suppose to "blur" background textures but not forground textures, right?

All of the filters either blur or sharpen (called ringing, more common to the reconstruction kind tough) things a bit because thats what happens when you integrate and or apply a convolution kernel on top of a sampled signal, and what happens in camera too. And all filters try to filter more in the background. Elliptical filetring just has a more appropriate shape in the texture space than a mipmap box.

This siad mipmaps can be generated manually to be sharper than what the default average is

QUOTE
wouldn't that 3d motion blur be enough to fix the temporal/spacial aliasing of background rugs without texture filtering

As lomg as you take more 2 times more samples than you texture frequency. Wich can be impossibly much if the object is in right angle.
QUOTE
-my fear is that if using texture filtering + 3d motion blur, one would ger over blured images.

I wouldn't they act at different steps in the signal generation. A better signal at a lower step is almost always better at the next steps reconstruction.

QUOTE
*this doesn't work in Maya 2009 because if you create a mib_texture_filter_lookup node and click on the tex slot, you will get this error message: // Error: (Mayatomr.Output) : file error:, guess it's another 2009 bug

Its not, read the whats new section of the manual. They have something to say about this.

QUOTE(Joojaa @ 05/28/09, 11:33 AM) [snapback]308479[/snapback]
This siad mipmaps can be generated manually to be sharper than what the default average is

actually using the elliptical filter gave a more blured texture (for the forground and backgound, tried high and low numbers).
how can i get sharp results for the foreground parts of the texture with this filter?

here's the scene

Do not EVER open mb files to other people than those that work in the same office as you! Or people you explicitly trust. It takes me 2 minutes to hook up a Trojan in the mb file in a way that your virus scanner has no way of detecting!

And personally i cant just take this risk, unless offcourse you can pay for my current project if it goes tits up. Care to resend as a MA file. <Wich has many other attributes thet makes it easier to debug.

QUOTE(ROYTERR @ 05/28/09, 11:53 PM) [snapback]308483[/snapback]
actually using the elliptical filter gave a more blured texture (for the forground and backgound, tried high and low numbers).
how can i get sharp results for the foreground parts of the texture with this filter?

Make the sample size of the filter smaller (or even better drive it by range), sharpness is a function of 2 things. The sampling and the reconstruction filter (whar kind fo sampling do you use BTW?). But sharpness is also more.

Question is SHOULD the result be sharp*? imagine a real camera a real camera does not sample pixels because a LOT of photons arrive. Now if you watch the link i sent you in the first post. Then you can see that the signal thats not actually reconstructing the signal at all is WAY sharper. Yet its undeniably wrong.

See the thing is in real world each pixel represents the total sum of colors in the pixel divided by area. This is a blur, but you dont actually go around saying its wrong.

Now imagine:
CODE
Reconstructed pixel width

|----------------------------------------|
                    |
                    |---Sample  
                    |
|--------|--------|--------|--------|--------|

original image pixel field

Now yes it yields a sharper edge between the signal generated. This is sharper. Its not right but it is sharper (incidentally if you want a maximally sharp image you need to alternate white and black pixels)

Now in reality youd want the average over the area of the sample instead of the individual pixel, that is blurier in terms of brurier than the original image. But then again your brain expects this it knows how to dissasemble this as long as you have ever seen it sharp, because this is what happens in reality (or in fact in you monitor if yo look at it very closely ist justa buch or red green and blue dots not some color, you just are so far away they get averaged together if your vision was SHARP like this you couldn't see colors on a monitor)

But let us think what happens when the sample moves a bit its sharp but does it stay sharp. yes it does the ray just hits another pixel to sample, the threshold is high on the other side yes the individual image is sharp BUT your sample just jumped form one to next, this causes flicker. Now if you moved one pixel and you ahev a 2 sample motion blur then it works fine! however if you moved 10 pixels youd need a 10 sample motionblur.... which is not exactly feasible. Hooray 1 for hour renders.

Now incidentally IF you sample enough for the flicker to dissapear your image would blur as much as if youd uded the perfect ideal filter. sampling enough is in thsi case is a umlimitted amount. So getting it right blurs as much as the filtering would.

But your mixing the filters up, your reconstruction filter SHOULD ring so the job of the reconstruction filter is to sharpen the image. So choosing a wide lancoz should counteract the blurriness of the signal. Whereas a gaussian trulu just blurs, and box would be a bit pointless for a situation like this.

*Not do you want it to be sharp!

Oh 3 more things.

  • Are you working gamma correct? if not then you would bleed bright areas into dark ones. Because the rendered assumes a linear workspace
  • Theirs really no such thing as "no filtering", the filter should be called nearest neighbor and does remind of conceptually a box filter. A nonfiltering filter would preduce a black image because the likelyhood of hitting the absolute center of the pixel is quite small. So none is still a filter albeit a very bad one.
  • This si not a issue you can slove, theres several thing you can optimize for bot in the end you gain some in the other end and loose in the other. So for example if you reduce flicker you, make a blurry image. If you take more samples you make a more blurry image, if you blur significantly more in the background than in the front then the fade is unnatural, causing human brains to respond to it. If your not gamma correct it all goes to hell except that your lightning needs to be redone and ultimately the non gamma correct may be what yoru going for. Etc etc. They are linked together because they all do the same thing affect the signal and they cant be perfectly reconciliated. Its
  • i am using gamma correct nodes (with mias_exposure at 2.2 and framebuffer gamma 1) with a lanczos filter.

    QUOTE(Joojaa @ 05/28/09, 10:46 PM) [snapback]308489[/snapback]
    Now yes it yields a sharper edge between the signal generated. This is sharper. Its not right but it is sharper (incidentally if you want a maximally sharp image you need to alternate white and black pixels)

    does that mean that my still rendered image with unfiltered texture (no motion) gives "untrue" results , specially in the background even if it looks sharp?

    QUOTE(Joojaa @ 05/28/09, 10:46 PM) [snapback]308489[/snapback]
    Now in reality youd want the average over the area of the sample instead of the individual pixel, that is blurier in terms of brurier than the original image. But then again your brain expects this it knows how to dissasemble this as long as you have ever seen it sharp, because this is what happens in reality (or in fact in you monitor if yo look at it very closely ist justa buch or red green and blue dots not some color, you just are so far away they get averaged together if your vision was SHARP like this you couldn't see colors on a monitor)

    does this mean that a real world digital camera would behave very similarly to a mimap filter by bluring pixels from sampeled areas with high frequency patterns?

    QUOTE(Joojaa @ 05/28/09, 10:46 PM) [snapback]308489[/snapback]
    But your mixing the filters up, your reconstruction filter SHOULD ring so the job of the reconstruction filter is to sharpen the image. So choosing a wide lancoz should counteract the blurriness of the signal.

    not really because even with a lanczos filter and mimap filtering for textures , your foreground textures will also blur

    QUOTE(Joojaa @ 05/29/09, 12:44 AM) [snapback]308492[/snapback]
    Oh 3 more things.

  • Theirs really no such thing as "no filtering", the filter should be called nearest neighbor and does remind of conceptually a box filter. A nonfiltering filter would preduce a black image because the likelyhood of hitting the absolute center of the pixel is quite small. So none is still a filter albeit a very bad one.
  • maby using "no filtering" can give unaccurate results for background textures.But when it comes to foreground textures, "no filter" will give you the most accurate result.
    If you take a TGA texture and assign it to an image plane texture* and render it with lanczos, and using "no filtering" this would give you the most similar result to your original texture if you compare them in PS. but if you use mimap filtering for exemple they will be quite different. beside that texture filtering tends to shift all the pixels (by one pixel) something that i really dislike, as for no filtering every texture pixel lands exactly where it's supposed to be (assuming you have the same resolution...)

    *and not image file and matching camera rsolution

    QUOTE(Joojaa @ 05/29/09, 12:44 AM) [snapback]308492[/snapback]
    [*]This si not a issue you can slove, theres several thing you can optimize for bot in the end you gain some in the other end and loose in the other. So for example if you reduce flicker you, make a blurry image. If you take more samples you make a more blurry image, if you blur significantly more in the background than in the front then the fade is unnatural, causing human brains to respond to it. If your not gamma correct it all goes to hell except that your lightning needs to be redone and ultimately the non gamma correct may be what yoru going for. Etc etc. They are linked together because they all do the same thing affect the signal and they cant be perfectly reconciliated. Its
    [/list]

    so this means that in MR4Maya you can get accurate results either for background textures (by using mimaping for exemple) either for foreground textures (by using unfiltered textures).

    mixing the 2 would give unacurate results.

    QUOTE
    i am using gamma correct nodes (with mias_exposure at 2.2 and framebuffer gamma 1) with a lanczos filter.

    Also in your shading network?

    QUOTE
    does that mean that my still rendered image with unfiltered texture (no motion) gives "untrue" results , specially in the background even if it looks sharp?

    Yes

    QUOTE
    maby using "no filtering" can give unaccurate results for background textures.But when it comes to foreground textures, "no filter" will give you the most accurate result.

    yes and no, it depends on whatkind of dignal you think a texture is. I would definitely say no.
    QUOTE
    not really because even with a lanczos filter and mimap filtering for textures , your foreground textures will also blur

    Yes but are you seing sharpness or aliasing?

    QUOTE
    If you take a TGA texture and assign it to an image plane texture* and render it with lanczos, and using "no filtering" this would give you the most similar result to your original texture if you compare them in PS

    Well depends. if your texture samples happen to hit one to one then yes. Try scaling the image in ps and then compare! In any case its a totaly different ballgame. in photoshop you haev a reconstructed image in the render time you do not. With right filter setting and sample setting you get right solution even with mipmap

    QUOTE
    or no filtering every texture pixel lands exactly where it's supposed to be

    Ok you are a bit over obsessed with this. Unless yuor rendering for film it doenst matter one way or another your precision gets thrown out the minute it becomes a media file.

    QUOTE
    So this means that in MR4Maya you can get accurate results either for background textures (by using mimaping for exemple) either for foreground textures (by using unfiltered textures).

    No, ite means you can do all of this just you gain some you loose some. In ny case your woking under false logic here so it doent matter whatever happesn it will be worng.

    QUOTE(Joojaa @ 05/29/09, 01:48 PM) [snapback]308547[/snapback]
    Also in your shading network?
    Yes but are you seing sharpness or aliasing?

    yes also in my shading network.
    no i am not seeing sharpness or aliasing.

    QUOTE(Joojaa @ 05/29/09, 01:48 PM) [snapback]308547[/snapback]
    With right filter setting and sample setting you get right solution even with mipmap

    i would love to see this hapening. it never worked for me.have you been able to do it?

    QUOTE(Joojaa @ 05/29/09, 01:48 PM) [snapback]308547[/snapback]
    Try scaling the image in ps and then compare!

    even after rescaling the 2 images, the most close image to the original one is still the unfiltered image plane textur.

    • why is the texture shifting a bit ( in u and v) when using the mimap and other filter? is there a way to avoid this?

    -I can understand your logic here. MR is trying to sample or "blur" pixels just like the human eye or a camera does. your monitor exemple explains it all. so rendered blured pixels (compared to the original image) is more physicaly correct than unfiltered sharp images.and that's why it's ON by default.
    But when you use a photo texture that has already been "sampeled" or "blured" but the camera (specially photos taken from a distance), and you use mimap filtering then the sampling process or "blur" is hapening twice. Don't you agree that if one is to use mimap filtering he should sharpen the photo texture a bit in PS befor mimaping it? so he would remove the sampling or bluring introduced to the image by the camera and let MR do this job?

    QUOTE
    no i am not seeing sharpness or aliasing.

    offcourse you are. Either that or your blind.

    QUOTE(ROYTERR @ 05/31/09, 08:47 PM) [snapback]308623[/snapback]
    i would love to see this hapening. it never worked for me.have you been able to do it?

    Yes offcourse. Its not automatic offcourse its after all a tradeof. But use elliptic filters its better (just amke sure you make those map files yourself)

    I just tested and i its possuble for certain data to get slightly sharper results with a 0 1 lanczos 4 4 + mipmap (elliptic) than a with a 0 2 none. And it does not flicker at depth. Its true it gets slightly blurier at far depth. but that it should. Tahts what counteracting the flicker and thats what happens in reality.

    Do not confuse depth of field blurring with resolution downsampling

    QUOTE
    - why is the texture shifting a bit ( in u and v) when using the mimap and other filter? is there a way to avoid this?

    ive asked before WHAT IS YOUR INITIAL SAMPLE SETTING? what is you min sample set to. And do you jave jitter on!

    QUOTE
    ut when you use a photo texture that has already been "sampeled" or "blured" but the camera (specially photos taken from a distance), and you use mimap filtering then the sampling process or "blur" is hapening twice.

    No. Its not a blur, its how optics work. There is a infinite variance between pixels and when a pixel is rendered that infinite variance needs to be averaged over the are you look at it. It does not compound in the way you describe. It sjust you assume this to happen.

    The mipmap doesnt do anything to the image if your close enough to the camera so if the width of the texture pixel in relation to your viewport is larger than 1/2 of a pixel then not mipmap texel is taken into account. Ergo its not filtering the image its just interpolating it to get sub pixel color samples.

    Your asumption is that a image should represent, a box field ie the image is like this versus a continious signal

    CODE
                              _  _    
    ----+                    / \/ \    _  _
        |    +----+               |   / \/ \
        |    |    |               \__/      \
        +----+    |      VS                  \_/
                  +----

    The continious signal can be sharper or blurrier depending on interpolation kernel used.
    the most problematic thing you say is here:
    QUOTE
    If you take a TGA texture and assign it to an image plane texture* and render it with lanczos, and using "no filtering" this would give you the most similar result to your original texture if you compare them in PS

    Accoring to that thinking the best possible setting is box 0 0 sampling, with no filter on textures. It produces EXACTLY the same as in PS, assuming you embed same profile. Thats true but you wnt move the picture.

    QUOTE
    Don't you agree that if one is to use mimap filtering he should sharpen the photo texture a bit in PS befor mimaping it?

    Not really. The image is progressively blurred more when you take it further, you have reconstructed the image and added the sharpness back. Now the same kind of integration happens in ad infinitum

    so since your image represents something at a set distance, but it will avarege up more the furter away from thet distance it gets. Since your image will not become BETTER than that you cant really take it closer in maya without loosing detail, and moving it further just would do what would happen if your taken the picture form even further. So it all adds up and works perfectly fine. The same continuation happens even in the 3d application.

    In any case theirs nothing to slove here. like i said its a tradeof. You just want more blurry images for animation the brain corrects moving things to sharper (yes even a blurry animatin can look sharp IF its in playback). And in any case any production compression will just blur your sharpness out. Whereas for slightly blurred it doesn't add blur because it con solve the gradient as it dont need to eat the bits exactly form there.

    Its your choice if you optimize sharpness at all other cost you get tempal and spatical aliasing problems. Its a simple mathematical correlation. You can have either or, not both or you can compromize and have some of both. That is a fact.

    QUOTE(Joojaa @ 05/31/09, 01:20 PM) [snapback]308631[/snapback]
    [img]style_emoticons/<#EMO_DIR#>/laugh.gif[/img] offcourse you are. Either that or your blind.

    Of course Lannczos filter gave sharper results than the other filters. specially in high contrast borders.
    But what i meant is that i couldn't see sharpness inside the texture map with mimaping when compared to no filter (i know using no filter is wrong)

    QUOTE(Joojaa @ 05/31/09, 01:20 PM) [snapback]308631[/snapback]
    ive asked before WHAT IS YOUR INITIAL SAMPLE SETTING?

    Samples 0 2 (custom) , Lanczos, AA 0.01, jitter,Sample lock (it's all in the file i posted).
    Now when i talk about shifting pixels with mimaping, here's what i am talking about:
    comparison

    QUOTE(Joojaa @ 05/31/09, 01:20 PM) [snapback]308631[/snapback]
    The mipmap doesnt do anything to the image if your close enough to the camera so if the width of the texture pixel in relation to your viewport is larger than 1/2 of a pixel then not mipmap texel is taken into account.

    Exactly and you shouldn't see any effect because the level 0 of the mimap pyramid is used and level 0 of the pyramid is exactly like the original image. but you can also see in my posted file that the mimap is affecting a texture that is close enough to the camera.

    QUOTE(ROYTERR @ 06/01/09, 10:02 PM) [snapback]308703[/snapback]
    Samples 0 2 (custom) , Lanczos, AA 0.01, jitter,Sample lock (it's all in the file i posted).

    Yes, the file was a maya binary one. And for security reasons i cant open it*. You should neither, never open a mb file forma person who you do not trust your life on.

    I can send you a mb file that will format your harddrives would you like one. The problem is not so much that i am afraid of viruses. taht no problem i do have a antivir. But a maya file can contain arbitrary code thats NOT a virus as fasr as the antivir is concerned. You can easily make it wide spectrum to work as well within linux mac as win.

    • yes i can open it if you pay for the risk, somehow i doubt you have the money.

    QUOTE(Joojaa @ 06/01/09, 11:29 AM) [snapback]308708[/snapback]
    Yes, the file was a maya binary one. And for security reasons i cant open it*. You should neither, never open a mb file forma person who you do not trust your life on.
    I can send you a mb file that will format your harddrives would you like one. The problem is not so much that i am afraid of viruses. taht no problem i do have a antivir. But a maya file can contain arbitrary code thats NOT a virus as fasr as the antivir is concerned. You can easily make it wide spectrum to work as well within linux mac as win.
    * yes i can open it if you pay for the risk, somehow i doubt you have the money.

    the last file i uploaded was a .ma

    Yes i did notice the file got changed. but i had troube downloading it the server bailed at 98% each time. Anyway im back to measuremenst so theti can explain the gamma thing to you.