View Full Version : vertically elongated Anisotropic reflections/Brushed metal

01 January 2012, 09:51 PM
Ive been hitting myself on the head about this for days... I know I had a similar thread before, I dont mean to clutter the board but this is a different problem.

Im trying to create a shader for an object not to far from the reference picture

getting the brushed grooves look is fine, slightly glossy mia_material with a bump map. Its the elongated reflections which is driving me up the wall!

Every brushed metal shader ive seen on the internet only really control the spec and not the actual reflections from say an IBL. Most of these methods involve faking it with radial ramps, so I have tried piping radial ramps into the reflection but that only creates vertical bands of reflections, but they're still stretched horizontally so it looks weird!

Ive tried a plain standard anisotropic, but that only gives you a very simple anisotropic spec. I feel like Ive tried every combination of numbers under the anisotropic section of the mia_material... the rotation value seems to again only affect the spec, not the reflections!!!

All my reflections only ever really elongate horizontally... if anyone has/can work out how to get vertical elongated reflections that follow the shape of the object I would be ETERNALLY grateful!! Ive read anisotropic depends heavily on nice UVs of which I have tried but still haven't been very successful. Ive had some small success when mapping it onto just plain spheres, but its totally different when you have any shapes slightly more complex.

Its frustrating because metals shouldnt be difficult, but getting really brushed metal reflections seem to be really hard... any help, small or big I will be so grateful for!


edit: here is another good example of the stretched reflections, looking at it they pinch at the top...

01 January 2012, 08:47 AM
It should work as you'd expect. :curious:

Here I've got purely reflective vases similar to your reference photo, no spec. Using the Mia shader I've set glossiness to 0.15 to exaggerate the effect and set the anisotropy to 10 which is the maximum. On the left, 'Rotation' is 0 for vertical and then on the right, 0.25 for horizontal.

01 January 2012, 09:09 AM
hmm when I get home from work I will post up my example scene and render!
Out of interest did you have to UV that before it worked?

01 January 2012, 09:44 AM
Well now I'm confused too. I can't seem to get mine to mess up or change at all! I initially modelled them out of NURBS which have their own built in UV layout, then converted to polygons. Everything worked fine right away. But now I've tried messing up the UVs, deleting the UVs entirely and it makes no difference.

I remembered that back when the DGS shader had it's moment of fame, you needed to have 'Export Polygon Derivatives' turned on in the 'Options' section of the Render Settings, in order for the glossy reflection anisotropy to work, and it was based off the vertex numbering or something. So I turned that off and it still looks fine.

I conclude that it's either wizards, or the directionality must be based on the local or global coordinate space of the object/world?? I think someone like Bitter might know, if we say his name loud enough he might chime in.

01 January 2012, 10:10 AM
a good example would be using a polygon sphere...

you expect something like this

But you actually get the pinching coming from a point on the equator of the sphere, not at the top.... (like you have rotated the sphere 90 degrees). Now I assumed this must be a UV issue... maybe rotating the UVs or UVing the sphere different could move the pinching point to the top of the sphere, therefore following the geometry topology. But I have UVd this everyway possible and the reflections wont move.

Using nurbs unfortunately really isnt an option.

01 January 2012, 02:23 AM
Well some clues are to be found when looking into the anisotropy channel attribute:

"For anisotropy values of 0 or above, the space which defines the “stretch directions” of the highlights are derived from the texture space set by anisotropy channel**.
anisotropy channel can also have the following “special” values:
• -1: the base rotation follows the local object coordinate system.
• -2: the base rotation follows the bump basis vectors
• -3: the base rotation follows the surface derivatives
• -4: the base rotation follows a vector placed in state>tex prior to calling mia material.

**Note that deriving the anisotropy from texture space only creates one space per triangle and may cause visible seams between triangles."

So the default of -1 is indeed using the local space of the object! Option -4 is out because that must be whilst coding manually. Maybe -2 is the best bet, I'll play around with that.

EDIT: I intially posted something somewhat inaccurate, but is now corrected haha.

01 January 2012, 07:30 AM
Well I've had success, however I'm still not entirely sure how to control it properly.

Setting the Anisotropy to below 1 stretches it the opposite way, (why does the attribute go from 0.1 to 10 with 1 being neutral??) but it still isn't right until you set the channel to -2. Then I just added a bump map for effect like in your reference.

Initally I created a network of mental ray nodes including mib_bump, mib_bump_basis, mib_texture_vector and mib_texture_remap and I seemed to get some level of control over the directionality but without knowing the exact effects of each node on each other it was a bit over complicated.


Oh, and the ** point in the post above definitely could be a killer. It says when you put the channel to -2 you may see seams between triangles, this is definitely the case though my bump map hides it. Without that, you can see each quad polygon quite clearly.

01 January 2012, 02:35 AM
Oh look it's me again. :p

After discussing this with a friend, he came up with the same difficulties however pointed out that the mib_glossy_reflection node has direct control over both the U and V spread directions! You can type in a rotation vector or connect it up to something like a directional light for more visual control.

So you could turn off the reflections on the Mia shader and plug the mib_glossy_reflection shader into the Additional Color slot, or however else you might want to go about it.

01 January 2012, 06:38 AM
I haven't opened these, but they might be useful:

CGTalk Moderation
01 January 2012, 06:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.