Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How can I export material IDs of Object as an IDmap?

How can I export material IDs of Object as an IDmap?

BenediZ
Collaborator Collaborator
3,055 Views
5 Replies
Message 1 of 6

How can I export material IDs of Object as an IDmap?

BenediZ
Collaborator
Collaborator

Hello,

I have an Object with a MultiSubobject-Material and I want to get the Material-IDs rendered as an ID map.

When I assign a red and a green material, and using "Render To Texture" to Render this into an ID map,

then I'm getting a warning, that there is no diffuse (of course) and then 3dsMax crashes.

 

(I'm trying to export an asset to Maya, where no material IDs exist. So I need at least a material ID map, in order to get the material assignment selections.)

 

Thanks for help or workflow ideas...

 

how can I render this into a texture map?how can I render this into a texture map?

0 Likes
3,056 Views
5 Replies
Replies (5)
Message 2 of 6

RobH2
Advisor
Advisor

Set the IDs for the polys on your object and unwrap it. You can unwrap using 'UVW Unwrap' and open the Editor. In the 'Explode' panel, use 'Flatten by Material ID.' 

 

Then, go to the 'Render' menu and open 'Bake to Texture.' Select 'Material ID' and click 'Add Maps to Selected Objects' a the bottom left of that window. Now on the right in the 'Objects / Maps' window, you'll have the name of your object with 'Material ID' as a sub-item. 

 

But, 'Baked' will now be disabled and grayed out since you are using V-Ray. If you roll over the 'Material ID' listed you'll see it says, "Map is not supported for baking: The Map Type is not supported in the active renderer." Just switch the renderer to 'Arnold' and 'Bake' will be active. Click it and render your ID map. 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
Message 3 of 6

BenediZ
Collaborator
Collaborator
Thanks for the detailed explanation!
The only thing I don‘t understand is:
why Unwrap when the object has already a UV layout - won’t unwrapping destroy them? But maybe in 3dsMax „Unwrapping“ means only opening the UV editor in order to have a look at the existing UVs..
I will test it...
0 Likes
Message 4 of 6

BenediZ
Collaborator
Collaborator

I have tried, and there is no "Material ID"

- I have done "Flatten by Material ID", but in "Bake To Texture" nothing shows up like "Material ID"

please see screenshots

(Also in "Render to texture" wasn't any ID map available)

 

And "Flatten by Material ID" creates a new UVlayout, which means then that I couldn't use existing maps, right?

(BUt maybe I could export this as a second UVset, which will be only used to get the ID assignments transferred as color ID)

 

Thanks for looking!

Edit UVWs Flatten by Material ID.jpgBake To Texture.jpg

0 Likes
Message 5 of 6

RobH2
Advisor
Advisor

What version of Max are you using?


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 6 of 6

RobH2
Advisor
Advisor

It will always benefit you when asking for help on the forum if you are a little specific as to what you have and what you want to do. It helps to know what version of Max you are using and what version of the Renderer as well. If you don't mention that, then don't be surprised if the answers are "too general" or don't satisfy the parameters you need. 

 

It appears you may be using something older than Max 2021, say Max 2020? If so, the baking options are different. I attached a capture of a setup that should work for you with UVs already assigned that you don't want messed up. I created a cube, each face with a different ID. I then unwrapped it in an unusual way so I could tell if it got changed or not. I then assigned my MultiMat to it. Using the settings in the image I attached, you can see I achieved a Material ID map that does the job. I switched my renderer to Arnold temporarily for this and used default Scanline materials for the ID map. You might be able to do it and stay within the VRay renderer but I had trouble once trying that and was able to easily do it with Arnold, so that's how I've done it since. 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes