Jump to content

Blurry Reflections/refractions


Recommended Posts

This topic comes back every couple of months. But anyway... Can you guys explain me what is the best "production" approach to blurry effects - they are pretty expensive in terms of rendering... Are they really used in animation? Do you know good workarounds, maybe there is a possibility to add this effect in COPs - didn't try but seems little too complicated to me :o and difficult to control....

I am really a nob when it comes to VOPs. Could someone please show me a simple example how to pipe in and control blurry reflections/refractions in VOPs? I'd be very very grateful :)

thank you

kuba

Link to comment
Share on other sites

I am really a nob when it comes to VOPs. Could someone please show me a simple example how to pipe in and control blurry reflections/refractions in VOPs? I'd be very very grateful :)

Hey there,

You should definitely not forget rendering with reflection maps. The eye is not very good at being able to tell if a reflection is 100% correct or not and if you have the case where you're not close up to reflective objects which almost touch the objects they're reflecting, then reflection maps are a very good thing to consider since blurred reflections is a simple 2D blur when looking up the reflection.

It's kinda old fashioned but it may be appropriate for what you want. Remember that the Toy Story's were rendered in PrMan before it raytraced reflections and so they used reflection maps. Please read here for an article by Steven Ong: http://www.odforce.net/wiki/index.php/CreatingReflectionMaps

As for blurry refractions, it does get a little trickier. Some times it can work to blur pseudo-refractions entirely in the composite. For a sheet of rough glass for instance, where you just get a smoky look, this is perfectly good to do in comp. Again, for the close-up beauty renders where you really need the sense of depth and such, the other extreme is to use a glass shader like the one Mario has shared with us on the Glass thread on the Shader forum.

What is your scene? It becomes a bit of a sliding scale figuring out what the most optimized approach is for each type of scene and so much of it boils down to experimenting with each techniqu to see if each way can handle your needs adequately.

Good luck,

Jason

Link to comment
Share on other sites

so maybe I'll join your conversation... ;)

For a long time I had a feeling of missing something or I don't understand some simple concept but I was always supprised that I don't have in VEX anything like gaussblur. As I understand this is concept of 2D not 3D but after all we constantly work in 2D space (UV) while working in shading model. I was always curios if I'm missing something or Vex is missing something. Just to say that in almost every shader I wrote (prepared in Vop) I had a need to use some blur function... Is it a common need or Its just me and my stupid imagination? Is implementation of gauss-blur in shading context somehow technically difficult or what..? :wacko: Are these very stupid questions?

Is just somehow changed sampling schema would look like blur?

Cheers,

Sy.

PS I used compositing tricks to achieve blured reflections many times...

Link to comment
Share on other sites

hmm blurring in vops, good question. for procedurals I have

no idea, but for images it would seem simple. in other apps

one would just buffer averages of each pixel + x amount of

neighbours and apply but in vops its either very obscure or it

can't be done ... until arrays are implemented, right?

-cpb

Link to comment
Share on other sites

Hey Symek (and cpb),

Jason already talked about some of the choices in overall approach, so I'll just add a specific note about VEX:

The Texture VOP (as well as the VEX function "texture()") supports blurring. The only somewhat hidden caveat is that for the blurring to work, the texture map has to be a .rat file; anything else (.pic, .tif, .tga, etc) won't work. Once you understand that, then you can choose among a lot of different filter types, not just Gaussian. Here's the list: Box, Gaussian, Barlett, Sinc, Hanning, Blackman, Catmull-Rom, Mitchell, and Point... that's an impressive selection.

Blurring is *also* supported by the ray-tracing VOPs (and functions) -- it's just not called "blur". In this case, there's a parameter usually called "cone angle", and another one usually called "number of samples". Simply put: the bigger the cone angle (in *radians!!!*), the blurrier the reflection/refraction will be, and the more samples you'll need.

Blurring is also supported by some of the built-in procedural patterns (one notable exception being "aanoise"). But in general, this is rightly left to the procedural to support: i.e: self-antialiasing with support for an arbitrary filter size is not something that Mantra (or any other renderer) can impose on the procedural.

The above (with very slight variations) is true for for *every* renderer I've ever used (though ray-tracing was not always supported by all). This is very basic stuff (to use, not to implement), so if you find yourself thinking it's not there, then it's very likely a case of not having found it yet.

HTH,

Cheers!

P.S: Sorry for over-stressing "radians" up there, but it's a common mistake. As a rule of thumb: if you're in VEX/VOPs (as opposed to hscript or the Houdini interface), angles are in radians.

P.P.S: @cpb: what you describe is a box filter and, well, nothing wrong with it, but... God help us if we had to filter textures like that at the shader level :o

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...