Material Override Exclude

Thanks Dave.

Although it seems a good workaround, I would still prefer to have this build in to Vray, it would make it easier to manage, and eventually more robust on long term as it’s been handled on Vray side.
We use a lot RPManager and having a global switch with over-ride diffuse color would be way easier than working with some scripts, specially when we are few people working on the job or coming back 6 month later on to it to append changes.

Vlado, did you had a chance to think about my thought on reply #17?

Cheers
Stan

This problem with scripts in general is something which I’m actually trying to solve at the moment, using scripts in production is effectively a destructive process in a linear pipeline. What scripts did someone use in a project, what settings did those scripts use? These are really common problems that we face far too often.

I’ve got ideas, I’m going to talking about some of these ideas at the EUE event next week, going to be interesting to see what Autodesk’s and reaction to it is, it’s really forward thinking (in my opinion).

Chaos group? Any intention of adding an override material “exclude refractive materials” switch?

This would be SO useful for me right now.

I’m currently trying to render out vray environment fog, which is best done by switching everything in the scene to pure black - the only problem is that this blocks any lights that are within light fittings (so all of them in my scene) - and the problem is that the override exclude is useless because the light fittings are in a file that is referenced in :frowning:

I needed to render out a clay test animation recently to check the camera path where this would have been extremely useful.

Yes, we know about this limitation and improving the override material feature with new options is something that we will try to implement for the next releases.

As I mentioned earlier, I think the best way to implement this feature is to simple over-ride the diffuse color, as this would keep all the rest of the scene intact (bump, reflection, refraction, displace, etc)
This would be the best way IMO to get the most details and keep the consistency of the scene and still give this look and feel we are after.

Stan

That would be ideal!

+1
great idea

That would only work for FULLY relfective or refractive materials.
Semi-reflective and refractive materials would change appearance quite dramatically (and potentially also light distribution).
See the attached screenshots: From left to right, refractive with black diffuse, refractive with white diffuse, reflective with black diffuse and reflective with white diffuse. Direct lighting only, and with GI (notice the GI caustic under the second sphere from the left.).
It’s a bit more complicated than just overriding diffuse color.

Nothing, however, stops you from using max scene states to do a more precise replacement of the components you want, material by material, so that the result is what you want, to then return back to your production settings in one click.
Laborious, sure, but accurate.
I doubt both the ease of use of a global override and the minutiae of how each and every person would want the scene to look to test this, that or the other in a quicker way will ever be able to go hand in hand (try and imagine the can of worms it’d get in no time. trying to cater for all the possible permutations), but that’s just my opinion, ofc.
There are, luckily for us all, much smarter people than I at work on VRay.


Hi Lele, I get what you mean, and we will always get a different look with a over ride than what we are supposed to get with the actual diffuse, even if it’s only the diffuse, but it’s already way better than if you had no displace/bump/reflect/refract at all…

Here is a quick example:

normal Over-ride / diffuse over-ride / normal render

For me, the diffuse over-ride preserve and make way more sense then the normal over ride.
With you example, you would just end up with 4 sphere with noting going on.
I understand that the visual difference will be really high than your actual render, but still less than if you had no displace/bump/reflect/refract at all.
For archviz for example, where you have glass that is 99% of the time full refractive, this would be a big game changer, and for your 3 vases that are not fully refractive, well yes, then you have a slight refractive difference for 3% of your image.

But hey, then, what about a material that you could pipe in the over-ride material but with options?
That would let you create a sort of custom over ride material for your scene, without cluttering the general render tab settings.

Something like :
Diffuse over-ride : x
reflective over ride (less than 0-25%) : X
reflective over ride (less than 25-50%) : X
reflective over ride (less than 50-75%) : X
reflective over ride (less than 75-100%) : X

refractive over ride (less than 0-25%) : X
refractive over ride (less than 25-50%) : X
refractive over ride (less than 50-75%) : X
refractive over ride (less than 75-100%) : X

you can go even further :
you have 1 reflective and refractive over ride enable from 0-100%, but you can check a second one and let you slide the first one from 0% to 12% and the second one from 13% to 100%. Or even more like 3-4 without going crazy like the VrayBlendMtl.
This would let you pipe in some colors for the over ride based on the % of reflective and refractive material. That would give you a much smaller percentage of mistake.
Other options could be added like bump and displace

That being said, no matter what we do, the look and feel will always look different, sometimes slightly, sometimes more drastically but it will still look way closer than the current over ride.
Stan



As soon as you have materials which have multi-subs or VrayBlend materials, SSS etc anything like this starts to get complicated.

I started looking at a Node-based approach for creating material override rules, it gets pretty dirty quite quickly. Really powerful but you need to understand the class system for it to work. Never got beyond the concept stage but it could do some very clever things if I finished it.

I really think you guys should just look at my script solution, it works well. I know there’s a few small issues, keep bugging me and I’ll find a moment to fix them, I think it’s mainly just ForestPro and their weird way of dealing with materials.

Save a scene state (materials only) called “Production” or similar.
Run the code here.

(    for m in (getclassinstances vraymtl) do
    (
        m.texmap_diffuse_on=off
        m.diffuse=white
    )
)

save a scene state called “Override”, materials only.

Now you’re free to switch between them.
Of course, it’s quite trivial to change the above code to match whatever it is you want the custom overrider to do.

I hate scene state! It’s bugged, when you import new geo it bugs as well, and in conjunction with RPM, I’m not sure it’s the best idea.
That’s why I like to have it as a global switch or a material, or even a plug that can be used as a map would work as well if that shouldn’t make it in regular Vray or any other way to get this working but coded by Chaos because I’m not trustworthy for Autodesk anymore, specially with the kind of “features” they release that never make the debug and stay haunting 3ds for generations IE : containers. It took like 9 versions of max to get the xrefs stable, and now the groups are unstable in max 2016. Sum up how AD works and you quickly get why in production, we want to rely on Vray :slight_smile:

But anyways, thanks for script, might be useful one day.

Stan