Anisotropic reflections produce unexpected results

So attached is a vray example file using anisotropic reflections on the top of a cylinder. I’m looking for these results:

And I’m getting these results:

Anyone know what I’m doing wrong?

- Neil



vray_aniso.zip (24.9 KB)

Hi Neil, big fan of your work and scripts. Without downloading the attached file I would take a guess that you have a bump map in use as well as the anisotropy in the shader. Disable the bump and check if your reflections appear closer to the result you’re trying to achieve. I’ve had strange results when using bump & anisotropy together, I imagine the bump is disturbing the normals and the anisotropy is unable to return the expected result because of this. I could be wrong but this has always worked for me when troubleshooting strange reflections.

Ant

Hey Rich, thanks, glad you’ve enjoyed my work and scripts. No bump map I’m afraid, that’s a good guess, but it’s a pretty vanilla setup with glossiness, anisotropy turned on, and a mapped rotation based on a gradient ramp set to spiral. Any other possibilities?

- Neil

I was kind of anticipating the no bump map response and trying to think of an alternative suggestion before your reply but you beat me to it :wink: I will download the scene in the morning and try a few things, I think it will be something very easy to overlook - hope so anyway. I can think of a number of ways to get you the result you’re after but I’m intrigued as to what this error is down to.

- Anthony
(This is my boss Richards user account)

Thanks. Found some further weirdness. If I switch to a vray light and make the size very small (mimicing a point light), I get a totally different pattern. Also, if I add more spans to the top surface of the cylinder, I get a totally different pattern as well, which is weird because it should be keying off the UVs, and the amount of faces shouldn’t affect anything. Something is definitely amiss.

- Neil

Yeah I think it’s something to do with the cylinder object. The cap seems to create some strange effects. I think your light position and type also isn’t helping.
Your material in essence should produce a somewhat correct result but the rest of the scene and the misbehaving geometry isn’t helping…

Tried the same scene on a plane instead of a cylinder, and I get even weirder results. So I think it’s the vray material that’s misbehaving. I can replicate the proper results with an identical scene in scanline, brazil and mentalray, vray’s the only one that’s not working. If I haven’t missed anything, then I’ll probably submit it as a bug.

- Neil

I think you might be jumping the gun. I’ve managed to produce it with a custom piece of geometry. This is a lathed line and my own metal shader. It doesn’t look wrong to me. I still think the native max geometries are a bit screwey…

Are you using Map Channel 1 or the object’s X, Y or Z? And do you have the top surface mapped with a gradient ramp? If this is a lathed line, that sounds to me like the shader isn’t reading the UVs but is instead reading something intrinsic from the geometry construction.

- Neil

I’ve done it the same way you did. I have the anisotropic rotation set to map channel 1 with the same spiral gradient ramp map you used.

Hmm, well then, if the shader won’t work on normal max geometry and will only work on specially constructed, that is an issue. Will post it as a bug. Thanks for the help confirming the extent of the issue.

- Neil

This makes no sense. What is normal max geometry? Are you talking about primitives? If so there are loads of things one should not use primitives for, and might require some carefully planned construction. This is nothing new. You seem shocked a shader does not have a special case handling for objects with bad normals?

Neil I just downloaded your scene and had a look. Oddly enough inside the material viewport the gradient ramp didn’t show up correctly. So just for fun I used a bercon gradient ramp with the same spiral setting which resulted in picture “A”:

After that placed a new default 3ds max spiral gradient ramp inside the ani.rot slot which gave me this result:

Strange why the bercon ramp and the default map differ in results even though they look visually the same.

*edit because apparently I was drunk when I wrote this :P*


Well, it didn’t work on a plane, and it may be a tough case to say that the plane primitive in max has bad normals :slight_smile: Since the anisotropic effect is uv based, I would expect it to work on anything with the appropriate uvs. It’s a pretty standard subdiv workflow to say make a cylinder, convert it to editable poly, then modify it as necessary to become say the elbow in a robotic arm. So the anisotropic shader should work in this case, again, assuming you’ve set up the uvs correctly.

Very interesting results Oliver. The bottom image is indeed what I’m after. I’ll do some more investigating, but you may have set me down a good path, thanks! Will report back in a bit with my findings.

- Neil

So did a lot of poking, and it’s odd. So if I replace the Gradient Ramp in the file with a fresh one, it works as expected. The gradient ramps are identical in every way parameter wise, but the new one works, and the old one doesn’t. The only explanation I can come up with is data corruption, maybe the old gradient got corrupted somehow. Anyways, since it does work with a fresh Gradient, I’ll just chalk this up to weirdness. Thanks again everyone, and Oliver, thanks for finding the last puzzle piece!

- Neil

Well in the case of a robots arm (modified cylinder) you are pretty much making what you described as specially constructed geometry.

Personally I have not had much problems with this, other than trying to use imported geometry from Autocad. Sadly, rebuilding is always necessary it seems.
I must admit I have never tried to render a plane primitive with an anisotropic metal shader, but I get your comment about its normals.
The issue of replacing the gradient with a fresh identical one is interesting. I’m curious to know if this is indeed a 3dsmax issue or a VRay problem.