Page 1 of 1

Show materials in viewport

Posted: Sat May 10, 2014 10:14 am
by Ibon_83
Hi Octane forum friends. First of all, I apologize if this question has been asked before.

My question is: Is there any way to show all materials in viewport (textures and/or colors) after octane material conversion?

I use to apply V-ray materials to my geometry, and when i want to make a render with Octane, after material conversion everything becomes white. I have to go to all materials one by one and activate "Show shaded material in viewport", and i was wondering if there's an easier way to do it.

I have tried with material editor's menu (Material --> Show Materials in viewport as --> Shaded materials with maps) but it doesn't work, everything stays white. Btw, i'm using 3DsMax 2014

Thanks in advance for your help!

Re: Show materials in viewport

Posted: Sat May 10, 2014 2:15 pm
by akira
run the attached maxscript in max :)

Code: Select all

-- show texture map in viewport for all octane diffuse and glossy materials
-- supports viewport display of RGB Image, Alpha Image and Greyscale Image
fn get_texture_map tex_map= 
(
	if classof tex_map == RGB_Image or classof tex_map == Alpha_Image or classof tex_map == Greyscale_Image then
	(
		return tex_map
	)
	else if classof tex_map == Multiply_Texture or classof tex_map == Mix_Texture then
	(
		if tex_map.texture1_tex != undefined then return get_texture_map tex_map.texture1_tex
			else if tex_map.texture2_tex != undefined then return get_texture_map tex_map.texture2_tex
		
	)
	return undefined
)

for ii in SceneMaterials do 
(
	if classof ii == Diffuse_Material or classof ii == Glossy_Material then
	(
		if ii.diffuse_tex != undefined then 
		(
			jj = get_texture_map ii.diffuse_tex
			if jj != undefined then showtexturemap ii jj on
		)
	)
)
also you can disable texture showing by changing the "on" to "off"

Re: Show materials in viewport

Posted: Sat May 10, 2014 6:54 pm
by BKEicholtz
This is very helpful, thank you. I did not know this was possible.

Re: Show materials in viewport

Posted: Sun May 11, 2014 2:25 am
by HHbomb
Thanks a lot.
Hope otoy give us more access to Scripting !

Re: Show materials in viewport

Posted: Sun May 11, 2014 4:28 pm
by coilbook
i have same problem with Mix materials they are all pure black in 3ds max viewport because octane does not have an option yet. I hope they will add a button

Re: Show materials in viewport

Posted: Sun May 11, 2014 6:39 pm
by acc24ex
nice one..

Re: Show materials in viewport

Posted: Wed May 28, 2014 3:59 pm
by Ibon_83
Many many thanks my Akira!!!