Switch maps, texture stays

Hi all im not very skilled in maxscript (in not skilled at maxscript at all actually :-) )
i have a vraynormal map type in standard materials (or vraymtl it the same for my situation) bumps slot.

This VrayNormal map type has in it normal jpg texture. I have around 39 objects each with different jpg textures.

I need to swap automatically the VrayNormal map type for Normal map type (which si common to default max materials) but with the issue that all the jpg textures must stay in their places, just replace the the Vraynormal map type with the Normal map type and keep the texture as a submap.

Can anyone help me please?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
roamn's picture

thanks

thanks, ill definitelly try it :-).

JokerMartini's picture

This batch map switches for

This batch map switches for materials are so useful.
This script as well as many others is one worth keeping need your side as you'll find yourself modifying it and using it quite often.

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

barigazy's picture

*.ms

or use below code as *.ms

AttachmentSize
vraynormalmapconvertor.ms 1.04 KB

barigazy

barigazy's picture

VRay Normal Map Convertor

Tray this

try(destroydialog ::vrnRoll) catch() 
rollout vrnRoll " VrayNormalMap Convertor" width:168 height:30
(
	fn filterNMap obj = 
	(
		isKindOf obj.material VRayMtl and \
		isKindOf obj.material.texmap_bump VRayNormalMap and \
		isKindOf obj.material.texmap_bump.normal_map Bitmaptex and \
		obj.material.texmap_bump.normal_map.filename != undefined
	)	
	button btn "VrayNormalMap to NormalMap"
	on btn pressed do
	(
		if (getClassInstances VRayNormalMap).count != 0 do
		(
			local objMtlsArr = for g in geometry where filterNMap g collect g.material
			if objMtlsArr.count != 0 do
			(
				for m in objMtlsArr do
				(
					local NMap = Normal_Bump name:(m.texmap_bump.name) normal_map:(m.texmap_bump.normal_map)
					m.texmap_bump = NMap
				)
				free objMtlsArr				
			)
		)
	)	
)
createDialog vrnRoll style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)	

barigazy

mustafa mamdouh's picture

We need the reverse of this process (from max to vray) ..

Hi barigazy!

Thanks so much for your help! .. really appreciated ..
Actually we need the reverse of this process cause we have a kind of problems from 3ds Max Normal Bump and we need to convert each Normal bump to VRayNormal Map ..
I think in this we will lose the "additional bump" slot on Normal bump but that's not important for us ..

Regards,
Musafa

thanks to scriptspot community

barigazy's picture

...

I posted script here
http://www.scriptspot.com/3ds-max/scripts/convert-normal-maps

barigazy

zahidhasan's picture

thanks. very neat script.it

thanks. very neat script.it will come handy.

barigazy's picture

Thanks guys for the comments

Thanks guys for the comments

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.