The jQuadrangulateCloth tool thread

2

Replies

  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
  • myclay
    Offline / Send Message
    myclay polycounter lvl 5
    is there a chance for testing the standalone version?
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @Burpee @pasha_sevez
    You're welcome! :)

    @myclay
    Sorry, the standalone version doesn't exist yet. That will have to wait a while. :(
  • Heorogar
    Offline / Send Message
    Heorogar polycounter lvl 10
    Hey JacopoS! Im running maya 2018.5 (new update that just came out), and when I put in the Mel Command in the user doc its just crashes. I see the node popup in the inputs and then BAM hard crash. 

    I made sure the UVs are all in 0-1 space, Unwelded, Thin, and separate objects. Not sure what Im doing wrong. 

    Thanks man!!! 
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @Heorogar
    Oh crap! :D

    Do you have zippers or pipings or stuff like that? If so, make sure they're turned off while exporting.
    Also, you wrote "separate objects" in your comment. Is that the case? If so, I would recommend "single object".

    You can do a few different tests:
    one would be to call the command without fill: "jQuadrangulateCloth -f off". That will prevent most of the computation reducing the risk of a hard crash straight away. If that works, it means it's a matter of instability of the current version of the plugin. You can try modifying the density and switch fill back on and cross your fingers.

    Another thing you could try is to test it on a super simple case and see if it behaves properly. If it does, it means there's something about the case you tested before that gets it confused...

    Let me know what you find!
  • Heorogar
    Offline / Send Message
    Heorogar polycounter lvl 10
    Ill try that!!! Thanks so much for getting back to me! Ill test this out and ill post my findings! 
  • Dumbanana
    Offline / Send Message
    Dumbanana polycounter lvl 8
    Happy to see this tool released! Just tried it out on a fairly simple mesh from MD and it worked flawlessly.

    One thing I would love is the relaxation aspect of the script to be a standalone for use with other manual retopo meshes, if that makes sense.

    Great job!

  • throttlekitty
    Offline / Send Message
    throttlekitty Polycount Sponsor
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @Dumbanana
    Thank you! I'm glad it passed the test!
    About the relaxation, I think I should be able to do that provided that your retopo mesh shares the same UV layout as the original mesh. I'll keep that in mind next time I go back working on this. :)

    @throttlekitty
    You're welcome!
  • Heorogar
    Offline / Send Message
    Heorogar polycounter lvl 10
    JacopoS, i tried the command "jQuadrangulateCloth -f off" in the mel line and it still crashed on me a few times but now randomly it started working LOL! Maya does what Maya wants I guess! Thanks for that! I think the -f command helps and then i can go into the node and set it to on with no issues.

    Thanks man! 
  • throttlekitty
    Offline / Send Message
    throttlekitty Polycount Sponsor
    @jacopoS I did some simple tests and got some crashes, not worried about it yet. When you say that it only works on MD output, what specifically is it looking for in a mesh? Just trying to get a feel for what I can get away with here for non-MD models.
  • shogunato
    Offline / Send Message
    shogunato polycounter lvl 8
    Hey JacopoS
    I wanted to give a try to your sript on maya 2017 but maya say it cannot find the  procedure "jQuadrangulateCloth;"
    i have placed the correspondind 2017 file into maya plug-in. Can you help
    Many thanks !

  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @Heorogar
    That's strange! It should either work or chrash consistently! Oh well... I hope it's not being too frustrating.

    @throttlekitty
    First of all, it looks for boundary vertices. So, if you are trying to feed it non MD meshes, make sure it's not a continuous solid.
    Then it looks at the UVs. But if there isn't exactly one UV per vertex, the current version just breaks. If all of that passes, then it looks for harsh corners in the UVs. For now, that simply means every angle greater than 30° is a corner.
    Those are the things that it looks for while it initialises itself.
    Also, it creates a little acceleration structure for reprojecting vertices on the original shape. But that's a temporary implementation and it's very rough around the edges. That's what crashes the application with UVs outside [0-1].
    If you keep those things in mind, it might work with non MD meshes.

    @shogunato
    I think you might have forgot to load the plugin from the plugin editor. Let me know it that's not the case.
  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    tried it out without any luck in maya 2018
    importet a simple md mesh "single unwelded thin"
    selected it, called console with "jQuadrangulateCloth"
    than this popup appears with text:
    "Fatal Error. Attempting to save in X:/Users/MyName/AppData/Local/Temp/MyName.20181204.1553.ma"
    and it crashes :/

    ps: also calling "jQuadrangulateCloth -f off" did crash it
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @goekbenjamin
    Oh that's no good. I was expecting it to at least handle simple cases no problem... :(
    Would it be ok for you to share the obj you're testing on so that I can investigate the issue?
  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    jacopoS said:
    @goekbenjamin
    Oh that's no good. I was expecting it to at least handle simple cases no problem... :(
    Would it be ok for you to share the obj you're testing on so that I can investigate the issue?
    Sure! Maybe it is just my mesh that is f**ked up :D

  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    Ok I see the problem: the UVs are way beyound the [0-1] domain.
    When exporting from MD, try to switch on the option "Unified UV Coordinates". I just didn't realize that would make a big difference and forgot about specifying it in the doc.
    MD usually sets your UV space automatically but it's possible to specify it manually. If you want to learn more about that, take a look at this video: 

    Once you sort that out, it should work.
  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    Oh ok, so "Unified UV Coordinates" does fit and shrink all uvs into 0-1 uv space? And this 0-1 uv space is needed for your tool than!

    Thanks alot for sorting this out! I will try it as fast as possible, and give a response if it solved the problem.


    Edit: i just saw it is also stated in the pdf, that non 0-1 uvs will lead to a hard crash actually, sorry for bothering you :-)
  • OccultMonk
    Offline / Send Message
    OccultMonk greentooth
    is there a 3ds max implementation of this or something simular?
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @goekbenjamin
    It's no problem.
    Yes, the 0-1 UV limit is a pretty bad inconvenience in this build. Sorry for that everyone!

    @OccultMonk
    There is no 3ds Max implementation. A standalone version is planned but you'll have to wait a while for that.
  • onionhead_o
    Offline / Send Message
    onionhead_o polycounter lvl 10
  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    @jacopoS hey i tried it again with "unified" uvs (which does not quite work as i guess?)

    MD Export settings (i just exported that highlighted one)



    that is waht i get when i import it into maya,
    isnt that a bug of MD that the uv is not inside og 0-1 space?


    i tried with uv with above position, and also inside 0-1 space, but still i got this error,
    i select the mesh, than type jQuadrangulateCloth  into the console and hot enter:

  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @onionhead_o
    You're welcome!

    @goekbenjamin
    I'm not sure it's a bug. I think you should just click the "Edit UV" button in MD before exporting. A little dotted rectangle should appear and it should surround all of your patterns.
    I guess the correction you've made inside of Maya would work as long as you make sure to leave at least a little margin around your UV island. If you let it touch the borders, you still run into the risk of precision errors. So I would test that again but this time scale your UV island down so that it doesn't touch the borders.

    I promise I'll fix this shit one day but for now just bear with me guys.
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    @jacopoS Found one more restriction - it doesn't like the flipped UVs.
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @pasha_sevez
    Yea you're right! That would confuse it quite a lot!
    Also it wouldn't work correctly if you have UV islands on top of eachother. I think that wouldn't cause a crash but it would do the reprojection all wrong.
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    @jacopoS
    Honestly, I'm really impressed with what your plug-in can do. From my standpoint, it's a real game changer for those ones who have to deal with marvelous designer and clothes production. Neither software can offer a clean re-topo AND the vertices aligned on the seams at the same time. It's only can be achieved via tedious manual work. So I'm looking forward to see you making it a robust and stable production tool (right now it's more like walking on a minefield ^^) to let us use it at full potential.
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    Also minor bug report - it generates the double faced geometry in no-fill mode.
  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    jacopoS said:
    @onionhead_o
    You're welcome!

    @goekbenjamin
    I'm not sure it's a bug. I think you should just click the "Edit UV" button in MD before exporting. A little dotted rectangle should appear and it should surround all of your patterns.
    I guess the correction you've made inside of Maya would work as long as you make sure to leave at least a little margin around your UV island. If you let it touch the borders, you still run into the risk of precision errors. So I would test that again but this time scale your UV island down so that it doesn't touch the borders.

    I promise I'll fix this shit one day but for now just bear with me guys.
    No worries! Thanks alot i will try it with margin on the uvs! Thanks for sharing it with us!
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @pasha_sevez
    Thank you! I really appreciate your feedback.
    I realize in the current state it's demanding way too much caution. But it was either that or letting you people wait much longer 'cause as I mentioned before, I won't be working on this for some time. So I figured I would just let you try it already.
    I'm not sure what you mean with the "double faced geometry". Can you show me that?

    @goekbenjamin
    You're welcome. And thank you for being patient!
  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    i think i have to wait for another version xD
    now when i try it, it just loads and loads and loads and freezes maya and its gui :D
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    jacopoS said:
    @pasha_sevez
    I'm not sure what you mean with the "double faced geometry". Can you show me that?
    My bad! Double checked it - it seems to be kinda my bug :smile:

    But I've spotted another repeated problem with mismatching vertices on the seams.




    Attached a sample OBJ for your tests.
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    Hey @pasha_sevez
    I was investigating the case you sent me. I'm a little bit baffled: there's definitely something weird going on in your base mesh. Maybe you could double check the stitchings in the shoulder area and make sure they end up in the right point.
    However, that doesn't really explain why it's behaving so dumb. In this specific case, I would expect it to ignore the issue...
    I'll keep this obj for further testing. I think it's going to be very helpful for debugging.



    @goekbenjamin
    Sorry it didn't work for you. If you want, you can throw the obj at me so that I can investigate the reason why it's not behaving as you expect and make sure to fix that problem in a future release. :)
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    jacopoS said:
    Hey @pasha_sevez
    Maybe you could double check the stitchings in the shoulder area and make sure they end up in the right point.

    Checked. Everything's fine there.



    Also found one more non-critical, but persisting bug on a specific cloth - border skewing.


  • nymbis
    Offline / Send Message
    nymbis polycounter lvl 10
    Thank you JacopoS!
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @nymbis
    No problem!

    @pasha_sevez
    I don't know about the first case you sent. But I can tell the second one is clearly a stitching problem.
    If you go back in MD, you'll realize the stitchings aren't snapped in the right point.
    The algorithm is working fine on that front. It's simply catching up with the fact that those pattern corners are misaligned.
    However, the end result is made a little worse by the fact that the current build will neves subdivide things in odd numbers. So it's basicly putting two extra subdivisions around there instead of just one.
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    @jacopoS I see. Thanks for clarification!
  • justin1230
    Hi, strongly recommend trying "jQuadrangulateCloth -f off" if you face crashes, the successful rate is higher.  :D 
    But some of the vertices somehow move to the origin.
    Am I doing something wrong? I already take out the bows.


  • goekbenjamin
    Offline / Send Message
    goekbenjamin triangle
    I thought it may could help you sort bugs out:

    pasha_sevez and it worked the first time, and the second time, after playing around with the node values it crashed again.
    Restarted maya, imported the obj executed the command it crashed again.
    I than exported something from MD, aligned the uv to 0-1 space (i dont know why MD does not align it when exported with "Unify") and it worked again,  after playing around with the node values it crashed again.

    I randomly seems to crash on me.

    The times it works, the retopoed mesh seems pretty damn good!
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @pasha_sevez
    No problem :)

    @justin1230
    you're most likely not doing anything wrong. Vertices go to the origin when for any reason they end up outside the boundary of the UV island.
    I'd be curious to see a before and after of the affected UV islands. That might help me understand why the vertices fall outside the boundary.

    @goekbenjamin
    I guess that's something. At least you were able to see a result.
    If you're trying scrubbing the density slider (like I was doing in my last gif), that would make the plugin face thousands of different cases and the chances for a chrash are much bigger. So I'd recommend avoid doing that and just input the values by typing them.
  • malcolm
    Offline / Send Message
    malcolm Polycount Sponsor
    Would this work on rocks?
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 8
    malcolm said:
    Would this work on rocks?
    Yes! You just have to assign uvs and cut the geo along uv seams.
  • goekbenjamin
    I think this may help you too:

    i have this jacket:


    after executing your script, part of the mesh and uvs are gone:

  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @goekbenjamin
    I see: some patterns have their UVs flipped. So, the program interprets those as holes instead of patterns. That's something I'm already planning on fixing along with all other UV related issues. But for the time being, this won't work properly with flipped UVs.
  • goekbenjamin
    @jacopoS in the meantime how can i prevent this without having to change all or rebuild all that again?
    I did not tried it, but maybe i just delete all uvs, and re-uving it again, would that help to prevent "throwing away my mesh"?
    -----
    after this post i actually had to try it myself!
    i deleted the uvs, and since it is unwelded i could:
    - UV -> Create -> Planar



    and DAMN, the rows actually does line up! :D



    what black magic is this?! ;)
  • jacopoS
    Offline / Send Message
    jacopoS interpolator
    @goekbenjamin
    I'm glad you got a result that works in the end! :)
    I wouldn't recommend to recreate the UVs from scratch. you could simply flip them instead.
    Just select the entire UV shell you want to flip and use the dedicated command in the UV toolkit. This way you don't need to redo stuff that is already there.
2
Sign In or Register to comment.