Notifications
Clear all

[Closed] Remove raytrace all materials 3ds max

Hello

I am looking for a 3ds max script (R.7) which allows me to remove Raytrace maps from the reflection slot of all materials in a scene. I’m trying to convert a Vray scene to scanline. I have succeeded in converting to scanline using another plugin. Unfortunately, all the materials which had a VrayMap in the reflection slot now have a Raytrace map. As a result the scene is impossible to render because there are two many raytrace surfaces.

I therefore need a script which removes all instances of Raytrace from the materials in a scene.

Alternatively, i need a script which converts Vray materials to scanline, and which replaces the “vraymap” in the reflection slot with “none”.

Can anyone advise – or is anyone available to create this script for me ? I’m willing to pay to have this done.

many thanks

1 Reply

Here is a script that removes the map in the reflection slot of all scene materials:

macroScript NoReflectionMap category:"YPuech"
 (
 	fn ProcessStandardMaterial mtl =
 	(	
 		mtl.reflectionMap = undefined
 		mtl.reflectionMapEnable = false
 	)
 	
 	on Execute do
 	(
 		for mtl in sceneMaterials do
 		(
 			if ClassOf mtl == multiMaterial then
 			(
 				for subMtl in mtl.materialList do
 				(
 					ProcessStandardMaterial subMtl
 				)
 			)
 			else if ClassOf mtl == standardMaterial then
 			(
 				ProcessStandardMaterial mtl
 			)
 		)
 	)
 )

Tell me if this script does the job as expected.