Community
3ds Max Modeling
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max modeling topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to create a hammered metal texture

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
jacob5A656
5868 Views, 7 Replies

Trying to create a hammered metal texture

Hello,

 

I am trying to recreate a very specific hammered metal texture shown below. 

example hammered texture.png

 

I'm using Max 2021 with VRay Next and I've found that UberNoise set to Worley Classic gets the closest, but still isn't quite there.  The main issue I'm having is that the edges of the voronoi cells are very angular, as opposed to the softer, round dents created by the hammer.  This is what I have so far:

hammer marks using ubernoise worley.png

 

I've tried reducing the Worley Power as well as the Output within the map itself but that only effects the depth of the cells relative to the main geometry, not the shape/size of the cell walls relative to the cells themselves.

 

I know that in Blender you can can use a gradient ramp attached to the map's height node to "shave off" the top of the texture.  I've seen various Max tutorials that get close to this, but every one has the ramp applied to the geometry itself which won't work in this case as I need a stand-alone material that can be applied to various models.

 

I feel like I might get close if I used a distance modifier, but this again seems like it will only work for one model at a time since it's dependent on a separate "object" to make it.  

 

Does anyone have any ideas?  If anyone knows how to further adjust ubernoise, cellular noise, or any other procedural texture, I would really appreciate the help!

 

Thanks,

Jacob

Labels (3)
7 REPLIES 7
Message 2 of 8
brentscannell
in reply to: jacob5A656

@madsd surely some OSL witchcraft can save the day here?

Message 3 of 8
madsd
in reply to: jacob5A656

Attached a shader that you have to parse the Uber Voronoi through, the In slot.

I defaulted the clipping to 0.67, there are 2 entries in the UI, try and play with them.

We basically just tell the output to filter anything above a certain value to a constant value and we drive the intersection point with a float value to create the plateau.

 

Plugged to displacement here to visualize.

Take the downloaded shader code and put it into a clean OSL node and push F7 to compile it.

If you want it to be part of your system and max startup? Save an osl file out from the max OSL code window into maxversion/Plugins/OSL/ ---> restart app, and find it in the main category ( with whatever name you picked when saving it )


 

qweqwe.png

shader HammeredMetalController
(
	// Actual clip controllers
	float ClipMeasure = 0.67,
	float Clip = 0.67,
	float In = 0,
	output float Float = 0,
)
	
{
	// Our clip control injection
	Float = In;
	Float>ClipMeasure?Float=Float:Float=Clip;
}
Message 4 of 8
madsd
in reply to: jacob5A656

Slightly modified version, using just 1 value, since we kinda need them to be identical, but you can make some interesting effects with them separated, but in your case it makes more sense to just collapse to 1 float.


xxxxx.gif

 

shader HammeredMetalController
(
	// Actual clip controllers
	
	float Clip = 0.67,
	float In = 0,
	output float Float = 0,
)
	
{
	// Our clip control injection
	Float = In;
	Float>Clip?Float=Float:Float=Clip;
}
Message 5 of 8
jacob5A656
in reply to: madsd

@madsd This is exactly what I'm looking for, thank you so much!

 

Quick question- my texture kept showing up inverted, even after swapping the Output color A & B and messing with a handful of settings between the Ubernoise, your OSL map, and the VRayDisplacementMod.  I ended up running it through an Output Map with the output inverted and that did the trick.  Is this an acceptable fix, or is there a more appropriate/efficient method?

 

Thank you again for your help on this!

Message 6 of 8
madsd
in reply to: jacob5A656

I would avoid the legacy Output map and invert the signal in the OSL node.

But that is just me, your output node is a blackbox c++ shader, its better for sanity check to keep everything OSL, especially if we start to talk about managing assets, shaders and such.

Message 7 of 8
jacob5A656
in reply to: madsd

That makes sense.  I'll try that, thanks!

Message 8 of 8
jacob5A656
in reply to: jacob5A656

Hi @madsd ,

 

I'm getting some nice results with your solution, but I realized that it only solves half of the problem.  While the tool does a great job of clipping the top of the geometry, it doesn't effect the space between the cells that are touching each other, which leaves a very thin, almost sharp looking cell wall.  In the image below, you can see that the shape of the cells is getting closer, but that super-thin cell wall is keeping it from looking like the material has any substance.

 

hammer marks comparison.png

Do you know of any way to control the spread between the cells?  Perhaps a minimum width or something to that effect?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report