Home Technical Talk

misc. maxscript UV scripts/tools

13468914

Replies

  • rasmus
    Options
    Offline / Send Message
    No breaks for you, good man :)

    A small note: One thing that's been bothering me with the standard Unwrap modifier as well, why the hell does the user have to manually click a "Save settings" button? It makes absolutely no sense and shouldn't be imitated imo - it's one of many things that makes the original Unwrap suck so much. Saving settings automatically on close is the most natural thing to me in any application.
  • Yozora
    Options
    Offline / Send Message
    Yozora polycounter lvl 11
    the new header button logo thing doesnt work, double clicking it breaks the whole thing and I have to re-run the whole script or restart max to fix it.

    edit; hmm it works now after you re run it. But if you restart max and try again from startup then it breaks again. So its doing something different between loading from startup and running script manually...
  • Farfarer
    Options
    Offline / Send Message
    Any chance you can have it not force your colour scheme onto the UV Editor? Orange UV edges and orange selection highlighting isn't exactly easy to see. And the other stuff like grid size being forced to 1.0 rather than the default 0.1, not displaying seams and the select by angle being turned on.

    And same as Yazora, the hide/show pallate double click thing breaks straight away then renders the rest of the script broken until closed and re-opened.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    fixed the collapse stuff, sorry about that did not tested it with the startup folder mechanic. The reason was that the minimize button called a function that was not before the button declared and so it was not yet in memory for the button. Changed a bit the order and it works now as it should if you let the script automaticly run with max.

    the fix is available here:
    http://www.renderhjs.net/bbs/polycount/texture_maxscript_tools/uv_toolbox_1.41.mzp

    will answer some of the questions including some from some pages back later
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Could you make something like this?
    uvtoolrequest01.jpg

    It would be a huge help when unwrapping roads/curbs/sidewalks for example.
  • glib
    Options
    Offline / Send Message
    Apply those uvs on the right to an object that looks like your left example from a top view would just give you horrible stretching though, would it not?
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    In that example, yes. But this is the only way to do streets and stuff. You would have to add more segments to minimize stretching.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Just tested it! :) So far so good!
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    some updates

    I dont know if you guys noticed but in max2010 some minor UV changes have been made
    max2010_uvw_unwrap_update.gif
    it is basicly just the UV editor floater which now offers: stitching in/out, aligning horizontal or vertical (each a button unlike my tech), and better + - 90° rotation (easier for me to read).
    There is also a propper loop select now (including edges of shells) but you CAN NOT access it via maxscript which is a big big let down. I assume it's taken from polyboost which again is maxscript as well and therefore not yet accessable. I also did not found yet the shortcut mapable commands in the customize menu to map it to keys, sad stuff.

    Could you make something like this?
    uvtoolrequest01.jpg
    It would be a huge help when unwrapping roads/curbs/sidewalks for example.
    yes I can :p
    as a matter of fact I actually already wrote down some concepts for it before and started scripting today. I always wanted something like that myself mainly for ropes, wires and alike unwrapped objects - because those usually look bad in my UV's.

    But before that I want to show a screenshot of UVlayout a master tool at layouting UV's that I really like alot (by far the most advanced, incredible fast and smart UV unwrap specialized tool)
    uvLayout_rectify.gif
    in UVlayout you can actually specify so called edge or loop rules within the flatten algorithm. In this case I added the darker loops to the shell to tell UVlayout to force those edges aligning to the UV axis. There are other edge rules as well like just a straight line ect.
    Anyway my point is that this is already a very smart way of rectifying uv Elements but its quite often not always enough as you can see in the screenshot. Many of the remaining edges of the shell are getting very distorted and cramped together which is not nice. And this is what I try to fix here - creating a algorithm that simply rectify's all edges.


    so here is a sample animation of what I have so far running (hard math execution, no smoothing or interpolation¹):
    tex_tools_1.5_preview_rectify.gif
    each frame represents atm. 1 iteration. Just like relaxing and other flattening mechanics I need to iterate a few times because the relations of the faces to each other is to complex in order to calculate it all at once. Instead it tries at each iteration to align edges of each face within 90° snaps.
    It fails atm. with bending shells like a banana shape something that goes on a corner. This is because right now I dont sort the order on which face to operate first- doing that would significantly reduce the iterations and allow rectifying shells that have slight turns in them.

    ¹ = The last thing I am adding right now is some interpolation so that it does not mess up your shell right away if it does not work so well. It also makes sure that all in all everything is better balanced and smoothed because right now everything is executed absolut which sometimes messes up the shell if it simply does not fit well



    oh and i will be away from sunday on for a week and a half going to Stuttgart at the FMX showing other studios my stuff, so dont expect any updates here then.
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    this will be ace, if you could incorporate a single directional relax that would be awsome for more natural stuff like river bancks cliffs stone walls etc where the vertical lines are often not that parrellel and forcing them to be would cause alot of stretching.
  • AdamB
    Options
    Offline / Send Message
    Just wanted to stop by and say thanks! this plug is a huge timer saver for me! :thumbup:
  • Mark Dygert
    Options
    Offline / Send Message
    Could you make something like this?
    uvtoolrequest01.jpg

    It would be a huge help when unwrapping roads/curbs/sidewalks for example.
    Yea this would be pretty awesome. The way I do it now, is select an edge (in the editor window), hit loop (in the modifier stack not edgeloop in editor window), then flatten. It's a little faster because I have a UV flatten script I wrote that I use for this it works on edges or verts. I have flatten horiz to ctrl 1 and vert to ctrl 2.

    shift ctrl 1-2 runs loop just before flattening. For now its pretty easy to do it either way, manually or with a shortcut until renderhjs gets something working.

    Renderhjs, If those are from polyboost, I think they have plans to expose it all to maxscript but writing up the documentation takes a while =/
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    vig- soory but could you elaborate a little, i need to be able to do this sort of thing fast, and having recently re-aquainted myself with max, feel like im missing a few tricks that would help significantly in my working day

    edit-would apologize for my spelling but the g&t in my hand makes it hard to type.
  • Mark Dygert
    Options
    Offline / Send Message
    Normally I click an edge, hit 'edge loop' (in the options panel, bottom of the UV Editor) or the loop button (in the modifier command panel), then run the UV Align Horiz/Vert scripts which I bound to keys.

    2010 has align buttons, so does chuggnuts tools and there are half a dozen scripts floating around that do it too. I wrote my own (big thanks to mop for indirectly getting the undo to work)

    My scripts (which will be obsolete as soon as they expose polyboost to maxscript)
    http://www.vigville.com/forum_images/3dsmax/Scripts/VigTools_v1.5.ms
    - Run the script once
    - Then in Customize > Customize UI > Keyboard tab > Category:Vigtools
    - Assign the scripts to keybinds my personal preference is listed above.
    UV Align Horiz, takes a selection of edges or verts and flattens them horiz.
    UV Align Vert, same just works vertically.
    UV Align Loop Horiz, same as above but takes any selection and runs select edge loop then flattens.
    UV Align Loop Vert, Same as above just works vertically.

    I don't use the last two as much, because I'm not always sure where the loop ends, but when I have a bunch of edges to straighten and they are all uniform, it makes it pretty quick.

    That all probably confused you more? Hopefully it helped... If not I can toss a little gif tutorial together.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Vig wrote: »
    That all probably confused you more? Hopefully it helped... If not I can toss a little gif tutorial together.

    Text was good enough for me, but if you have the time, that gif would be really handy and easier to follow! :)
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    cool cheers vig gonna try those out
  • glib
    Options
    Offline / Send Message
    So after some in-depth normal-mapping discussion, it seems that it would be useful to have a script that breaks your uv islands into smaller ones wherever there's a hard edge (aka. meeting of two different smoothing groups).
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Straightening those wobbly edges; I never really have to do that anymore, as I make sure I use either Splines or Lofts, with automatic UV's. It does the same sort of thing, in advance.
    You guys never thought of using this, or there's another reason ?
  • Mark Dygert
    Options
    Offline / Send Message
    All the time, for things that you can make with a spline or a loft shape. But there are cases when you need to straighten edges that are part of something more complex and can't easily be made out of a spline or a loft.
    Or you have to do something to the spline that destroys the UV's.
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    there is also the issue of re-mapping stuff after it has been made due to design changes or using bent template objects, this happens all the time with more natural stuff where you cant make stuff look natural straight away but always takes some reworking, at which point re-UVin is generally pererable to re-modelling
  • rasmus
    Options
    Offline / Send Message
    glib: Amen brother, that's a great idea.
  • Peris
    Options
    Offline / Send Message
    Peris polycounter lvl 17
    renderhjs wrote: »
    yes I can :p
    as a matter of fact I actually already wrote down some concepts for it before and started scripting today. I always wanted something like that myself mainly for ropes, wires and alike unwrapped objects - because those usually look bad in my UV's.

    That would seriously be a godsend. I found myself lately unwrapping a lot of pretty hipoly crazy curved pipes and stuff like that, and it feels like such robotwork unwrapping those to be nice straight aligned on strips on the uv. Chuggnuts unwraptools are a huge help for aligning and spacing the vertexes evenly, but its a chore have to go through every line and row of vertexes, when there's dozens of it.
  • Farfarer
    Options
    Offline / Send Message
    For pipes and such, something like modo's UV Peeler tool would be very handy;

    http://www.luxology.com/video/view.aspx?id=97
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Talon wrote: »
    For pipes and such, something like modo's UV Peeler tool would be very handy;

    http://www.luxology.com/video/view.aspx?id=97


    Oh man, that's really great!

    But can't we make more or less something like that with the pelt mapper?
  • rasmus
    Options
    Offline / Send Message
    For pipes etc there's already LSCM unwrappers as well as automatically generated UVs from renderable splines - feels like pretty much the same thing, no?
  • Farfarer
    Options
    Offline / Send Message
    hp: I dunno. Pelt mapping is one of the most useless and clunky features in Max, imo. As a general rule, I try and avoid using it for anything other than defining UV seams :P
  • Mark Dygert
    Options
    Offline / Send Message
    Talon wrote: »
    For pipes and such, something like modo's UV Peeler tool would be very handy;

    http://www.luxology.com/video/view.aspx?id=97
    in 3dsmax2009 its called "spline" unwrap. Its a new feature, works pretty much the same way. BUT it requires a spline running along the mesh, which is easy enough to create select edge loop > convert to shape. Or do what I do and leave the original spline alone and make edits to a copy. But its one more step and it doesn't always give nice squared off UVs so it needs work.

    Pelt mapping also got an upgrade and is much easier to use. Plot your seams (point to point seams), click pelt, stretch, relax, confirm.

    More then likely in previous versions you where skipping the align best button before pulling. It also helps to select the stretcher and scale it up 2-3x.
  • oli8877@hotmail.com
    I was wondering if it was possible to write a script/plugin which would alllow you to apply an fdd/cage/freeform modifier to a planar map gizmo in the uvw map modifier in 3ds max. This would allow you to deform a planar map around complex objects.

    I have tried with poor results and very limited control to use the new spline mapping modifier in 2009 - tbh i think it needs a lot of work...

    Also the relax by face modifier in unwrap editior doesnt always give great results... and can often leave the texture map looking slightly deformed

    I remember that mankua had a great plugin called texure layers 2, which had a Free Form mapping function in it. The free form mapping function helped enormously with mapping complex environment terrian.
  • oli8877@hotmail.com
    I was wondering if it was possible to write a script/plugin which would alllow you to apply an fdd/cage/freeform modifier to a planar map gizmo in the uvw map modifier in 3ds max. This would allow you to deform a planar map around complex objects.

    I have tried with poor results and very limited control to use the new spline mapping modifier in 2009 - tbh i think it needs a lot of work...

    Also the relax by face modifier in unwrap editior doesnt always give great results... and can often leave the texture map looking slightly deformed

    I remember that mankua had a great plugin called texure layers 2, which had a Free Form mapping function in it. The free form mapping function helped enormously with mapping complex environment terrian.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    btw, without wanting to goo too much OT here, but do you guys use any 3rd party LSCM unwrappers?
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    yeah, i was wandering if it would be possible to get the LSCM and the otherone from blender added to the script, i used to use roadkill which used these intergrated into maya, but i cant seam to get it working in max, got a script working that exported and imported the mesh but if tended to fuck the vertex ordering nd would get rid of any vertex colours or second sets ;-(

    renderhjs- quite a few of the tools in this destroy everything but the first set of UVs, I use 2 laqyer stuff all the time, which means i cant use them ;-( wandering if this could e fixed ;-) ;-)
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    I mentioned a few times before that I am a big fan of uvLayout
    http://www.uvlayout.com/
    it has everything you could wish for icluding subdiv distortion preview (changes your UV wire in a way that it matches the shape of the sub divided topology). It has a crazy feature set and a very powerfull workflow. You need however to pu a little bit time in the tutorials in order to master it - but once you do unwrapping really is fun and quick.

    I also experimented with unfold3d:
    http://www.polygonal-design.fr/e_unfold/
    it has LSCM but a horrible workflow (slow & painfull mouse click interface with hickups inbetween - no real flow into the workflow. Also the aligning and symetry tools are quite limited compared to uvLayout. All in all I dont like it - it does not stand it's advertisement.

    Modo
    http://www.luxology.com/whatismodo/model.aspx
    well integrated (the way it should be) - all commands work either in UV or 3d world space. It has some fundamental features such as island aligning (snap to in uvLayout) a neat peeling feature which is a bit close to the spline mapping in max but quicker to execute and closer to prodcution workflow (max still fails here).
    The LSCM algo. work just like does in bodypaint, blender ect. instantly and with often nice results.
    I spoke with some Modo guys at the FMX in stuttgart last week and they demonstrated me some of the UV and scripting stuff I am interested in. The scripting part works already at a basic level but there is still much to do there- no intuitive script distribution (e.g a script that comes with sub scripts and button icons cant be put into a single file). But it certainly got my attention - even more because more and more game companies use it in their pipeline.

    Roadkill
    http://www.pullin-shapes.co.uk/page8.htm
    is slow and buggy- not at all usefull for decent polycounts (neither is max). Maybe I should recheck the tool but back then when I tested it - it often resulted into painfull and long hickups.

    unwrap 3d
    http://www.unwrap3d.com/u3d/index.aspx
    (site just went offline or not available. a few minutes ago it worked)
    http://unwrap3d.blogspot.com/2007/03/ultimate-unwrap-3d-tutorial.html
    last generation? - not sure who uses it these days since it offers just what every uv editor in the most common 3d packages does.


    but on the other hand there are some interesting scripts for max, modo and maya arising, some of my favourites:

    maya: Diamant UV 1.0 Beta
    http://forums.cgsociety.org/showthread.php?t=644892
    some guy from Naughty Dog started this editor for Maya that comes with it's own improved editor window (because of xtra color highligting and other neat features + more speed).

    modo: superUVTools
    http://www.vertexmonkey.com/scripts_texturing_UV.php
    Seneca Menard from id software created these fine scripts for his own workflow improvement but also for the community to use. It shows clearly the level editing background and imo. the interface is not very compact & clean it's the best xtra script for modo in the area of UV editing.

    there were some unknown nice maxscripts as well (besides the well known chuggnuts and LSCM one) but I can't find the links anymore.
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    got a link to that max LSCM script, i really need something like this intergrated into max, cos exporting destroys so much stuff, including custom attributes that cant be exorted or imported
    cheers
  • Farfarer
    Options
    Offline / Send Message
    modo's got subdiv distortion preview, too ;)
  • rasmus
    Options
    Offline / Send Message
    I use CrazyButcher's LSCM Unwrapper - integrated and easy, works great. Used to export to RoadKill but it's so much better to not have to leave max, plus it screwed up smoothing groups. http://www.luxinia.de/index.php/ArtTools/3dsmax Use it!
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    SHEPEIRO wrote: »
    ...renderhjs- quite a few of the tools in this destroy everything but the first set of UVs, I use 2 laqyer stuff all the time, which means i cant use them ;-( wandering if this could e fixed ;-) ;-)
    could you get in detail regarding this? what do you mean by laqyer? layer? and if what exactly?
    Do you perhaps mean different modifiers ?
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    that post is gold renderhjs, thanks a lot!

    I guess I'll give uvLayout a try, as I'm not a huge fan of max's pelt mapping.

    I'll also try CrazyButcher's LSCM Unwrapper, it looks pretty simple to use.
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    renderhjs- sorry i meant 2sets of UVs, the 3d- 2d tool destroys the second, and i think there were another couple aswell but i cant remember, was very hungover might have been talking out my arse, will check on monday, thanks for everything

    rasmus, cheers for that will put it to use come monday.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    got a new script running stable:
    [ame]http://www.youtube.com/watch?v=3bFhBupSZpk[/ame]
    it sorts the uv shells either in a horizontal or vertical flow by their heights/widths. It also rotates each individual shell to a most compact horizontal or vertical layout. Very usefull for tight and thin shells that would take manually alot of time to arrange nicely.

    the rectify script on the other hand suffers a little bit from not beeing that flexible. If you use extremely bended surfaces it wont deliver usefull results. Will see if I can improve it at some time.
  • Farfarer
    Options
    Offline / Send Message
    Oh man, auto-align, I've seriously missed having that, nice one :D
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Man, that's great!

    You keep on rocking with this, and I can even see this getting commercial somewhere down the road.
  • RickFX
    Options
    Offline / Send Message
    that is AWESOME!
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    SHEPEIRO wrote: »
    renderhjs- sorry i meant 2sets of UVs, the 3d- 2d tool destroys the second, and i think there were another couple aswell but i cant remember, was very hungover might have been talking out my arse, will check on monday, thanks for everything
    rasmus, cheers for that will put it to use come monday.
    sorry to bump you again, but just to be clear:
    if I change the swap 3d/UV function in a way that nothing gets merged at all you get about 7 modifiers on top of your current stack just for 1 time swapping (because I have to juggle between the 3 available channel types in order to swap the 2 propper). I wrote the script the way I did because those many modifiers (and there is no other way in doing scripting wise) were ugly and bloaty.

    Maybe I can change the script in a way that it only collapses the modifers it created to a new a editUVW down. As soon as you would dis/enable that added uvUnwrap modifier channels would be swapping.
    Will try that propably next week or so- for now I need to push my portfolio and applications
  • mLichy
    Options
    Offline / Send Message
    That last video was sweet. keep up the awesome work!
  • rasmus
    Options
    Offline / Send Message
    Wow, that auto-arrange thing looks rockin'.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    about to release the next update soon,

    some progress report:
    gui icons update:
    texTools_1.6_preview_gui.gif
    (cavity map rendering and lineup are new icons)

    what is a bigger change now however is underneath the GUI: the code is now splitted into multiple script files. Each function now has its own maxscript *.ms file which makes it a hell lot easier for me to fix specific stuff that people ask about or I notice. I makes it also easier for other people to adopt just portions of the toolbox, e.g just a single code.
    texTools_1.6_preview_code_split.gif
    This way I dont have to check each time if the whole system works - I can just test the local script file of that function - and put it again in the *.mzp package.
  • RickFX
    Options
    Offline / Send Message
    ah you implemented the line up thing finally!
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    yup supports booth vertical and horizontal - depending on left or right mouse click. I could even boost that script and its pretty fast with many elements.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    update:

    download:
    http://www.renderhjs.net/bbs/polycount/texture_maxscript_tools/uv_toolbox_1.60.mzp

    feature updates:
    ico_swap_uvw2xyz.gif is now fixed the way SHEPEIRO asked for - each swap change is now dumped into a single "edit poly" modifier - you either hit undo in max or simply delete that modifier. If you hit that button again it will add another modifier and swap again.
    The texture preview once swapped seems to be fixed now as well so it looks more clean.
    texTools_1.6_swap_channels.jpg
    here is another youtube vid showing how it now behaves:
    [ame]http://www.youtube.com/watch?v=0NTYje4hdIw&feature=channel_page[/ame]

    ico_line_up.gif like showed before simply lines up uv shells and rotates them in a compact manner. Left click on this button to apply this for the V-axis (or y axis) by default it will distribute along the U- axis (or x- axis).

    - I rechecked all functions if they had propper undo implementations. The only ones that are left out without a undo operation are the easing simulations that are activated on a left click on these buttons:
    ico_quick_flatten.gifico_straighten.gif
    that is because I simply can't add a undo snapshot around a timer event.

    - like mentioned earlier most of the functions are now splitted into seperate *.ms files with a single function in them (with the same name as the filename).
  • rasmus
    Options
    Offline / Send Message
    Holy shit that 3d swap thing is awesome - what do you use it for?? :) Lineup looks ace.

    Also, what exactly does the cavity render do?
13468914
Sign In or Register to comment.