Ok, before I begin, first let me explain what my concept behind this was...
I'll start with a quote from "Rendering With Mental Ray" on exactly what a DGS shader is doing to simulate blurred reflections: "In computer graphics, glossy reflection is typically modeled by applying microfacet theory. The assumption is that glossy reflection is actually the same thing as specular reflection, and the reflecting surface is not planar, but consists of a large number of invisibly small microfacets that form a small angle to the macroscopic plane of the surface, thus reflecting in directions that differ from the mirror direction of the surface. This results in a glossy look."
So, basically, a DGS shader within mental ray is simulating incredibly tiny "facets" or "bumps" in the surface, to create a blurred reflection. The lower the shiny value, the more facets there are or the deeper they are, and thus a more blurred reflection is generated. This gave me an idea... if a DGS shader was just using this principle to create blurred reflections, why couldn't I use bump mapping to achieve the same result with a non-DGS material, such as a phong, and simulataneously allow myself to use other bump maps for my surface? I have, more or less, gotten this to work, and will go into detail on how to do it.
Bear with me here, as I try to explain this. Its really not complicated, I just tend to over-explain things.
Also, I am assuming that anyone reading this already has a pretty good understanding on how to use DGS material with mental ray for maya, so I won't be going into long explinations on certain things (like connecting lights to the shader, etc). On many other things, however, I will go into terribly long explinations, which may or may not be necessary ; )
Ok, the first step is to have a model with some amount of detail to it to experiment with... you could use a simple sphere, but I find its easier to see exactly what is going on with a slightly more detailed model... Just make a NURBS sphere and pull points all over to deform it into a more interesting shape.
The next thing you need is an environment to be reflected on the deformed sphere... for my tests, I used an environment sphere with a lambert applied and a checkboard pattern of white and green as a color texture. I also had a floor with a solid white lambert on it.
Then make a mental ray area light, with a physical light node attached to it, emmitting photons, casting a shadow, etc... more or less everything you'd do to get physical accuracy with a DGS shader... obviously the model/environment/physical light is not necessary for all applications of this technique, it just works well for these tests.
Ok, the next step is to make sure you have mental ray as your renderer and GI and raytracing on.
Now, this part is VERY important for any GI rendering with some degree of physical accuracy: make sure you have photon shaders on ALL of your materials. You can use the DGS_material_photon shader to achieve this.
For the checkerboard lambert, put a DGS_Material_photon shader in the appopriate slot, and give the diffuse paramter the same checkerboard as your lambert, and for the white floor, give a DGS_Material_photon shader with just white for the diffuse attribute.
You don't have to bother with connecting any lights to the photon shaders, since they are just used for indirect, not direct illumination... it will work, I promise ; )
If you don't bother to put in photon shaders, you will get wacky results (lighting way too bright, errors about not storing photons, etc), so its important to do this whenever using GI or caustics.
Ok, now lets start simulating glossy reflection without using a DGS shader. You might be thinking at this point "What the ?$#! is the point of this," but trust me there are some definite advantages. : )
Ok, create a phong material. For our purposes (which is just creating a regular metal shader to test our blurred reflections) drop the color value down to near-black... not fully black, or it will just render black, as it will be absorbing all of the light hitting it... so put the V value (I will be using exclusively HSV color values for this tutorial) down to, say, .015, or some similarly small value... for all intents and purposes it will be black, it just won't be sucking all light into it.
Ok, now head on down to the specular shading parameters. Put the specular and reflected color parameters up to full white, reflectivity to 1, and the cosine power to anywhere between 5-15, so we get blurred highlights.
Now, to set up this material for GI/caustics, add a DGS_material_photon shader, and turn either the glossy or specular up to white (not both)... since this setting has nothing to do with what is being rendered, but only has to do with how photons behave, I usually use specular, since caustic photons occasionally seem to have a problem with a glossy parameter being set in your photon shader.
Anyway, now all of our objects have apporpiate materials, with appropriately corresponding photon materials. If you were to render now, you would get a completely sharp reflection, with blurred highlights... typical of traditional phong shaders.
Thus, we need to set forth on making our reflections blurred, as they would appear in a DGS shader. Save the image you rendered with the sharp reflection for comparison purposes later on.
Ok, so, using the same assumption that DGS shaders use to compute blurred reflections (that the surface contains mirofacets), go to bump attribute of your phong shader and create a fractal within it. Leave the bump depth at one, and go to the fractal.
The main attributes that we are concerned with here are the amplitude value in the fractal node and the repeat value of the place2Dtexture node.
Start with repeat value in the place2DTexture node, and put both values very high. 500 should work.
Now, go back to your fractal, and work on the amplitude. We want to set the amplitude value VERY low... if it is too high, your object will appear bumpy... we don't want that, we just want the light to behave as if it were hitting bumps, so it creates a blurred reflection.
Thus we set the amplitude down to, say, .005 to start. If you were to render now, you should see that the reflection has blurred slightly in comparison to your first render. This is good : )
This looks very similar to having a DGS shader, with the shiny attribute set to roughly 20-30.
So what if we want to blur it more or less? Well, we focus on the amplitude parameter of the fractal.
Turn up the amplitude to roughly .025. Render it again. This now looks a lot like a DGS shader with a shiny value of 5-10. Thus, the higher the amplitude value, the blurrier the reflection.
You should notice, however, that it is very, very grainy... luckily, if we turn up the sampling quality, it smooths things out a whole lot, just as it does with DGS.
You should also notice that in all 3 renders, the highlights have a very similar blur value. If you were to turn up the cosine power of the phong's specular, it would narrow your highlight. Thus, unlike DGS shaders, we have control over both the blurred reflection and the blurred highlight, independantly from one another.
This is not physically accurate, but as many people in the entertainment industry will tell you, physical accuracy is not always what is needed to make a convincing shot. However, if you are aiming for physical accuracy, then the higher you set the amplitude of your fractal, the lower the cosine power of your phong should be to attain results closest to reality.
So, now onto the real kicker, and the reason why this method will in many cases be better than using an actual DGS shader.
If you go back to the bump value attribute of the bump2D node and break the connection to the fractal (without deleting it), then, in its place, put a layered texture, you can apply desired bump maps, along with our blurred reflection.
All you need to do is take the existing fractal and layer it overtop whatever bump map you want. Try using an over blend, and drop the alpha channel from 1 to about .5
Voila! Bump map with blurred reflection.
If you want to adjust the amount of bump, you could theoretically mess with the bump depth, but I recommend that you play with the V value in the color gain of whatever texture you are using for your bump map. Remember that you can go over 1 for the color value. So, over 1 creates a greater bump depth, under 1 creates a lesser bump depth. However, the different V values you give to your texturewill also affect your blur...
hey, this isn't a perfect method, but with some playing, you can get some nice results, and most likely something very close to whatever result it is you are looking for.
You can also play with how the fractal and bump textures are layered within the layered texture to get different results.
Now, this method of getting blurred reflections seems to have 3 distinct advantages over DGS shading.
The advantage I just stated, which is being able to get blurred reflections and bump mapping at the same time, without having to deal with the hassle of phenomena or anything else.
You don't have to deal with connecting any lights to your materials to get them to render, which I found could often be quite a pain, especially in scenes with many lights and many DGS materials,
and 3. it actually seems to render faster than DGS. The speed improvement isn't huge, but its there nonetheless.
However, I will be the first to admit that DGS shaders just look better. This method looks pretty good, but you just can't beat DGS for quality blurred reflections in Mental Ray.
Also, DGS is just inherantly more accurate, so if you need the utmost in physical accuracy, thats the route to go.
Anyway, I hope this helps some people out... if any of you had the patience to read through this, that is ; )
I know that for most things, this is the route I am gonna go from now on.
If anyone can think of any improvements to this technique, be sure to let me and everyone else know! Have fun blurring and bumping.
-Steve