Solved! Go to Solution.
Solved by lightcube. Go to Solution.
Solved by blakestone. Go to Solution.
Hello, I'm using this Script.
It works great! And helped me a lot.
But the problem is sometimes it dosen't work correctly.
i have to go to Modifiers tab and select the 'automatic uvw" and select all the faces and then click the fletten button.
is there any way to make this script do this in the way that i dot need to go through all these steps Because i work with unreal engine and there is lots of lots of Objects..
Thanks and sorry for my bad english.
Hi "shah.kurosh"... I have rewritten the the script to be a little more stable (see attachment).
Give it a try and let me know how it goes!
So So Sorry for answering late.
thank you for your time.
Same probl
let me demonstrate:
This is a 3d model of a wall:
This is the result of Script:
This is result of using Mapping / Flatten Mapping/ Ok.. and what we are looking for:
thank you so much for your time and help.
I'm really behind my schedule and I'm really nervous about it..
Honestly, if you have to do this thing a lot, your best solution is to buy Flatiron.
Hi shah.kurosh,
You have identified an issue with this script which I have corrected in the attachment v1.3.
What the script is doing...
The script is taking all the Geometry Objects in your current selection and one-by-one doing the following:
- Adding the "Unwrap UVW" modifier but is renaming it to "Automatica Flatten UVs" to the top of your Modifier Stack
- Selecting the Top-Most modifier in the Modifier Stack (which is the new modifier)
- Sets the UV Channel on this modifier
- Performs the built-in "Automatic Flattern" on this modifier
The issue with v1.2 was that the script was looking for the modifier called "Unwrap UVW" before it renamed it to "Automatic Flartten UVs" which if you had already had one in your Modifier Stack would be at risk of having this one selected instead of the one the script had just added.
Give this a try and see how you go, sorry for the inconvenience.
hi.
thanks for the help.
it works great in most models but it gives me an error in my scene.
maybe the problem is in my model.
here is the listener:
-- Error occurred in button_uv.pressed(); filename: C:\Users\Kurosh\AppData\Local\Temp\Rar$DRa0.885\AutomaticFlattern_v13.ms; position: 4162; line: 101
-- Frame:
-- modifier_array: undefined
-- obj_selection: #($Pellei_Down_R)
-- uv_value: 3
-- uv_modifier: Uvwmap:UVW Map
>> MAXScript Rollout Handler Exception:
-- Unknown property: "unwrap" in Uvwmap:UVW Map <<
and here is an screenshot:
Basically the script couldn't add the "Unwrap UVW" modifier to one of your models "Pellei_Down_R" and when it tried to access this missing modifier to perform the Automatic Flattern it failed.
What type of model is "Pellei_Down_R" is this an Editable Mesh, Editable Poly or something different?
@shah.kurosh wrote:
Good But expensive..
not much benefit in my current project to spend!
Yeah, so it's good that we have people like @blakestone and many others sharing free scripts and tools. It's part of the beauty of the Max world.
That being said, I once wrote a script that is similar to Blake's and still use another related script on occassion for merging maps in multiple objects after using RTT on them when they share UV space.
But the problem with my old script (and likely Blake's ) is that it's in MAXScript... and many functions in MAXScript are notoriously slow and have to intereact with the Max UI... which can make things even slower.
If this is a one-off project, using a script probably makes sense. But that's why I said if you do this a lot you should get Flatiron. I was eyeing it a year or two before I finally got it... and afterwards wished I'd gotten it sooner. It is a life-saver in cutting out time for this kind of project.
it's Editable Poly.
and its converted.
i haven't modeled it.basically modelers made line>extrude>many copies>Group.
and when they finally gave it to me i used Collapse to merge them all and converted it to editable poly.
for the most parts i had to remodel many objects!
with that being said, i had problems with AutomaticFlattern_v12 on standard models too.
can't remember to demonstrate right now but i would be happy to help debugging and upgrading your script.
this helped me a lot.
thank you.
I have a question. Im running your script right now. Is there a way to add UV scaling option so that all of the objects will be the same uv scale size? Theres a button in max uv editor that you can grab the faces and make sure the uvs are all even with each other. I want to do that for the separate objects but they all are uniformly scalled with eachother even though they are separate objects. Is that possible?
The reasoning is that I have a bunch of objects that I want to share the same material. Since they are different sizes when I apply that 1 material on them they would be scaled differently. I would have to manually go in and scale each objects uv to match each other.
well i wonder if there is a way to have each model their own GROUP, attach all, unwrap flatten,arrange scale to be same, then detach based on groups. Anyway just a thought.