Hey guys,
this thread is about a tool I've been developing lately. The tool is called jQuadrangulateCloth and it's ment to easely generate a full-quad version of a cloth model out of Marvelous Designer to be sculpted inside ZBrush.
A few months back, I started working on a personal project for my portfolio. That is a character art project and, just like many other projects alike, it involves the use of Marvelous Designer and ZBrush.
I realize many of you already know a good enough way of taking a 3D model out of MD into ZBrush for sculpting. That involves exporting the flat version of the model, ZRemeshing it inside of ZBrush, then taking the result into Maya and using the "transfer attributes" feature to resume UVs and then again to get the model shape back. The result of such process will be a full-quad model that is going to be good enough for sculpting inside of ZBrush. You'd be able to change things around and add more details on a mostly clean topology.
While trying out such workflow, though, I realized it was far from ideal. First of, there would be no way of merging the seamings together, making the sculpting phase less practical. Also, the topology wouldn't always be as clean as it could and the topological symmetry would very likely not be respected. Not to mention the process itself is not very convenient.
I just felt like a much better solution could be achieved. It would just require some coding skills and a bit of will power. So I set down and started coding.
I decided to show my tool progress as well as my character art progress together in the same thread since I feel they are somewhat related: I do coding so that I can overcome some issues with the workflow I'm using. And I think that could be interesting to see for those who like the character I'm working on.
Now, just a quick recap:
april 15th 2018 - I showed the gif below for the first time on my character project thread. At that time, this tool was nothing but a proof of concept. It didn't really like to run on generic cases.
april 28th 2018 - I focused on writing the feature that would ensure the vertices are mergeable across all seams. Although at this point I was not taking into account the case in which more than two panels are being stitched together (non manifold seamings). That's still something I have to take care of.
may 13th 2018 - I got rid of most of my old dumb quadrangulation algorithms to make room for newer, smarter, more generic ones. Although the new algorithms are a big improvement over the earlier iterations, they're still far from being able to handle any general case. They still need a huge amount of care.
So, after working on this tool for a while and showing all of that good stuff on my character thread, I just had to take a break and go back to work on the actual character art.
The community showed a lot of love and interest for my tool. That's great. Only I didn't consider the fact that not everybody are interested in seeing the character progress. That's the reason why I decided to create this thread so that those who are only interested in keeping up with the tool development can have a space dedicatod to just that.
I'll keep posting some updates related to the developement of this tool on the original thread for those who likes both sides of the topic. By the way, here's a link to it:
Sharp Edge (a game character)------------------------------------------------------------------------------------------------------------
Some stuff you might want to ask:
What's next?I'm planning on keeping developing this tool as I go along with the developement of my character. That involves going back and forth between those two things. Since I'm an artist to the core, I don't really like to focus on the coding side of things for too long without seeing the benefit of it on my art. Therefore, don't expect a constant stream of updates. Most likely there will be some long periods of silence along the way. Please, be patient.
Are you going to share this tool?Yes, actually I'm planning on releasing it for free. I feel like this would benefit both the game development community and me in the long run.
When will this be ready?Don't know. Don't expect it to be out before september 2018. Most likely later. You need to realize that I'm not working on this stuff full-time.
Also, keep in mind that so far I only showed the best case scenarios. Since I want to look cool, I'm not showing how many bugs are there. Just trust me when I say it still needs a lot of work before I can release it.
What if I'm not a Maya user?You might have noticed that I'm not referring to this tool strictly as a Maya plug-in anymore. That's because I was carefull enough to keep the Maya code decoupled from the core functionality of the program. In simple terms, it should be possible to create a stand-alone version of this tool with the same exact functionalities as the Maya plug-in version.
Can I use this tool to quadrangulate anything?Just learn topology, son!
------------------------------------------------------------------------------------------------------------
Now some good news for those who can't wait to see more: I'm quite close to a point in which I have to develope this tool further to overcome one of it's limitations. So, I guess the next update is not too far ahead.
See you then.
Cheers!
Replies
thank you!
@musashidan
yes, you can export quads from MD indeed. The problem with that is the topology will come out all messy.
below you can see an example of the same model I showed before exported directly from MD as quads. While sculpting in ZBrush, this kind of topology will have a tendency to show artefacts.
And the name sounds bad, I know. Let's just say it's "descriptive". It will stay for the time being at least.
In the meantime quickest way around it is to get welded fbx from MD, autogroup with uvs in Zbrush then Zeremesh with keep groups . This will give you decent topology from Zremesher and will allow to get good uvs if you will unwrap in UVmaster with polygroups on. Good luck!
Thank you!
@danielgalanty
Sounds like a good compromise. The topology would come out more or less clean depending on shape and folds but at least you get a welded result.
@musashidan, @zachagreg
Thank you guys. That's very kind of you!
Well I'm considering uploading it on Gumroad allowing donations to be made. I wouldn't like to prevent people from offering a coffee or a beer if they so desire. I just have to check regulations for my country.
Anyway, I think my reputation would benefit from it regardless of the profit. It's all part of the plan.
@sparrow
That's nice to hear. Thank you! I'll try not to disappoint you guys.
I'm just dusting off my source code now. Probably going in full gear in the weekend.
Steve
Thank you! Good thing I like coffee.
@stevebarrett
You're welcome!
Now, a little bit of context on what am I working on:
The case below looks innocent enough but it contains a couple of features that the current build of the program would not be able to handle correctly.
The first issue is that so far I've been assuming that every corner is a convex corner. So, concave corners would come out all messed up.
And secondly, There's a non-manifold seam. That's still something that I have to deal with.
Thank you!
And the concave corner problem is out of the way. Now I can go to sleep peacefully.
Yea, no problem!
@BloodDream
Hehe thank you!
I'm making some slow progress on the non-manifold stitchings feature. But it's not there yet. I hope to have some good news to share in the weekend. See you in the next update!
More extensive testing and debugging is going to be required. But at least I got the program running as intended. That is always very rewarding!
And you plan to share it for free ? Big thanks ! And a little "donate" button on Gumroad will definitely help you to have some coffee.
Thank you! I can't wait neither to get a lifetime coffee supply!
@wilson66
I know nothing about the Modo sdk though...
Last week was a bit busy and unfortunately this one will be as well. So, that means slow progress on this project.
The next update involves me unbuilding and rebuilding some stuff in order to clear out some bugs and making the quadrangulation more flexible.
I hope that will see the light of day by the end of the week.
Cheers!
Following this closely.
How do you approach this type of problem anyway? Got any technical papers or anything like that on it? Would love an HDA for this in Houdini.
sorry for the long silence: some stuff came up and I was unable to focus as much as I planned. I'm getting back on track now although I'm far from done with making the quadrangulation general. I just felt like showing a little progress.
@TheDarkKnight
Thank you! I'll gladly take a whole dinner as long as coffee is included.
@Octo
I'm not ruling out the possibility that one day some version of this could be used to retopo something other than Marvelous Designer clothings. But I just don't want to think about it 'cause that would be way beyond the scope of the project.
As for the approach, I'm pretty much just taking the outline of each pattern, rebuilding it with a specific number of subdivisions, then slicing the inside in rectangular areas using some clever algorithms (but not so clever yet) and in the end just fill each rectangular area with quads.
That's the basic idea at least. I don't have any paper on it: I'm just naively improvising!
I did find this. http://peterwonka.net/Publications/pdfs/2014.TOG.Chihan.QuadExploration.final.pdf
Hey, thank you for the link! I just took a quick look but I think that might be super helpfull! And I can see some similarities with my approach.
Well, provided that you make some clean UV islands to separate the different areas, yes, it should pretty much work. Although at the moment, it expects the borders not to be welded (because it was quicker to code it this way) but that is something that can be modified at a later time.
@onionhead_o
Hehe wellcome back!
@SeveredScion @bhenriksson
Thank you guys!
Meanwhile, I modified the way polygons get distributed on the surface. It was pretty rough earlier and the result had a tendency to come out all stretched. Now it's much more regoular.
You can easely see the difference on the sleeve in the shoulder area if you check against the previous image.
it's been a while since the last update!
I just wanted to let you know that I didn't forget about this project.
Last month I decided to give priority to my character wip since I realised it was lagging a little too much behind schedule and I just wanted to focus on that for a while.
The good news is that lately I started working on this tool again. Basicly I started the process of taking it apart, clearing all the crap inside and refining it piece by piece. Then I'll put it back together, and hopefully I'll leave it on Gumroad by the end of october for you people to have fun.
So, you can expect some more updates in the upcoming weeks.
Cheers!
so, I'm not yet as close to release as I hoped. But I have good news nonetheless: the core quadrangulation algorithms are near completed and I'll be doing some stress testing and additional debugging soon.
Now the program can handle holes and general cases. It's not yet very reliable and it doesn't always produce the most pleasing result. But at least it gets the job done in most cases.
I still have to cover a few more exceptions. Then I'll have to fix some issues with the seam detection system.
For this to subdivide nicely you'd want the first interior edge to follow the border so you don't get "poles"
at the border (bottom left has this issue).
Also, sharp corners, that is over 90 degrees should terminate with both loops meeting at the same quad. (bottom right has this issue)
Also, the bottom left corner of the interior rectangle should look like the other corners and not stray off in another direction.
Here's my take on it. https://cdn.discordapp.com/attachments/422142587298775052/506886902620749825/unknown.png
lol, that's easier said than done! Remember I'm not the one that has to learn topology: the program is!
Actually, my program can do the kind of ribbon extrusion you're talking about just fine but you also have to keep in mind that doing so would constraint the quadrangulation domain and you'd end up with some dirty result anyway. And also, since I want to give the user direct control over the density, if a low density (bigger quads) is set, those extrusions might end up on top of eachother. That's a case you'd have be able to handle elegantly as well!
Anyway this is how it would look like with the border extrusion feature turned on:
Thank you, pal!
It's doing it's best to keep the number of poles low within the constraints defined by the boundary.
We're going to get there, you guys. I promise!
https://www.youtube.com/watch?v=1NufEhNK2Qk
Now, the program still needs some work. I still have to adress a big weakness in the way the seams are currently handled that might result in some odd number of subdivisions around boundaries. (that's bad!)
But the quadrangulator itself is getting more and more reliable each day!
yep, it's reasonably fast. But while stress testing it, it still crashes Maya way too often...
Also, I haven't tested it for generic objects. I'd expect it to just give you a middle finger!
Thanks dude!
This is the most complex tested case yet:
Crashes are not as frequent anymore and the program usually manages to find a solution for the entire surface.
With that said, still many things can go wrong and plenty of bugs are still lurking under the hood. So, for something as complex as the case above, I had to put some extra work myself in order to make it work for my needs.
At this point, I really can't afford to prioritise this "thing" anymore. I just have to move on with my other project. So, for the joy of everyone, I'm planning on releasing an alpha build (most likely the current one) very soon!
I'll make sure to document the shortcomings that I'm aware of. There are still quite many of those unfortunately... So, if you guys are expecting things to just work, don't send any coffe yet.
Cheers!
when you say " I just have to move on..." does this mean "you banish the project" or just "you put it to the side for later"?
just curious
It means I'll just put it aside for the time being. I don't know when I'll be able to go back to it though. I wish I could at least clear some of the bugs of the current build.
GIVE ME MOARRR PERFORMANCE!
Have fun!
https://gum.co/Qeoz
Thanks alot!
Do you value feedback?
Sure I do! But I can't promise I'll be able to adress all feedback.
As I mentioned a few times before, there's a lot to be improved.
@justin1230
ehehe I know...
Let me know if things are working ok or if you're having some trouble. This is the first time the tool gets tested on more cases outside of my own curated environment.