Cycles material study

Hi, folks! It’s been so long that I’ve not blogging (it’s been more than a year!) and not posting in this forum. Yeah, college enrollment test and office jobs are quite making me have a hard time to touch internet. Although my job was making shader to a local animation company, but I still need your companion and suggestions to improve my shadering skill.

So, here is my first attempt to make a brushed metal. I don’t know which one should I post as a study result. So I provide two of the results, which are the original one and the (color) composited one. So, I can learn some of color compositing as long as learning shaders. :smiley: And should I just post the studio lighting setup version only?



P.S. the blog that I wrote as my signature below won’t be active anymore, since I want to save some money to buy a domain and posting more advanced and fancier stuffs. Sorry, for my blog followers. I’m sure I’ll notify you in a post at my blog after having the new one.

Looks great - can you post an image of the node group?

For better comprehension of the case, we need the .blend file.
ps: If you put the .blend, do not forget to “pack files.”
Cheers.

I would love to know how you got that constant feed rate look on the noise if it’s made procedurally. Using cartesian to polar transform on coords, I can get top lid and side of a cylinder to look good, but not the angles in between (if it’s rounded). Also, whenever I use a double mix (0-1 and 1-0) to eliminate a visible seam, I get visual evidence of a “mirrored texture”, which I hate.

Btw, the logo inset/bevel brushing direction looks completely off, in the sense that it would be impossible to brush that way. I would probably not have that in my showcase. No easy way out of that one though afaik.

Sure, here is the .blend file. Sorry moony, I think providing the .blend file is easier. :smiley: I’ve made some others but has not been completely finished. The rest of the material settings are in Indonesian. That’s because it was meant to be created for my ex-office. But now they cancelled it.

It’s distorted noise procedural texture :D. Yeah, I’m wondering that part too. How to apply procedural texture on that inset(ed) part. Actually I won’t make my own texture on that mesh since the mesh itself is kind of dirty (I mean, dirty topologized). Sorry for the creator of the mesh. I got it from blendswap. Just in case, if I have my own model, I’ll sure make my own because I know my mesh really.

Ah, so excited to have replies such in a short time! Thanks for visiting! I need to learn more.

The material looks “nice” … but i “think” if u can control the colors of “cracks/slots” (and shadows) and more bump … maybe the material will be more flexible … anyway …with images now cycles can do very cools “bump” materials.
ps: the “Hdry” close my all blender versions. I just deleted environment and all works fine.
ps2: i try it bake-up the image but the final result looks horrible … lol (and have seam mark of displacement on material too).
(sry my bad english)
cheers.

ahaha sorry, I don’t understand the ‘control the colors of “cracks/slots” (and shadows)’. Can you explain a little bit more?
Ah yes, since the library was for animation production, I was told that using procedural is better to minimize memory consumption. I planned to use image texture on my projects. I’ll update it soon.
What is Hdry? Do you mean HDRi? Ah sorry if the HDR is too heavy.
How to bake procedural texture?

Hi… im not a expert so … just trying explain.
HDRI (data format)
HDR … no have “y” but lol … who cares … anyway.(my English are horrible… i told u):RocknRoll::RocknRoll::RocknRoll:

Sometimes the baking works pretty well. Need a image texture linked in material.(then bump).
you-tube.
tutorial01
tutorial02
U can control the shadow of bump and “groove,slit,furrow,etc.” more realism on texture.
But maybe next time i will try the nodes, at now i no have time.
Cheers and good luck.:yes:

Ah it should be interesting to be learnt. Maybe if you don’t mind, please show me how to control the shadow and that ‘groove, slit, furrow, etc’ whenever you have time.

Thank you wolfgann!

Oh man, I’m sorry. I was hoping to see constant feed thing going on because this is something I’m struggling with myself, and I guess I saw what I wanted to see :slight_smile: I tested the blend, and saw a typical fault - assuming a “Z radial brushing” (like a typical stainless steel household cooking pot), it completely fails when Z gets flat due to no variation in noise on axis that drives the look. Replace object with a cylinder which has a flat top, and you’ll see what I mean.

A great procedural noise for this application seems very hard to me, as Blender can’t repeat the noise (afaik) seamlessly, and it lacks “disk mapping” which needs to handle the flat Z plane. I have come up with a solution that works on objects that appear to be lathed/turned, with a gradual transition from the “cylindrical parts” to the “flat face parts”, but it is still just noise and not a constant feed illusion (helix and spiral). As I said though, the radial noise is tricky due to no repeat function, and I go around this by mixing normal noise and reversed noise, and in some cases you can spot this mirroring effect. Also, for a constant feed effect I would have to use wave rather than noise, but that looks absolutely horrendous giving extreme moire every time I’ve tried it.

In the example node setup below, my goal isn’t to produce the most realistic stainless steel, but to be able to create typical random brushing effects that works cylindrically as well as radially without any UV unwrapping. The Util.CustomMapping node is required only for constant feed attempts and can be replaced with a normal mapping node. Math used in Cartesian to Polar (which in turn uses atan2) can be found here.

Ok, so here is the basic idea:



Produces effects like this:


It handles lathed/turned objects just fine apparently, somewhat fails with a rounded cube (which would be ridiculous to lathe anyway :D), and obviously it serves no purpose for objects like suzanne. Even the teapot would have to be unwrapped to get the aniso and brushing direction correctly with the bent filler tube.

I may be posting a blend of this someday to the Blender Tests forum once I get the project file cleaned up for everything else that I don’t want to share.

Why i don’t understand anything about that arctan2? Maybe just need some newbie-friendly translation.
Ah the method by using wave texture looks promising! I’ll try it whenever i have time :smiley: i’ve got a freelance job today.
Thanks Carl!

Arctan2 differentiates between quadrants whereas Arctan have two angles producing the same output. In this case, it allows mapping the perimeter of a circle from 0@0° to 1@360° (kinda like this).

I’ve cleaned up a sharable file without any node groups I consider too buggy to share. It should come with the HDR I use if I did things correctly, and should look something like this (except tilted and fixed a missing abs() bug causing weirdness with power<2:



Image shows a couple of outputs generated by the pattern (no unwrap required, and should be seamless), and a variation of each when used in a quick anisotropic metal. You can find the blend here:
http://www.pasteall.org/blend/36764

Edit: Btw, the “mirroring effect” is not the actual mirroring, it’s just normal moire going on. To see the effect of how the mirroring works, zoom in (in Blender, not visible in image) on the top “knob thingy”. The mirroring is what makes it seamless, and the mirroring is why I needed the atan2 function.

interesting

can you show the basic math done with nodes set up
might help to understand it !

thanks
happy nl

Which part? It’s basically just a mathematical approach to converting cartesian coordinates into polar coordinates. Another post I just found which does something similar, except in a much simpler way (using radial and spherical gradient texture) you can see here (download and see material used in layer 4). Although I missed this approach completely, I would much rather have NOT had to learn about how to compute atan2 and polar stuff manually, and just have the damned things available as selections within some nodes (math node for atan2, maybe vector transform for various useful coordinate transformations?).

I’ll see if I can simplify to using the gradients instead.

well you could I think write up a custom nodes
with access to all the math from python
which might it easier to do it !

thanks
happy bl

I don’t believe they would be GPU compatible, and I don’t want to learn to code :). Anyway, I made a thanks to Solvent (some other stuff in there I have to check out as well) and updated the setup in this post. Although I still use the radius calculation (buggy?, his sphere approach doesn’t work at all anyway, obviously really), the angle turned out to be ridiculously easy to get using gradient node set to radial. No more arctan2 stuff required, and I put everything into the same group.

Thanks Carl! I’m learning your blend file now.

Okay, so this is the second material that I’ve made.



I think I can improve the fresnel part. But, I have no idea how to improve that. I feel that the material is not sexy enough to be applied on cars.
The blend file is still at the same URL.

I still can’t figure out what’s inside those node groups :no:. Can you explain it? Or maybe is there any simpler node setup to explain effects of each node setups?

Depends which kind of look you’re going for :slight_smile: If metallic, then just download pretty much anything with metallic in the name and check out how they do it. No need to attempt speckles yet if just learning. Basic idea is darker diffuse/glossy edges for the main material using facing, and a fresnel/fake fresnel gloss to mix in the coat.

Util.PolarCartesian: Just basic transformation between cartesian and polar coordinates. Mapping a checker pattern on a plane will normally get a rectangular checker pattern. Going through polar transformation will give you a radial pattern instead (x becomes radius and y becomes angle around perimeter, I keep z unchanged because I need it that way rather than going 3D with it).

Util.CustomMappingNode: Pretty much same as a normal mapping node, but has inputs so you can control it with maths (i.e. increase x scale along y axis or whatever). But it’s not used here for anything useful and can be replaced with a normal mapping node.

Util.Math.Linear: Very simple multiply and add node. Use it all the time when controlling an already scaled/normalized output. I would normally use a LERP (custom node) to easily set min and max values, but this one is less complicated and thus faster. Don’t think LERP was included here.

PBS.Anisotropic: Wasn’t supposed to be there, not happy with it yet. Should use a normal anisotropic shader instead.

The atan2 node setup I had doesn’t work. It will appear to work until you do some special stuff with it, then it will fail miserably and cause “white and blocky noise lines” as the divisor closes in on zero (at least I’m guessing that’s why). Using the radial gradient texture doesn’t produce this failure.

Also, in my attempts to do a constant/machine feed look, using spirals instead of just noise as bumps, I had much more success using a custom math node group (triangle wave, basically, to simulate the lathe tool shape) rather than using the waves texture. I have no idea what is going on in there, but it messes up badly in some circumstances. Not talking about moire, because I get that regardless.

If you don’t know what some things do, make sure you have node wrangler enabled and ctrl+shift click nodes to preview output (doesn’t work inside groups, but you can always ungroup). The x^2.2 is just so I can measure correct values on a rendered screen of the preview (so that expected value 0.5 actually reads out 0.5 rather than 0.73. Should not be used on colors.

Here is a lathed version. As I said earlier, moire patterns will easily emerge (which is why noise is often preferred as a substitute, but for procedural versions then require a mirroring to make it “seamless” and I generally don’t think noise looks more realistic). Of course you can also use it to create other interesting spiraling patterns by itself or in combination, without the need for any unwrapping.

Blend here. Only a test object and material this time, no excess unused node groups or fancy stuff.