preserve max material ids in vray proxy

Hi, we are using assets from kitbash3d.com they all have one big multisub material in maya and max. But when we export vrayproxy prom maya all material ids ale messed up (abc export doesnt do that). Its because Max_MaterialID extra attribute doest not reflect in vray proxy. How to fix that? Thanks

Hi, could you give us a bit more details about your workflow? If you export a VRayMesh from 3ds max and then load it in a new scene it will have no materials with it. You will have to for example save your material in a material library and then load it in the new scene. This way the ids are not scrambled.

Nono I dont mean materials but material IDs. I dont know if you are familiar with kitbash3d models, but they have version of their kits for max and maya also. We are cooperating with a studio working in maya and they are exporting theirs scene layouts as vray proxies. But that export mishmashed material ids of that kitbash models, thus we cant apply multisub material providet with max version of that kitbash. If you dont use vray proxy but alembic everything works fine because alembic preserve Max_MaterialID attribute from maya. Because maya doesnt have any material ids when exporting vray proxy from maya ids are assigned in alphabetical order of faceset names.


Proxies *do* preserve materials IDs.
Something broke in your I-O process, or you’re looking for a specific property (Max_materialID_xx) which isn’t the Id, but some arbitrary ABC stuff.
Would you be so kind to share (privately so) one source file, and the exported proxy of that?

You dont get me right. Imagine you have 10 asstest all sharing one big multisub material with 20 ids, but (this is important) not all assets use all these ids. If you export one of these assets (using for example 5 ids from that big material) from maya as vray proxy you get in max ids from 1 to 5 but ogirinaly it should be 1,6,12,15,20. this means you original big multisub material will not work anymore. And that is because maya doesnt have ids but shading groups. So how to solve this?

in shortcut
1) now its not possible to share vray proxies across max and maya because ids mismatch?
2) how to tell maya which shading group have which id

edit:here is example file
proxy_ids.zip (123 KB)

From Max, it’s optional to condense the IDs.
See attached screenshot: top mesh is a poly, bottom is a proxy.
Condense multimat IDs is “off”.
The material has IDs 1, 10 and 17 as green hues, any other in between is red.

Eh, we cross-posted, and i hadn’t read your latest.
Let me try and i’ll get back to you.

EDIT: indeed, in Maya it *always* condenses IDs.
So your second mesh gets IDs 1-5, one per material.
I suppose it could be an improvement to make to proxy export (adding a faceset ID property, and save that instead.).

Now we understand :slight_smile: But there must be something because if you use alembic everything works. I see this as major issue :frowning:

Alembic exports its own stuff.
As said, the info is all there, it’s a small change to be made, i assume, given it works fine in Max, and IDs are written verbatim to vray proxies.

And what can I do now? except of waiting for someone to fix it in proxy exporter :slight_smile:

Use ABC, as you said it works?

Its slower than vrmesh no? we have a looooooot of assets

You can roundtrip: IDs are preserved from Max.
Edit: of course it’d be useful to be able to script the process. But then, that’s always the case when one has *many* of anything. :slight_smile:

so it will be loged as a bug or should I sent this as support ticket?

Hey there,

It seems this is a bug on our end, we don’t have the option from V-Ray for 3ds max so exporting from Maya always condenses the IDs (and re-arranges them).
I’ll add this to our bug-tracker.

In the meantime - using VRayScene instead could be an alternative. You could give it a try.

True its kind of maya stuff. There should be possible to set some vray attribute for each shading group. Thanks