background image always gets blured

hi guys
i am new in this forum and have the following problem, perhaps someone can help?
i created glass objekts flying through a room, the video of the room lies on an texture on a plane in the background, fitting to the camera in size and angle. But the video in the background always gets blured a little bit when oversampling(antialiasing) is switched on, the same happens when it is not a video but a simple picture. But i need oversampling for smooth edges of the glas and i need the backgroundvideo for the transparent parts of the glas using also raytraced refraction.
Can i somhow disable oversampling for the background only? or change other settings to avoid this small blurring of the background image when oversampling is switched on.
any other suggestions?
thank you a lot.

You could try a different filter. By default it’s set to gauss(ian) which is pretty blurry. Try Mitch or CatRom. http://wiki.blender.org/index.php/Manual/Oversampling_(Antialiasing)

Try this
Image Size should match Camera Output Image size.

thank you for the answers, but the image size fits exactly to camera output size(PAL), the blurring also happens when i use the image in the worldbackground and the paper option to make it fit exactly(there seems to be another problem also then, because raytrayed refractions does not fit to the background image then)
and i also tried the different oversampling filters, perhaps its a little bit better, but why can´t the picture in the background look just the same as it looks originally and as it looks if OSA is turned off?

see my animated banners, in some banners, I am using Background image of size 468x60 with some other software. On that I am using Blender Artwork. Background Image is working perfect with me.

i have prepared 2 images, just a shadeless activated plane with a picture as texture, camera exactly fitting(so exactly i can do manually, is there a way to make it really exactly fit?) image and project 800*600 pixels. in one image OSA with filter mitch activated, in one picture it is deactivated, see the heavy difference.
the .blend file is also attached. has someone an idea how to fix this?

Attachments



untitled.blend (414 KB)

Try turning mipmaps off on the video texture.

thanks for the hint, but i tried and it changes nothing.

OSA is a rendering feature, which means it’s going to apply the filter to the entire image at render time… so no, you aren’t going to be able to have OSA off for the background but on for everything else.
…unless you do it through nodes or overlay the images in the compositor.
I had been hoping that Blender would have (by now) had a straight “movie or image as background” feature instead of the colour or blend alternatives, but it does not seem to be the case.

A larger filter setting (next to the filter type) will make it a bit sharper.
Left is that image as the background, right is the plane that you had. Also, the CatRom filter is used. I think this image is a bit sharper. Not much though :confused:

thank you all for helping
@tatsuyame
the sharpness really works fine with this higher value, but the objects who need oversampling also don´t get beautifull edges than.
@Lancer
how can i do it with nodes, i haven´t worked with material nodes yet, is it possible with nodes to switch off antialiasing only for the texture?
And the thing with the overlaying in the compositor doesn´t work in my case, because my objects are made of glass and i need the raytrayed refractions in transparent parts, i think this won´t work in compositing, or did i misunderstand you?

Me neither really… not much anyway :wink:
Here’s something I put together while I noticed your last post. ('xcuse the pencil… it was what I was modeling at the time and I needed an object to try the render on)… see attached file below.

How’s that… does it work for you? You could add a blur to the Alpha if you like.

The problem I see with your query is in the transparency… refracting light etc. You see, the above works by placing the texture onto the shot after the render, whereas the light bending stuff has to work along with the render. There are several ways around this, most involving “passes”. That is; you initially get a render with OSA on, but then apply the mask to the resulting image, to give it the sharp background image as my above example. It may be possible to do something like this with layers (or similar) all in one render, although it would certainly be possible (and maybe even easier to set up) with prerendered files.

The compositor (BlenderHeads tend to call it the “Video Sequence Editor”) is kind of a workaround for more or less the same result; combining the rendered files. Check out the tutorial at http://wiki.blender.org/index.php/Tutorials/Video_Sequence_Editor for some interesting reading.

Attachments

background01.blend (300 KB)

thank you lancer
it is like you have posted, the problem with the light bending and refractions. i have sent two pictures which shows what i really want to do, flying glas in real places,
one rendered with OSA one without. the only problem is the blurring of the backgroundtexture “inside” the glas objects,(see the difference in the box at the lower part of the glas,even better when the image is shown at 100%), not the blurring of the surrounding backgroundimage, this i replace afterwards using alpha in composting, where i do some more work on the look of everything.
you say to solve this using passes and a mask, but how can use a mask to “cut something out” of the glas object, what is part of the glas object? I hope i could express this understandable.

Attachments



Oh wow - now you’re taking it to a whole 'nother level.

What I showed before was one way of making the glass have OSA, but composited onto a background without OSA… of course as you can see, anything within the OSA-empowered glass (haha) is also going to have OSA, including the refracted background.

One solution is to work in three passes.

  1. A “no OSA” pass of background and glass refractions. For this pass, all specular lighting, reflectivity etc turned OFF. You want invisible glass, but with some lens distortion happening over the background.
  2. Another shot of the glass with OSA on, but over a completely black background. This is just to get reflections & specular highlights.
  3. An Alpha pass of the glass (the mask). (Best without OSA but change if you want)

Now you use the Compositor (Video Sequence Editor) to put them all together.
Background with distortions => Mask => OSAed specular highlights & relfections.

Have a shot composit the background(1) and then using the mask(2) add (or overlay, screen… whatever works to best effect) the glass specular lighlights & reflections(3) back into the final sequence. That http://wiki.blender.org/index.php/Tutorials/Video_Sequence_Editor tutorial I mentioned before will show how to use the Video Sequence Editor to do this last part.

that seems to be a good solution, i try it later and will report the result.
thanks

I tested this with several settings, but the problem is your mentioned first pass, i don´t get a render where i can only see the refracted background and nothing more, even with everything switched off in the material settings i found. there are always these hard pixellike black edges of the glass like in the picture. i can render this with background plane alpha = 0, then i have only the refractions, but also with this ugly black edges, even when i add your mentioned second pass to picture, the edges still stay. but perhaps somebody knows how to make only the transparent parts visible and nothing more.

Attachments


There are several options you can take to fix this, depending on your requirements for render speed versus accuracy.

Those black edges are caused by two things:

  • Where raytraced light hits its limit (e.g. allowed 3 bounces) it gives up and returns as black. Increasing the recursion of the raytracing will fix this, but at a noticeable cost of render time.
  • If the IOR value of your material is too high, it will reflect areas outside the area of your viewport background. Either take the IOR value down in the material, or place the whole scene in a sphere with mapped out surrounding area. When using reflection & refraction, some people make a real science of this technique. See http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/HDRi

The fact that you have a flat plane as your background means your refractions are not going to be genuinely accurate… you would actually need to model the 3D background for that, so I’m assuming you are after a convincing impression of refraction. You should move the background closer to the foreground glass objects until the IOR (refraction) looks correct… don’t have it too far back, but then you might also want to consider turning the “traceable” button off for the render pass, as this will rapidly fix the above issues with a reasonably good fake pass, but you loose the fully transparent (refracting the revese side, but probably this won’t matter.

Test blend for you to examine included with this post.


Attachments

refraction_pass01.blend (76.3 KB)

hi lancer
i´m really glad you helped me with all this stuff and i really learn new things from your tips, thanks a lot. But i still don´t get the results i want to get. i could manage it to avoid the black edges, but still the glass has pixellike edges, in your testrendering you used OSA, if you turn it up, with your sphere it is not that bad, but in the monkey and other forms with sharp edges, this pixel attract attention. even when you overlay it with the highlight rendering as you described, you still see these edges. i modified your scene by turning of OSA, replaced the background with a still of my video and replaced the stuff with a simple cube, and now it looks like this. (file also attached)
The best results i finally could check out for my project is to turn off OSA in general, and do just one pass with the framesizesettings 14401152 instead of 720576, and afterwards in compositing rezise the video again, but there are still non accurate edges and the files are quite big, i think the rendering also needs longer.

Attachments

refraction_pass02.blend (476 KB)


Well, thank you. :slight_smile:

I’m not that experienced with nodes, compositing etc. There are some other real guns around. I thought this thread was pretty interesting & relevant: http://blenderartists.org/forum/showthread.php?p=1240263

For the refraction pass, definitely enable OSA in main render setting, otherwise, yes you will get massive pixelation issues. I think you didn’t want OSA for the refractions earlier, though I would suggest they are through glass and it’s better to have a slight blur than pixels.

Here are a few alterations I made to your file…

http://img522.imageshack.us/img522/4024/nottraceablenk3.jpg
http://img522.imageshack.us/img522/nottraceablenk3.jpg/1/w600.png

If using the background in this pass, you should hit the “ConvertPremultiply” button in the AlphaOver node. I better handles the pixelated edges when the mask is applied.

I have also added a blur to the mask itself in order to better control the merge over the background al little. Not quite as successful as I would have liked, so playing with the types of blur etc may get better results. For now, I actually prefer the image without this blur, but have left it in as it may spark off an idea.

I also changed the world colour from bright green to something like the mid-tone of what it used in your image. This way, you can now enable “traceable” to your glass material for full transparent refractions (highly recommended; being able to see through the glass is considerably less fake looking), although I recommend taking the IOR down until the cube looks right. Ignore the “true to life” 1.5 or there abouts IOR value of glass, as the flat background method is going to blow this accuracy anyway. I would seriously consider the afore mentioned HDRi surrounding sphere because “make traceable” is going to cause bounced light to pull areas way outside of the camera (simply texture the outer envirosphere with your image… it’s only meant so your refracted glass picks up patches of the right colours).

Remember this is the refraction pass only. The idea is to take another pass of just the spec highlights, along with a filter to create lens flare, glare, shiny bits etc over a black background. Then, you would overlay, lighten only, screen etc (whichever works best… second image as alpha would probably do it) to marry the two passes together.

For the image, I just moved the objects along a bit into view (X axis). There isn’t even “traceable” enabled on the glass, and the result should be a lot better once you do this (with HDRi surroundings) and also one spec highlights, glare, shine etc are also added in (again: this is the refraction pass only)

.

Attachments

refraction_pass03.blend (356 KB)