Material id mismatching, like it's 0 based?

Hello guys,
I’m using Genome to switch material ids and I get results which are mismatching with the material editor - value 0 assigns material id 1, 1 is assigning 2 and so on, as if it’s 0 based instead of 1.

Scene file:

dropbox.com/s/nou3gr1asc8si … assign.max

This is As Designed. Under the hood, Max is 0-based. That channel is actually stored as 0-based in Max. We also wanted to keep it in sync with Krakatoa Magma, because if you ask PFlow, it will also have the material index as 0-based. Frost works the same, and it is documented and shown in tutorials. XMesh stores is as 0-based… Only MAXScript and the Max UI use 1-based to help the user, but in the SDK, it is 0-based, and we stick to that.

You will have to account for that in your Genome flows by adding/removing 1 as needed.

Cool, thanks!

I just tested using a DataOperator to copy the Material Index of a PFlow with a Material Standard set to assign ID 1 into the Script Integer channel. Then I used Display Script to show the content of that channel - it was 0 everywhere :slight_smile:

Solid point :slight_smile: