Notifications
Clear all

[Closed] UVW Unwrap – Lattice

Hello Guys,

Very simple question… do you know where can I find (if there is any) a script that creates a lattice in UVW Editor to control UV’s ? Something like FFD modifier…

Maybe you also know other useful scripts for the editor.
After switch back from Maya I’ve found MAX’s UVW Editor lacking many features.

I was looking on scriptspot.com but did not find much

Cheers

4 Replies

Hi,

You can use channel info to copy paste UVs into mesh topology, then use any modifiers and then change back:

  1. tools menu channel info…

  2. make a new channel (name it Original Mesh)

  3. copy 1st channel (ID mesh) to this new channel

  4. copy 6th channel (ID: 1:Map) to 1st channel (ID: mesh)
    note: your mesh will now ve VERY small, (0>1) but you can now use any existing modifiers to modify it.

  5. copy/paste the mesh channel (1st channel) to map channel (Id 1:map)

  6. copy the original mesh channel from step 3 back to 1st mesh channel

script:

--------------------------
 -- UV_to_Mesh.ms --
 -- Author: Zbuffer  --
 --------------------------
 (
 	fn UVsToMesh obj =
 	(
 		channelInfo.addChannel obj -- add a new channel
 		channelInfo.NameChannel obj 3 2 "Original Mesh" -- name it
 		channelInfo.CopyChannel obj 1 0 -- copy mesh channel
 		channelInfo.PasteChannel obj 3 2 -- paste mesh channel to new channel
 		channelInfo.CopyChannel obj 3 1 -- copy UV channel 
 		channelInfo.PasteChannel obj 1 0 -- paste UV channel to mesh channel
 		max tool zoomextents all -- update views
 		)
 	
 	fn MeshToUVs obj collapse =
 	(
 		try (channelInfo.NameChannel obj 3 2 "Original Mesh") catch (format "ERROR ! Use copy First !
"; return OK)
 		channelInfo.CopyChannel obj 1 0 -- copy mesh channel
 		channelInfo.PasteChannel obj 3 1 -- paste mesh channel to UV channel
 		channelInfo.CopyChannel obj 3 2 -- copy saved mesh channel
 		channelInfo.PasteChannel obj 1 0 -- paste saved mesh channel to mesh channel
 		channelInfo.ClearChannel obj 2 -- delete the new channel
 		if collapse do collapseStack obj -- collapse stack
 		max tool zoomextents all -- update views
 	)
 
 	global RO_UVMesh
 	try (destroydialog RO_UVMesh) catch()
 
 	rollout RO_UVMesh "UVs to Mesh"
 	(
 		button btn_UVsToMesh "UV > Mesh"
 		button btn_MeshToUVs "Mesh > UV" enabled:false
 		checkBox chk_collapse "Collapse"
 		on btn_UVsToMesh pressed do (if selection[1] != undefined do (UVsToMesh selection[1]; btn_MeshToUVs.enabled=true))
 		on btn_MeshToUVs pressed do (if selection[1] != undefined do MeshToUVs selection[1] chk_collapse.state)
 	)
 
 	createdialog RO_UVMesh
 )

Note: not heavilly tested… but it works…

Hi there! awesome tip! but i have tried and it works with some objects and it doesn´t with some other…any idea about what could the problem be?

thanks!

difficult to say without having a look at it.

Could you post a file showing the problem ?

Hey Zbuffer, got it now, it seems that there are problems with editable polys so i had to convert to editable mesh, once i did that everything went well, thanks for the trick!