Home Technical Talk

misc. maxscript UV scripts/tools

1568101114

Replies

  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    jes the 2 modi sound great
    but a lot of work to maintain and code :( -not decided yet


    edit:
    bigger news °_°, new script on the way (almost catching up to my favorite UV application)

    proof of concept video (quite smooth runny already)
    [ame]http://www.youtube.com/watch?v=DNnG5FPao8g[/ame]
    like the big image below already says its about Pelt mapping and simplifying the input to just 1 single or 2 clicks.
    No need to mark the tiresome seam markings (the blue ones) in max but instead define with just an edge selection where to cut in your shell.
    Or if you dont need to cut but want to relax or flatten your mapping you can go do that with a single button click, the script is either edge or face context sensitive

    texTools_1.9_pelt_mapping_preview.gif

    oh and stitching will be mapped in the next release as well - I am tired of that hidden and annoying dialog. One macro will stitch without nagging your edge selection with the default settings.
  • mLichy
    Options
    Offline / Send Message
    That's fucking awesome!! :D

    Edit: When do you think you will release this build??

    Oh, and I cannot seem to get the save button to work.. I'm using Max 2009 64 bit and I get an error message of

    "Type error: Call needs function or class, got:undefined" Line 32 I think.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    well yes that sometimes happens, probably know the reason - will fix that in the next release. Most likely it will work if you run the MZP script again.
  • rasmus
    Options
    Offline / Send Message
    Looks really cool, looking forward to nagless stitching, too :P
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    sweet,

    think renderhjs may get his own appreciation thread, showering him in polylove ;-)
  • Ghostscape
    Options
    Offline / Send Message
    Ghostscape polycounter lvl 13
    I love the hell out of this.

    Since you're a UV guru, is it possible to make a tool that would give hard edges along all UV boundary edges, and soft edges on all interior edges, to improve tangent-space normal maps? For hard-surface stuff with a lot of smoothing group or UV breaks its hard to make sure they match 1-1, and if they don't you get nasty seams or bad smoothing.

    Since Max handles edge hardness/softness via smoothing groups it seems the easy way would be to assign a unique smoothing group to each UV "island," but then you have issues since they're limited to 32 smoothing groups, and if you wrap around you could end up with two islands that share a border having the same smoothing group (resulting in bad shading).

    It seems tricky but it would save me a million hours of work :)
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah actually this shouldn't be too hard (although it's much easier in Maya), Pier Jansson wrote a hard/soft edge script, it should be possible to easily get the "border edges" of all UV shells, and then run his script on those, and bingo it's done.
    Smoothing Groups really make this a pain in the ass, though.
  • glib
    Options
    Offline / Send Message
    There's also that hard/soft edge script on scriptspot that lets you deal with smoothing groups in the maya way. Perhaps that could be deconstructed and put to the task? I mean I daresay it could be as easy as 'clear smoothing, set all faces to 1, grab uv shell edges, run harden edge script'.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah that's the one I meant, Pier Jansson wrote it :)
  • glib
    Options
    Offline / Send Message
    Oh crap I wrote that really fast without really looking at your reply MoP, sorry. AD was breathing down my neck and I was hurriedly posting before going to (art) war.
  • rasmus
    Options
    Offline / Send Message
    That's a pretty cool idea - I'D BUY THAT FOR A DOLLAR. (UV shells > Smoothing)

    Also, about Talon's align-idea, would it even need those pretty space-taking buttons in the GUI? Just using the arrow-keys directly might work...
  • Farfarer
    Options
    Offline / Send Message
    Made a little update to my align script - it'll now align a face selection to your vertex selection. Oh, and ignore my mock-up changes to the d-pad, just me messing around.

    I've a few more features I'd like to add, but I'll have to see, as my MaxScript skills only go so far.

    uvalignpolystoverts.jpg
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    nice one talon, like this feature....whens the next daily update :P
  • mLichy
    Options
    Offline / Send Message
    Bah, I'm eagerly awaiting the next release....
  • Ghostscape
    Options
    Offline / Send Message
    Ghostscape polycounter lvl 13
    MoP wrote: »
    Yeah actually this shouldn't be too hard (although it's much easier in Maya), Pier Jansson wrote a hard/soft edge script, it should be possible to easily get the "border edges" of all UV shells, and then run his script on those, and bingo it's done.
    Smoothing Groups really make this a pain in the ass, though.

    Max has some functionality for "open edges" which are the "border edges"

    You can assign a hotkey/toolbar button to Open Edge Mode and Open Edge Select - Open Edge Mode, when toggled, makes selecting a single border edge select all connected border edges, and Open Edge Select selects all open edges of the current selection. They appear to be undocumented, though, and I don't know how that translates to Maxscript, as I can't find anything in the Maxscript documentation. Hitting my new Open Edge Select button in the Macrorecorder gives me this line:
    actionMan.executeAction 2077580866 "40079"

    edit: Open Edge Select is useless, however, I can use the UV/3D swap to turn my UVs into an edit poly, select all the borders using the edit poly border tool, go back to object mode (or else the UV/3D swap will go nuts) and swap back to the 3d mesh, and have a edge selection of just my UV borders. I'm testing it with the hard/soft edge script right now (have to reboot to install it)

    edit2: it works! Now I just need to spend a minute cleaning up my now-hard symmetry seam and we're done.
  • Mark Dygert
    Options
    Offline / Send Message
    Great stuff really love the tools =)

    Stuff:

    - Is there going to be a quick way to launch it other then running the script? Toolbar button or keyboard shortcut?
    - Info, Line Up, Stack, Align, Pick, texel, norm are not working?

    - Clicking help brings up a window that can not be scrolled, looks like your textools page, its really helpful if you nav to it another way. Maybe pop it up in the asset browser (it handles webpages much better) instead of rollout window?

    - Any way to set the preferences for the open editor or export maps?
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    ha, nice pacing :D

    Ghostscape: I might give that a try, I have some ideas regarding it also regarding the issue with the limited smoothing groups.
    A way I could think of would be to calculate a centroid per UVshell in 3d space (some average single 3d point XYZ thats in the volume center). The shuffle the shells in order in a way that most distant centroid shells can be merged together in 1 smoothing group. That way it would avoid having the same smoothing group of connecting UVshells in the 3d model.
    I think there is potential for some other more distant releated scripts to UV and texturing like:
    - copy/delete/swap UV channels
    - export/refresh OBJ's to other UV unwrapping tools or painting Apps (UVlayout or Mudbox for instance)
    Maybe I will add a list or table on my texTools website with feature requests
    Ghostscape wrote:
    Max has some functionality for "open edges" which are the "border edges"
    in my last quick pelt mapping script I wrote a function that fixes the odd behaviour in max and selects the outer edges of your shell the way it should be.
    Right now the command in maxscript does not always work propper,- only for example if you really select a border edge of the shell - not if you pick an edge from the center of the shell.
    here is a comparison:
    maxscript_openEdges.gif
    the way how I solved it was by looping though all edges of the shell (first extend selection to shell/element) and then execute this openEdgeSelect till the selection count was above just the current edge. I can post a snippet later if you want.




    Talon: thx for showing up here and give your insight of the script. If you want I can extend or modifiy the script in a way that it automaticly determines shells and arrange them.
    Personally the workflow of selecting booth vertex and face selection to control the outcome is imo. a bit to complex.
    Just to repeat what I thought of in the beginning - next to your vertex elevel alignment I was thinking of a shell mode where you simply select some shells and align them on a bounding box basis.
    Edges would most likely just like you suggested earlier be handled like vertices.

    Vig: yes I know lots of stuff to be cleaned
    regarding:
    1.) launch: yup some macro script or panel button (but would be a macro script anyway) is planned. I am just getting warm with maxscript and at the beginning all that stuff was a bit messy for me but I think i understand a lot more now
    2.)
    Info, Line Up, Stack, Align, Pick, texel, norm are not working?
    why do you think that is? - does it not work for you? - it works for me though.
    - info: works with an object selected
    - line up: works with a UV face selection of some shells
    - stack works with a UV face selection of at least 2 shells
    - align works with just 1 UV edge selection of a shell
    - pick works in 2 modes, if you have already 1 object selected it computes the texel density of that object and sets the values of the 2 input fields to those values (pixel space per unit).
    if you have nothing selected and hit the button you can then pick up a object and after that it does the same.
    - normalize should work in manay ways: Object selection, UV face selection
    and of course you need 3dsmax 9 for most functions in order to work - just to be sure I wouldn't be surprised if the mentioned functions don't work for you if for example you are using max8 or 7 but I dont assume that with you (probably a max2009 user)



    Ok this might look crazy with the recent updates in this thread but here is another brainstorming and experimenting regarding the GUI.
    What troubles me atm. is that code and design are not really encapsulated and often digging into the GUI code leaves a lot of changes on the rest of the code. Thats why often I still have to be carefull if I want to add buttons and functions for example.
    It would thus be nicer to have something that is dynamic and flexible, like some XML file that defines the icons, tooltips, order, groups and perhaps even allows to add completely different languages like chinese or japanese.

    here is a thinking process
    texTools_gui_thoughts.jpg
    maybe some suggestions from you guys? Because after all what I would like most is:
    - usefull Interface
    - extendable so that I can bring out releases with experimental functions
    - dynamic: can be changed in size (liquid layout) but also changed content wise (by editing the XML)

    I am thinking of using Flash as a interface so that I can program the way I want how the GUI behaves. I know that it can be done because I have seen other maxscripts embedding and communicating with SWF files similar it can be done now in Photoshop CS4. Using flash reading in XML files would then be piece of cake, and arranging stuff as well since I know Actionscript very well.
  • mLichy
    Options
    Offline / Send Message
    Hmm.... this is all very interesting and exciting.

    I like the current UI, but a scaling/scrolling window would be very nice.

    I like your last idea with scaling sideways and vertically, with the icons repositioning themselves.

    Maybe if you did that, but also had a section at the top with Favorites separated off from the others, so people would always have access to the tools they use regularly. Or even having that with the other tools/menus collapsed would be fine as well.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    here is a early prototype:
    texTools_gui_thoughts_swf_test.jpg
    right now nothing really is clickable,- all this demo does is sending events to flash that the panel is resized and than within the flash movie call a function that re-arranges a linear loop of icons.
    But it is all really running inside 3dsmax!, I used maxscript to embed the swf movie in a floater.

    [ame]http://www.youtube.com/watch?v=kBhQJ39doFs[/ame]
  • Farfarer
    Options
    Offline / Send Message
    renderhjs wrote: »
    Talon: thx for showing up here and give your insight of the script. If you want I can extend or modifiy the script in a way that it automaticly determines shells and arrange them.
    Personally the workflow of selecting booth vertex and face selection to control the outcome is imo. a bit to complex.
    Just to repeat what I thought of in the beginning - next to your vertex elevel alignment I was thinking of a shell mode where you simply select some shells and align them on a bounding box basis.
    Edges would most likely just like you suggested earlier be handled like vertices.
    Yeah, I was thinking about it last night and I'm probably going to re-write it so you can align anything to anything else, as a whole or as individual elements.
  • rasmus
    Options
    Offline / Send Message
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    nice, that scalling window would be good yes! Man, this is getting better by the day!
  • Michael Knubben
    Options
    Offline / Send Message
    If you're going with the modo-design, please consider nixing the terrible '...' on small buttons, where three extra characters would have been far more useful than the elepsis to alert you to the fact that you're not reading the entire word.
  • mLichy
  • Mark Dygert
    Options
    Offline / Send Message
    renderhjs wrote: »
    2.) why do you think that is? - does it not work for you? - it works for me though.
    Probably because the scripts are dependant on Editable Poly operations and I'm feeding it other things like editable mesh or modifiers that treat meshes like editable mesh instead of poly. It's one of the reasons Editable mesh has never really gone away. Editable poly and Edit Poly(the modifier) are "new" and the core workhorse of 3dsmax has been Editable Mesh. Which is probably about to drive you bonkers like it does everyone else.

    If the stack is:
    - Editable Mesh + Edit poly = They won't work.
    - Editable Poly + Turbosmooth* = Info crashes** and the others won't work.
    - Box + Unwrap* = they won't work.
    - Box + Edit Poly + Unwrap = they won't work.
    - Box + collapse + convert to editable poly = they work. Which is a little more destructive then I like to work.

    Considering you can feed much more then editable poly objects to unwrapUVW you might need to expand the scripts or state they only work in very specific ways. Now that I know they're very specific tools I'll stop trying to use them on non-editable poly objects =)

    It would be awesome if they worked on other things. Maybe some kind of check and conversion is in order? Maybe just a warning box that tells the users they're attempting to use EPoly ops on a editmesh and that they need to convert/collaspe as nessesary before they'll work?

    *being treated as editable mesh?

    **"--Runtime error: EPoly operation on Non-Editable poly:Editable Mesh"
    renderhjs wrote: »
    (probably a max2009 user)
    + Creative extensions. Have access all the way back to 7 (on a seperate machine at work) if you need me to test anything I can but it sounds like you've got that covered?

    Keep pluggin away the new UI stuff looks pretty cool. I think tabs would rock but be prepared that people might want to dock it horiz or vert like the 2010 ribbon. A guy by the name of MrBlueSummers (forget his real name, he's stopped by here a few times) was creating a ribbon for 3dsmax called "spice rack" which he stopped working on as soon as they announced it for 2010. Personally his ribbon was shaping up to be more robust and more customizable. I'm not sure if it would be of any help? Probably not worth tracking the guy down only to hear his dreams where crushed...
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Hmm, using flash? You could do that in maxscript too. Might be easier to add buttons or have auto-generated buttons :P
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    yes flash, its just that I know flash action script for almost 10 years, so there are no limits for me there in terms of execution. In maxscript on the other hand however I noticed for example changes in max2010 that don't let me work with customized image buttons by slicing non linear sprite sheets.
    Its a experiment anyway - it might as well never make it into this project.
  • CompanionCube
    Options
    Offline / Send Message
    CompanionCube polycounter lvl 12
    was just wondering (sorry if this has been asked before, but this thread is really big), but is it possible to create a button on the toobar so that i can open the textool only when i need, i don't really like how each time i open max that the textool window is just floating around, i know i can minimize it, but would be nice if i could just have a button up on my toolbar which opens up textools or even if it was dockable so i could put it where the reactor toolbar usually is.
    also, i got to say i love this script, its so cool !
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    CompanionCube: yes is planned, and asked before :)
    will have to think about some ways to do it because I want to keep the usage/installation very simple, meaning just 1 *.mzp file to be executed once, or copied.
    I think I will add a table on my texTools website (renderhjs.net/textools/) with a list of things that I and or others want to see next added or fixed.


    today I have been working a little bit with the stitching stuff and discovered that max behaved a little bit odd with various selection types.
    So I ended up today with a script that filters any selection through the open edges of that shell. This comic/ illustration shows what I mean:
    converting_selection_to_open_edges.gif
    it will be added as a secondary mode on the upcoming stitch button (right click instead of left click) in the next release.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Nice man. Stitching has always been a bit weird yeah! Looking forward to this...
  • RodrigoB
    Options
    Offline / Send Message
    Great work render :D I love your script, it's really useful. No crits at all :D
  • Funky Bunnies
    Options
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    oh cool, it's such a small thing but it'll be so handy :D
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    max2010 killed today 3 recent max files and I am really MAD!!! right now,- which is why I dump the shit 2010 release (with its broken maxscript editor) from any of my projects including the texTools.
    As of now its officially not supported from my side anymore. Known bugs so far are a broken GUI in texTools as the new max fails at supported prior defined standards (besides many other things). The rest so far should work just like in max2009.
  • mLichy
    Options
    Offline / Send Message
    Yeah, I'm not liking max 2010. 2009 isn't bad, but some things about it annoy me.

    Anyways, the new stitch looks awesome, keep up the great work :D.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Oh damn... Really? I've been using Max2010 myself, and I had no corrupted .MAX as of yet.

    I've had some corrupted files in the past tho, but I always managed to recover my work, and I never loose more than 5 minutes of work, cos I use the .BAK, next to your .MAX file, and rename that .bak to .max, and you'll have a version of you scene from 5 minutes ago. I still use lot's of increments tho, you can never be too safe.
  • CompanionCube
    Options
    Offline / Send Message
    CompanionCube polycounter lvl 12
    you sure the corruptions are down to your computer? maybe you have some dodgy sectors on your hard drive. i've noticed Max can perform really buggy on certain computers, but work like a dream on others
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    [HP] wrote: »
    Oh damn... Really? I've been using Max2010 myself, and I had no corrupted .MAX as of yet.
    I've had some corrupted files in the past tho, but I always managed to recover my work, and I never loose more than 5 minutes of work, cos I use the .BAK, ..
    just to make it short: one scene was about 290 MB, having backup turned on would have driven me crazy as a single save took ~ 1min.. And the error happened when I was hitting simply save.
  • RodrigoB
    Options
    Offline / Send Message
    Been there myself, it's really frustrating and annoying. I haven't had any major trouble using 2010 tho but I did had a corrupted .max. It wasn't a real problem because I only lost around 10 or 15 minutes of work :P
  • mLichy
    Options
    Offline / Send Message
    When do you think you will release the next version?? :D
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    I gotta ask for this.. How about a good Copy and paste UV tool, or an automatic Similar selection tool? The one 3ds max provides is horrible.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    yup already got my attention, see also the thread by you:
    http://boards.polycount.net/showthread.php?t=63596
    I already had a look at the mapthief script:
    http://www.chuggnut.com/Scripts/mapthief/mapthief.htm
    and it looks useful and not to complicated
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    I tried it out but it didn't get what I expected. I dont really have time to place each object over each other and then use the tool and put them back in the same spot x40 times.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    thats where scripting comes in place ;) make a quick snapshot of the source mesh|UV and then combine it with the existing concept of the other script. Will have to think about the execution order (how to select source and then target with a minimum of interface elements if not just 1 button).
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    There is also similar elements in the same object, which is my case. Which is why I am looking for a poly selection UV copy and paste method.

    This was after I would try to copy and paste the uvs.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    you mean some instancing stuff,- brilliant push :D I always wanted that in UVlayout. Some script that fetches similar topology shell based on the current selection and apply the same unwrapping transformation to the other ones it finds.
    Might be a tricky one though, I will add it to my list I am adding right now to my texTools website

    and thank you for the screenshot, I always love that to see how other work and what they encounter
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    Poly boost has a select similar method as well. I don't see how it would be to hard either. Selecting similar edge length and number of edges connected, etc. The one that UV layout had was beautiful to me. But I was only able to use the demo.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    uploaded the table of current hot wish list / development items
    http://www.renderhjs.net/textools/
    most of the elements are linked to reference material or threads. If you have more suggestions post them here and I will try to add them to the list. That way I can better focus on what to do next and perhaps what to merge or can be developed together because they share concepts.
  • Tumerboy
    Options
    Offline / Send Message
    Tumerboy polycounter lvl 17
    I think working in some sort of simple transforms could be useful. U+V offsets and U+V Scale.
  • Mark Dygert
    Options
    Offline / Send Message
    Tumerboy wrote: »
    I think working in some sort of simple transforms could be useful. U+V offsets and U+V Scale.
    UnwrapUVWCoords.jpg
    Or maybe use the type-in "UV transform coordinate system" that is included? It operates just like the main 3dsmax coordinate system.

    It defaults to scale but if you toggle one to move. You then type 1 into two and hit enter it then nudges it over one unit. But maybe a new flashy UI is in order since everyone keeps missing this ha!
  • Mark.N
    Options
    Offline / Send Message
    Even just a button that moves the selected shell over by 1 in U/V space would be nice. For some reason mine always tends to pick up on mouse scrolls and tends to really screw my UVs up if I don't constantly toggle it off and on.
1568101114
Sign In or Register to comment.