VraySwitchMtl display in viewport

Hi,

I want to use the VraySwitch material to switch between different materials. However I can’t get the viewport to display the currently selected material.

If the material just has a diffuse colour and no map it just displays as black.

If one of the materials has a bitmap texture I can get it to display by clicking the ‘display in viewport’ button, It only displays on about half of the polys of the object. Then the object always displays this bitmap no matter what I set the switch value to.

Even more annoyingly if I remove the bitmap from the material it still displays in the viewport and I can’t change it.

Everything renders how I would expect, I just can’t see the materials in the viewport at all

I really want to be able to see the materials in the viewport, at the moment it’s a bit hit or miss as I can’t see what I’m doing.

--Garry

Do you have the display in viewport option on?

Yep makes no difference, I can however flush the used bitmap out of the display by toggling the display in viewport a couple of times. but it just returns to black.

It’s very easy to reproduce, create a VraySwitchMtl set material 0 to a Vray material, change the diffuse to Red, make material 1 a Vray material with a yellow diffuse. Apply it to an object and it’ll display as black no matter what the switch value is. Then change one of the materials diffuse to a bitmap image, display it in the viewport and it’ll get ‘stuck’

Thanks for the pointer, will make a note to look into this.

Best regards,
Vlado

Hello, Garry!

I logged the request for proper viewport shading of VRaySwitchMtl in respect to its switch value in our bug tracking system. It’s not right to have it in black when no map is used too.

About the show shaded material in viewport option, it can get dubious in certan situations. For example, when using Standard viewport shading quality, if a complex material is set in one sample slot of Compact material editor, and its sub materials are placed in other sample slots, you can enable the show shaded material in viewport option from a sub material sample slot but when you want to disable it you have to do it from the main complex material sample slot, by browsing down to its exact sub-material. Else your efforts to disable it will have no effect. This is observed not only with V-Ray items but also with Scanline renderer using Double sided material and Standard sub materials. So it’s a 3ds max thing.

This partial polys display case I can’t reproduce so far but it will help us in the development process if we can check it too. It will be great if you can send me a simplified scene that demonstrates it - margarita.stoeva@chaosgroup.com

Best regards,
Margarita

Hi Margarita,

Thanks for the pointers I’ll bear them in mind.

Strangely I can’t seem to reproduce the problem I had with only displaying on some polys, maybe switching it off and on again fixed it :slight_smile:

I’ve been using the Max Shell Material to switch materials, it works really well and enables the materials to be displayed in the viewport. But I could really use more than 2 materials, the VRay switcher material sounds perfect but I’d need to see the diffuse colour in the viewport for it to be of any use.

Thanks
Garry

Hello,

I also have this annoying black viewport problem with Vray Switch material. Regardless of what material is nested (simple color shader/shader with texture/shader with procedural map), viewport model stays always black.

at the same time I have some questions about UI and functionality of Vray Switch material:

- material input list begins with 0 in switcher itself, but in the same time we see “material 1” name in switcher main UI. This is very confusing, because 0 is not 0, but 1 and so on…
- there is no visible text hint in main UI of the switcher which tells you what of the nested material is currently selected. It increases this confusion (0 is 1) even more.
- we are limited with 0-9 (10 materials) not more, not less. I can not simply input desired count of nested materials. In many situations I need more…How can I avoid this limitation?

tested with:
3ds max 2019 SP3.7 + vray 4.30.02 build 00001
3ds max 2022.3 + vray 5.20.24 build 31416

Please, look at the attachments


It’s not yet supported. We already have an improvement request logged (internal bug-tracker id: VMAX-8181) for VRaySwitchMtl’s viewport support. I’ll bump its priority.

The zero material actually corresponds to values from 0 to 0.499. Check the docs.

This sounds like a swell idea, though it won’t be useful when using a map for a switch.

I guess you can plug a second VRaySwitchMtl to the original, though that may be a bit tedious to control.

Hello.

I see that we got Switch mat update in v6.1. Now we have correct numbers there.
Nice, but same time very sad that we did not got the flexibility to choose amount of nested shaders for it. :frowning:

We have an improvement request logged (internal bug-tracker id: VMAX-11384) for a custom amount of VRaySwitchMtl materials. I’ll add your request to it.