Best way scaling map inside shaders globally?

Hi,

Many times I have this problem: I create a complex shader (let’s say it is containing: VRayTriplarTex, tiled bitmap, procedural noise, VRayCuravature, and VRayDirt). Everything is all set, a perfect material and I save it as 3dsMax scene.

Then new project comes in; I want to reuse my shader. However the scale of new geometry doesn’t fit the shader, I need to readjust it’s UV tiles, Radius of VRayDirt, Scale of VRayCurvature…, etc. to make it same appearance as my old scene. Is there anything like a modifier or something I can scale up (or down) my shader globally? And if I collapse that modifier, it automatically updates all it’s UV tiles, Radius of VRayDirt of my shader.

Rgds,

Chen

Your shaders should be made with real world scale, thus all you do with the new geometry is apply a UV map with real world scale. (After you make sure the new geometry is correctly to scale and reset the xform if you need to rescale it, which seems to happen with some clients files of mine)

Real world scale does not work with 2d displacement however, so keep that in mind.

For 2d textures (no vraydirt, curvature etc) you can use this shader:

For other parameters you could possibly hook up the parameters with a multiplier when you create the shader, so you only need to adjust one parameter instead of many.

tks, will try it out.

looking pretty good tools, thanks for sharing.

It is tedious to hook up those parameters, I wish they make a modifier or utility for this kind task.

I haven’t tried it (kinda racing the clock right now) but isn’t that exactly what the UVWXform modifier is for?

The UVWXform modifier only transforms UVW coordinates, so stuff like VRayDirt size, TriplanarTex scale or EdgeTex radius aren’t affected.

I see. Interested to see if a solution comes up, good to keep in mind in the future.

Nothing all-encompassing that i can think of as a solution.

It is however quite trivial to script an interface to edit a selected object material’s maps, catering for the presence and use of UVs, or the scaling needed for object/world XYZ placement.

The best way would be to make the shader be scale invariant, so drop things like dirt for curvature, where applicable, and so on, and make strong use of correct UV mapping where possible.
Anything explicitly referencing a world size will have to be manually refactored.

Might I suggest http://reformstudios.com/2016/04/21/viewing-materials-in-mission-control/
Not entirely universal, but you can list all the vrayDirt maps in one view, and then apply a multiplier to any of the parameters as desired.

Thank you guys for all the input, I thought ShaderFX might help, but it does not integrate well with Slate editor. So I guess best practice is to keep all my assets in the right scale.

But I hope we have this kind of utility in the future, definitely streamline our workflow.

Found “MapScalar modifier” fix most of my problem

Nice fine, I’d forgotten about this one.

Wow look at that! Never knew Map Scaler existed, thanks!