How to create a scratched stainless steel texture

   9579   9   1
User Avatar
Member
3 posts
Joined: July 2005
Offline
Hi there,

I'm trying to create a stainless steel texture as per the attached jpeg. But I just don't seem to be able to get my head around how to do it. Could anyone, kindly, offer me some suggestions? I'd like to do it procedurally if possible.

TIA
ziggx

Attachments:
stainless.jpg (14.8 KB)

User Avatar
Member
4140 posts
Joined: July 2005
Offline
Not sure if you're having more difficulty working with VOPs or just getting the shader, so instead of walking through(just my personal opinion, mind you!) of what constitutes a stainless steel shader, I would instead strongly recommend you search for resources on the web(googly instantly gave me this link [deathfall.com]), look at the example(s) you'd like to emulate(which it seems you've done), and then jump in. Once you start making mistakes, getting stuck in a dead-end, then your questions will have more value for both yourself and others when they're more specific, such as “I'm screwing with this anisotropic thingie and I can't figure out how normals are related to them!”. Also, it helps to clarify if your difficulty is with VOPs or shader building in general.

Shading is shading, pretty well all the theory's the same, you'll want to start with the Lighting Model/Anisotropic Specular for your specular hits, metal shader, perhaps a blinn underneath. Definitely want to add noise-based deformation, via displacement or bump, probably some “dirt” using a noise layer. More layers = more joy.

Cheers,

J.C.
John Coldrick
User Avatar
Member
113 posts
Joined: July 2005
Offline
check the shader palette(sp?) . There are a few metal VOP shaders that can give you some pointers.
where am I?
User Avatar
Member
113 posts
Joined: July 2005
Offline
double post :roll:
Edited by - Jan. 3, 2006 16:31:49
where am I?
User Avatar
Member
3 posts
Joined: July 2005
Offline
Hey everyone,

Thanks for the tips!
User Avatar
Member
23 posts
Joined: July 2005
Offline
hi, i got the same problem on creating scratch metal surface as well.
i need some anisotropic specular to lit on my geometry.

But this is what i get from the help file:
“Avoid using the Anisotropic Specular model on non-subdivided polygonal geometry because it will look flat shaded.”

I have subdivided my polygonal geometry still get the flat shaded look.
You guys have any ideas to solve this problem?


thanks,
jordan
http://pixel-samurai.blogspot.com/ [pixel-samurai.blogspot.com]
User Avatar
Member
65 posts
Joined: July 2005
Offline
jeonado
hi, i got the same problem on creating scratch metal surface as well.
i need some anisotropic specular to lit on my geometry.

But this is what i get from the help file:
“Avoid using the Anisotropic Specular model on non-subdivided polygonal geometry because it will look flat shaded.”

I have subdivided my polygonal geometry still get the flat shaded look.
You guys have any ideas to solve this problem?


thanks,
jordan

WARNING: VERY BRIEF AND SOMEWHAT TECHNICAL ANSWER AHEAD

The problem is that most basic anisotropic shaders have something like:

vector anisoAxisX = normalize( Dv( P ) );
vector anisoAxisY = normalize( Du( P ) );

Which is a property of the geometry. In other words, it is consistent across polygon faces, which is why everything looks “flat” or “faceted”. You can get around this, if you have point normals specified, by modifying the shader to instead have:

normal Nn = normalize( N );
vector anisoAxisX = normalize( Dv( P ) );
vector anisoAxisY = anisoAxisX ^ Nn;
anisoAxisX = -anisoAxisY ^ Nn;

This modification exploits the point normals to modify the anisotropic axis calculations to be smoothly varying across the surface, while still being perpendicular to each other.

Anyway, this is just a brief introduction to _a_ possible solution. If you want more details, just let me know.

Cheers!
User Avatar
Member
941 posts
Joined: July 2005
Offline
rjpieke
WARNING: VERY BRIEF AND SOMEWHAT TECHNICAL ANSWER AHEAD

Hi Rob!

Yeah; deriving smooth tangent vectors for polys is a pain in the backside.
Problem is that the solution you mentioned won't work for non-quad meshes or mixed n-gons – try it on a default poly sphere (triangles) and you'll see what I mean.
So what I usually do instead is request a reference space (world) and build against that. (another good reason for having world space available in vex… but we won't go there). Something like this:

surface blah ( string world = “”; )
{
vector Nn = normalize(frontface(N,I));

//Tangent frame -> {tx,ty,tz} with tz==Nn
//—————————————-
vector tx = normalize(Du(P));
if(world!=“”) {
matrix Miw = invert(matrix(otransform(world)));
vector up = normalize(vtransform({0,1,0},Miw));
if(abs(dot(Nn,up))>.98) up = vtransform({0,0,1},Miw);
tx=normalize(cross(Nn,up));
}
vector ty = normalize(cross(Nn,tx));
vector tz = Nn;

//…
}

(Oh BTW, the ^ operator doesn't exist in VEX, so you have to use the cross() function).

Anyway… not perfect, but a little more stable with polys – would be nice if you didn't have to request a world space (oh wait… did I mention that already?) :roll:

Cheers.
Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
User Avatar
Member
23 posts
Joined: July 2005
Offline
thanks for answering the question.

i just solved it by turning on the "Geometry“ in ”Render" tab to Polygon as subdivision surfaces.

But the rendering time double b4 turn it on.

I know this is not a good solution.( since i don't know how to code).
http://pixel-samurai.blogspot.com/ [pixel-samurai.blogspot.com]
User Avatar
Member
65 posts
Joined: July 2005
Offline
Mario Marengo
Problem is that the solution you mentioned won't work for non-quad meshes or mixed n-gons – try it on a default poly sphere (triangles) and you'll see what I mean.
Cheers.

Hmm … yeah, that's true. Well, just always stick to quads and life will be great
  • Quick Links