Page 1 of 2

Different materials exported as same

Posted: Sat Feb 26, 2011 1:36 pm
by Skeletor
Hi,

I have these domino bricks which have 16 different materials assigned to them in Max, but when they are exported to Octane they have the same material making it impossible to assign different textures to them. What am I doing wrong?

Image

Image

Cheers,
Mick

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 1:38 pm
by kilaD
Standard materials?

Have you tried with a multisubmat with 16 ids?

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 2:00 pm
by Skeletor
They're all 16 different standard multi materials. Haven't tried setting all id's for all the bricks, but with 62 bricks that would be rather time consuming :cry:

I don't mind the bricks having the same material for the sides, but front and back faces need to be different. I'm very puzzled why they are all yellow

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 2:20 pm
by kilaD
Do they have unique names?
How many unique maps do you need? 16?

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 2:26 pm
by Skeletor
Yeah they have unique names, and 16 is fine.

They all have the same colour for the first id, but it didn't help when I changed the colour. I also tried to assign a solid red colour to the first brick and then all the bricks had brown front and back faces. Not sure what the logic is behind this!

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 2:33 pm
by kilaD
ok, create one multi/submat with 16 maps, let id 1 be the sides

select all bricks and run this (bricks must be epoly):

Code: Select all

(
maxIDs=16

fr=amax(for i = 1 to selection[1].numfaces collect polyop.getfacearea selection[1] i as integer)
	
	objs=(selection as array)
	for obj in objs do
	(
	polyop.setfacematID obj #all 1
	faces=(for m = 1 to obj.numfaces where ((polyop.getfacearea obj m) as integer)==fr collect m)
	polyop.setfacematID obj faces (random 2 maxIDs)
	) 
)

Did you press "new" or "use existing project" in max2octane?

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 2:49 pm
by Skeletor
The bricks are not just simple boxes, so I think that's why I can't get your script to work. Also id 1 is the top of the bricks. 2,5,6 are also sides, and 3 and 4 are front and back faces.
Image

I make a new one each time just to be sure.

Thanks for your time KilaD - nice support ;)

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 2:58 pm
by Skeletor
I think I just figured out what it is. I tried to delete one of the multi materials and then create a new one and assign the id's as they were before and now that material works.

When I created all the 16 materials I just made one multi material, copied it to the other material slots and then changed the front and back face materials afterwards. Apparently that doesn't work with Octane!

Re: Different materials exported as same

Posted: Sat Feb 26, 2011 3:13 pm
by kilaD
ah i see, they looked like boxes. But it should work if you just chamfer the edges instead of subdividing the whole mesh.

Re: Different materials exported as same

Posted: Tue Mar 01, 2011 5:41 pm
by hadouken
Hi,

I had that same problem last night. I had several multi-sub object materials sharing instanced materials in Max and Octane does NOT like that. What I ended up doing was exploding my meshes by material ID, then attaching meshes by material,then resetting the material IDs back to 1, and then giving each object a uniquely named standard material.It's time consuming and a pain in the butt, but the only way to avoid having materials on everything the same. Also, avoid using instanced materials. Octane DOES seem to respect material instancing so the method above is the only way to go to avoid Octane giving everything the same material AFAIK. Had I built the max scene with this limitation in mind, i would have never used multi sub object IDs in the first place. to compound the boring process, All my materials were Arch and Design so I had to convert them to Standard as well XD. Oh well, know I know.

I guess what I took away from my tests is to give everything a unique name, including both meshes and materials.Also, only use material instancing if you are really sure that each object sharing the material in Octane will always share that material, and each objects are mapped already(since you can't break the scale connection between each object AFAIK)

BTW, does anyone know of a really good material converter from mental ray to standard in max? I couldn't find anything on scriptspot. that would have saved me a lot of time.