Home Technical Talk

lscm/pelt unwrapping for max5/6/7 - working test!

polycounter lvl 18
Offline / Send Message
CrazyButcher polycounter lvl 18
hiya,
after seeing the max8 peltmapping vids, and doing a bit research on the topic, I found that wings3d and blender already have nice automatic unwrappers, using the same technique called LSCM.
http://blender3d.org/cms/UV_Unwrapping.363.0.html

both being opensource, I am currently working on porting the functionality to 3dsmax 5. The modifier will not allow to do the edge selection in it, since that is a bit too fancy work for now, but using macroscripts you "mark" the seams in regular editablepoly, however the modifier allows to highlight draw them.
So far I started the environment of maxscript/maxplugin combo, and next comes the actual lscm port. Not sure how it goes, but since many of you are probably on 6/7 I could need someone with a max6sdk to compile the plugin for it, or you could send me the max6sdk include/lib folder zipped. Still the plugin will be opensourced anyway

going to post some progress shots, although the port is more or less a "either it works fully or not at all" thing wink.gif So I hope to have something testable up in a week.

===========================================

EDIT: Check posts below for updates and working test version!

Replies

  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    If you get this all working nicely, I think lots of people might want to send you presents!
    I don't have the Max6 SDK though, sorry... I hope someone can hook you up with that!
    Good luck! smile.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    bump

    see EDIT above
  • Eric Chadwick
    CrazyButcher, this sounds promising!

    I wonder if the max7 demo comes with the SDK?
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    no clue, but does the demo actually allow 3rd party plugins ?
    last time I checked our university max installs didnt have the sdk either... I dont know how illegal it would be if someone sent me the headers and libs to compile it for 6/7, but without debugging capabilities it doesnt make much sense either.

    well once the 5.1 version works smooth, I am sure someone can be found to port it to 6/7. Likely the only main difference would be that 6,7 could allow more nice gadgets. kinda sucks that one cannot change line thickness or drawstyle in 5.1
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    bump, just wanted to mention that university machines have max6 with sdk. so I will be able to test + compile for 6/7 myself.

    also after a bit of a break with exams and enginecoding I found the time to do the unwrap code, the next test will have the unwrapping in it and hopefully comes end of the week. I hope that more people will give it a try when it's not only max5, as it seems like that didnt catch any testers
  • Bronco
    Offline / Send Message
    Bronco polycounter lvl 18
    Hey Butcher

    This sounds great man,good luck.

    If you can get it working for Max 6 ill try and give it a wizz...im not great with being introduced to new/modded tool sets and im also able to unwarp quite quick now with jsu the bog standard max tools....but if you can get this going ill definatily give it a try,proberly have to ask ya some damn stupid questions as well but I will give it a try none the less smile.gif

    good luck!

    john
  • Fuse
    Offline / Send Message
    Fuse polycounter lvl 18
    sounds really cool, good luck with making it work !
  • CMB
    Offline / Send Message
    CMB polycounter lvl 18
    bump...

    I wan't to test this out for max 7 when its ready.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    lscmtest.jpg

    okay after a day of debugging I got a build working. It lacks some features but should do the unwrapping.

    the screenshot lacks one seamedge, hence the non-classic box unwrap, but it shows how the lscm method treats such a case

    unfortunately I cant get the "weld all" function to work in the maxscript, so after the unwrap you will need to weld all uv verts manually.

    a test can be found on my website, I could not test under 6 or 7, but maybe it works (a max6 compile is in the package, and if max6 plugins work on max7 it should do the job too)

    3dsmax 5.1 / 6 / 7- Testbuild
  • Soccerman18
    Offline / Send Message
    Soccerman18 polycounter lvl 18
    I'm getting an error when Max starts says LSCMUnwrap.gup failed to initialize. Using Max 5.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Tested in Max7, it seems to work very well. The UI could be a little better, but it's OK.
    Having something to show which edges are seams constantly would be nice, I dunno if this is possible though.
    I tried it on a piece of model I had, marked the seams out, and tried the Unwrap - it went a bit weird, not unwrapped properly, but when I deleted it and pressed the button again, it worked fine.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    to Soccerman:
    I run max5.1 it works for me, you sure you have not accidently copied the max6 plugin instead of 5 ?

    to Mop:
    I assume that the "draw" doesnt work for you then ? because it does exactly that (as seen in the screenshots), constantly draws the seamedges of the current selected object.

    what do you mean with piece of model, and what have you deleted to make it work ?

    and what do you think could be improved on the ui ?

    without my own version of max6,7 to debug I can just hope someone else will have a look at the sourcecode. University machines have 6 and 7 but no msdev to debug.

    anyway thx for the feedback and glad it works on 7 at all. very weird that it doesn't load on 5...
  • pior
    Online / Send Message
    pior grand marshal polycounter
    Awesome CB!

    Just tried it under Max7, I'm very impressed by the speed of it. I first thought it didn't work cause it was just too fast for a Max relax tool! I think its much better and to the point than all those peltunwrap/relax features recently added.

    A few points:

    -The button labelled 'draw' is not very self-explainatory. I think everything would be easier to understand if it was called 'display marked edges' or 'display edges'. Its also a bit strange to have that display button positionned just like the 'mark' 'unmark'and 'select' ones which are operations buttons.

    -When marking its a bit annoying to have to move/refresh the viewport to see the actual masking. But I'm sure you know that already, it has to be complicated to implement.

    -How to weld the verts once an object is LSCM unwrapped? I hear you are working on that but hell I don't even know how to do that as a classic Max opeeration smile.gif Does it have to be done manually vert by vert or is there an option somewhere? (I'm using Chuggs extra UV tools so maybe they hide that option?)


    Again, excellent work man, way superior to everything that has been implemented in Max recently when it comes to fast UVmapping.

    Congrats! Can't wait for the next built wink.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    thx, but the real job was done by the blender3d guys and that opennl dude. I "just" ported it to max, but all the hard maths behind it was done by them...

    about the viewport, I will see what I can do, I dont remember it being a problem in 5.1, it could be that the way max7 "updates" viewport has changed or I was just blind hehe

    welding, well there is "weld selected" in the right click menu, the weld threshold you can set in chuggs uv 'options'.

    and thx for the feedback on the ui, when I find time I will look into making proper icons as well. I mostly thought people would use the other macroscripts in right click menus to actually toggle drawing, marking... I agree that the current layout is misleading
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
  • thomasp
    Offline / Send Message
    thomasp hero character
    i wanted to give this a try on a real project. sadly, max 5.1 complains about the dll as well, regardless if i copy the max5 or the max6 one into the folder.

    edit: just tried on unpatched max7 - same result, dll fails to initialize.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    sadly I cant do anything about it, I only have one 5.1 license, and I tested under winXP and win2000, both worked well.
    is there any more messages you get ?

    it's weird that it works for some and not for others (well actually typical for pc) I wish any of you would be part of a bigger studio, where some coder exists that could have a look at it. the source is in the download package, too.

    EDIT:
    I read at sparks, that you need to have the vc7.1 runtimes.
    maybe this helps: http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71d
    or
    this one
    http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71


    copy that into your 3dsmax dir

    if that does the trick, then please tell me smile.gif and I will bundle it with the download.
    if not try to add more vc7.1 dlls to maxdir.

    you can get them from the same place:
    msobj71.dll
    mspdb71.dll
    msvcr71.dll


    it would be great if you can find out which are required.

    and if all fails, I am screwed. but I think this must be the reason.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    the auto collapse is not yet in, sorry. but you can always select all + weld selected in the opened uvw unwrapper. however you need to tweak the weld-threshold yourself.

    I will use the feedback so far and do a new build this weekend. hopefully with the auto-weld
  • Soccerman18
    Offline / Send Message
    Soccerman18 polycounter lvl 18
    Probably a stupid question, but how do you use it? I tried running the .ms and .mcr files, did nothing, and I'm not seeing a modifier or anything in the tools menu.
  • thomasp
    Offline / Send Message
    thomasp hero character
    thanks! i'll try those vc runtime dlls - and no, there's no further error other than the dll-not initialize-stuff. os is win2k. there's no way i can risk patching max in the middle of a project though, been there, done that - and suffered big time wink.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    its a macroscript, you will need to use "customize ui" and either assign keys or create icons for the macroscript yourself.

    also if installed properly, you dont have to run the scripts manually, as they will be auto executed on start.

    I think max help actually tells you how to use macroscripts.

    there will be a "CrazyButcher" category in the list of max categories, and in them is the LSCM Central, which will open the menu.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    lampoly, thanks for those images.

    1) the lscm has no "memory", so it doesnt know how you adjusted them.
    however you might notice that currently two checkboxes are greyed out, which would allow you to "lock" vertices, or operate only on selected uv-faces. I am currently quite busy on other stuff, so I couldnt find time yet to code the support for those, but it is planned for sure.

    2) yeah I can add those
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    A new version is out, it allows locking vertices/operate only on selected faces of the last unwrap modifier in the stack. Also the auto-weld is in.

    it also comes with the needed dll in case anyone has problems with the plugin.

    thx for the feedback guys, and keep it coming.

    lampoly, I decided not to add the ring/loop stuff, as I would like to keep it minimal. The user can always customize his quads/toolbars to fit his needs regarding favorite selection tools (tools I probably dont have in max5).

    http://crazybutcher.luxinia.de/code/_3dsmax.html
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    Thanks Crazy for this great tool! You may want to also bundle it with msvcr71d.dll since msvcp71 alone didn't fix the error. Thomasp I'm running win 2000 and all I had to do was copy msvcr71d.dll into max dir to get it the tool to run fine, I did not have to reinstall it. You should easily be able to see the dlls you need by looking in the max dir. Later.

    Alex
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    the "d" version is the debug runtime, the new release is compiled as "hybrid" hence relies on the non "d" dll.
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    Good to know, thanks wink.gif

    Alex
  • Ruz
    Offline / Send Message
    Ruz polycount lvl 666
    I tried a quick test of putting a seam down the back of a head and unwrppapwd and got similar results to wings 3d, but got a bit of weird distortion around the mouth and ears.
    But on things like arms and legs worked perfect. Nice tool and seems simper to use than the max 8 verison.
  • thomasp
    Offline / Send Message
    thomasp hero character
    i just tested the new compile briefly on max5.1, and copying the dll you supplied this time to max's root made the difference.

    unwrapping results seem very comparable to blender's indeed. also, a working relax would be more than handy.

    i dislike the strange and - as usual - rather inconvenient procedure in max8, too. wings3d's unfold gives me the creeps - seems it only works reliably with meshes that follow the nendo-ish boxmodelling rules (only closed surfaces, no intersections, etc). with stuff imported from max, it bombs quite often here. so, thanks for this cool tool and bring on those improvements, crazybutcher laugh.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    Ruz, I just uploaded a new version (changed the weld threshold handling)

    you very likely will need to lower the weld threshold (moved it to options). spinners in maxscript dont allow a lot precision behind the comma, so as workaround now the value you enter internally will be divided by 1000. I hope the lower thresh can fix it.

    thomasp, unfortunately due to time constrains, likely I wont find much to put a bigger feature in it any time soon.
  • Ruz
    Offline / Send Message
    Ruz polycount lvl 666
    yeah seem to have the same problem. around the open seams of the mouth, lots of weird distortion on the face I unwrapped and the verts around the ears stretching weirdly.

    it like the nose has and mouth have shrunk too much horizontally.
Sign In or Register to comment.