Scene converter - physical material to standard material

Scene converter - physical material to standard material

onsterion
Participant Participant
29,787 Views
14 Replies
Message 1 of 15

Scene converter - physical material to standard material

onsterion
Participant
Participant

Hi all,

 


Can use Scene converter to convert physical materials to standard materials? In case of yes, any idea how can i do this? or any have the ConversionScript for this?

 

 

 


Greetings.-

0 Likes
Accepted solutions (1)
29,788 Views
14 Replies
Replies (14)
Message 2 of 15

Anonymous
Not applicable

Hi

 

with Shader Utilities can you convert from Physical Material -> Arch&Design. After need you a converter from Arch&Design -> Strandard. That do many other convertes.

 

Infinity Vision Shader & Tools: http://forums.autodesk.com/t5/3ds-max-forum/update-infinity-vision-shader-amp-tools/td-p/6606766

 

mfg

hot chip

Message 3 of 15

onsterion
Participant
Participant
Mmmm too tricky 😞
0 Likes
Message 4 of 15

Alfred.DeFlaminis
Alumni
Alumni
Accepted solution

Hello @onsterion,

 

@Anonymous has a pretty good suggestion, but you may be able to find something simpler on various 3rd party script sites/spots.  The Scene Converter currently doesn't go from Physical to Standard materials.  You can find more information about it here.  

 

Best Regards,

0 Likes
Message 5 of 15

bksong
Enthusiast
Enthusiast

@Alfred.DeFlaminis Sorry replying to such an old post but is there any method of converting physical to standard? I opened an old 2017 max scene in Max2018 and mistakenly clicked "convert scene" and saved.

 

My workflow for that scene requires all the materials I've used to be standard. Also, I noticed all the standard materials I use disappear whenever I reopen the scene.

0 Likes
Message 6 of 15

SolidSupportCAD
Enthusiast
Enthusiast

Autodesk removed the capabolity to import as Standard (Legacy) so now we have to use 2016 versions. ALso, Autodesl removed the capabolity top download the 2016 version WELL DONE!!!!

Message 7 of 15

SolidSupportCAD
Enthusiast
Enthusiast

Well done Autodesk!
you remove the option to convert to legacy, then, you remove the download option for the only version that works with legacy. Well spent 4000 dollars ever.

Message 8 of 15

torquemod
Advocate
Advocate

It only takes a couple of seconds to convert a physical material to a standard material:

0 Likes
Message 9 of 15

SolidSupportCAD
Enthusiast
Enthusiast

yeah, I get that amigo.
But.. I have 3000 materials to change and map out. 
at a 3d modeller rate hahaha

0 Likes
Message 10 of 15

torquemod
Advocate
Advocate

Oh wow. Maybe it's because I'm a game designer, but I've never had a scene in max use more than a few dozen materials. I can definitely imagine you'd want an automated way to do it then rather than spending a whole day converting. Sorry I couldn't help more. Good luck!

 

Message 11 of 15

kirilkalinoff
Explorer
Explorer

I couldnt find a script that did this so I made one

I am not really good with MaxScript so its janky AF but it works.

To use it:

  1. Open a new script (Top tool bar -> Scripting - New Script)
  2. Paste the code into the blanc script
  3. Select all the objects you want to have their materials converted.
  4. On the script window click Tools - Evaluate All

 

theObjs = selection as array
doneOjects = 0

for obj in theObjs do
(
	select obj
	mat = $.material	--Get the material

	if classOf mat == PhysicalMaterial do	--Check if its a Physical Material
	(
		isNew = true
		exisitingMat = undefined
		for m in sceneMaterials do
		(
			if m.name == mat.name + "_standard" do  --Check to see if its already converted
			(
				isNew = false
				obj.material = m
				break
			)				
		)
		
		if isNew == false do 
		(
			
			continue
		)
		
		---------------------------------------------
		--Actual conversion 
		---------------------------------------------
		print ("Converting: "  + mat.name )
		newMaterial = standardMaterial name:"Temp" diffuse:(color 255 255 255)
		
		--Rules:
		newMaterial.diffuse = mat.Base_Color
		newMaterial.diffuseMap = mat.Base_Color_Map
		newMaterial.opacityMap = mat.trans_color_map
	
		--Add additional Rules here if you need them
			
		newMaterial.name = mat.name+ "_standard"
		obj.material = newMaterial
		doneOjects += 1
	)
)

print ("Materials Converted: " + doneOjects as string + "!")

 

 

You can add additional rules but you will have to look you the properties you need in the documentation here

Standard Material 

Physical Material

 

Adding a rule should be easy

Just add a line where :

newMaterial.<the target property>  = mat.<the source property>

 

It's not perfect but I hope it helps at least 

 

 

 

 

Message 12 of 15

LeandroSN
Explorer
Explorer

Works perfectly. Thank you!
Used the Update Infinity Vision Shader & Tools! and then Architecture to Standard Material Converter(by Smallpoly) from scriptspot.

0 Likes
Message 13 of 15

butterflybean88
Community Visitor
Community Visitor

hello

0 Likes
Message 14 of 15

kirilkalinoff
Explorer
Explorer

Note: I just noticed that it works on objects directly only. If your objects are in a group it will miss them. Otherwise, if anyone has found a better, more robust solutions, please share it. 

0 Likes
Message 15 of 15

Polygonfabrik
Observer
Observer

Unfortunately this doesnt work with MultiMaterials 😞
Great Script though!

0 Likes