Sew Tool for ClothFX....


#1

Can someone, please, for the love of god, develop a better sew tool or a plugin to auto sew objects, perhaps with modeler type tools?

Would be great for an auto sew tool similar to merge points in modeler…or at least a way to easily tag points, perhaps with groups or parts, and have them sew together the closest points…

Ill pay you, im sure others would…
:smiley:

Cheers!


#2

I know what you mean - Sewing cloth is a cool concept, but manually sewing stuff sux…

I’d started some ‘LScript’ autosew tools, but I sorta stopped to do other projects, and didn’t go back - The idea was to identify two identical ‘vertices’ (ie. Cut and paste the polys along the edges of the sew, then select them all) in modeler, then run a script that could take those pair ID’s and generate the necessary sew info…

One approach was to create a small ‘setup’ scene file with the sewing info installed, then use ‘Load from scene’ to load it in. The other was to export the vertice ID’s and then have some kind of ‘sewer’ in Layout that read this data.

Both ideas I hadn’t worked through properly yet (the latter didn’t look easy since there wasn’t a Layout command to ‘sew vertice a to vertice b’ anyway).

However, if some crazy coder wants to think over those concepts and actually create what I was ‘thinking’ of, then that would be uber-cool…

Kev.


#3

hmm well any help would be great! theres no command in layout yet we use the sew tool in layout? :rolleyes:

please, SOMEONE, write this…

thanks


#4

No, there’s not…

I’m talking ‘Layout Command’ - An internal command - Sewing is part of the FX tool, not a Layout command itself from what I could tell… If it had been an internal command, it (maybe) wouldn’t be an issue to call it from LScript and write a Layout ‘sewer’.

Well, if I get time I’ll go back and review what I started… Its something I would love to have as well… We’ll see I guess… Otherwise perhaps LW9 will add something :smiley:

Kev.


#5

well i was toying with automating a few fx in LW, much like the preset fire, lightning, etc. in maya.

the only solution i came up with if you use LW dynamics and/or HV’s is to output your info to a new scene file in text format, then load that scene. there’s no other way to interact with them in Layout Lscript, since both dynamics and HV’s are ‘plugins’.

howard, will you post a test scene with sewing in it (i’m not near a computer with LW8) and let me look at the text?


#6

Hi bet you think you`ve got a stalker :scream:

this is a scene file with nodes

5-10
4-11
6-9
7-8

sewn together

in modeler point info the first point is 1, in clothFX the first point is node 0

but they follow the same sequence through the model

think you might be onto something here :applause:


#7

lol! Cool - Yeh, this is where I got to with regards to how to approach this one. I have some basic LScript that I started, but put to one side (ie. nothing really ‘started’, just empty LScript shells).

My approach was this:

  • Cut up mesh as necessary for sewing
  • Select the points to sew in order
  • Export scene with sewn data (as per the stalkers scene file) :slight_smile:

The concept is that its a tonne easier to select points en-bulk and process them in one click then to do it in Layout (obviously)

There were also two methods I was looking at for point selection/sew:

  • Select point pairs by hand in modeler
  • Autosew - Find matching points (same XYZ) and sew.

The way I see it, the ideas should be a piece of cake to implement in LScript… I’m even tempted to go back and finish those scripts now that its been asked for

But hey, if someone else wantes to write one, I sure won’t stop ya! You’ll probably do it before I get off my lazy behind anyway… lol! :smiley:


#8

could something possibly be done with Selection sets?

for instance - this is really simple - I made a plane with about 20 sections and one right down the middle deviding it into 2 parts. Selected the points down the middle and edge beveled them. cut out the center piece.
Of all the points on the left side of the cut i made them a selection set called SEW.Left. Selected in order from top to bottom. then i did the same thing on the Right side and named it SEW Right.

I wonder if a ‘sew selection set’ tool might be possible from this. the point info must be held in a section in the modele file. if its layed down linearly in the order the points are selected, and each selection set has the same number of points, wouldent it be possible to
sew them?

Just a thought at 5:00 am in the morning :slight_smile:

  • Will.

#9

a SAW tool? huh! all I ever wanted was a STRIP tool to get them OUTTA their clothes not mending them for them duh that would be what I would call sleeping with the enemy

duh! i guess 3d wasn´t ment for me


#10

Cheers guys! looks like youre onto something!
Work it :bounce:
I like the idea of selection sets, but worst case if i must sew points in order and sew, its still easier than right now.

My dream would be to crack an object into jagged pieces, and of course have the ‘sew all’ button…but …id settle for anything better than this :smiley:

So if theres a way to sew more random shaped pieces, rather than all on the X, etc… that would rock!

Thanks guys!

Thanks Lightfreeze, you cracked the code :smiley: seems easy enough to write out a data file based on which points are selected in modeller and write then into a scn file, or even better directly to layout through the hub? :slight_smile:


#11

guess what I went and did, been thinking of learning Lscript for a wee while now so I just dove in

STITCHER


#12

Thanks Lightfreeze! :smiley:
…lets test this baby out…

nice job mate!
hopefully more and more people will take this on and it will develop into a robust sewing tool! :smiley:


#13

very very cool!
guess what, you can select points from 2 separate layers and it will still work! :smiley:

this may be key to the solution of sewing randomly broken objects… :wink:


#14

Hey LightFreeze - Very Cool, dude! Great to see you take the initiative (and take a cool idea on as a first LScript too) and show up lazy bums like meself! :smiley:


#15

come on kev! show us what youve got! :smiley:

Is there a way to convert the Merge Points tool into a sew tool? :wink:


#16

thanks for the mention on the page, LightFreeze! having a look at your script now…


#17

Hey
no problem Jeremy, if you hadn`t mentioned looking at the scene file it would never have happened


#18

Working on another selection method where it unwelds and sews the selected points, so this test gave me 192 nodes but layout wasn`t very happy although it did calculate without crashing


#19

idea.

you know how the merge tool is proximity based (with optional numeric input)? what if the sew setup tool worked like this.

hit layout sew-merge.
options panel pops up, and includes the same options as merge:
layout sew-merge automatically
numeric distance input
scene file output.

so then the script detects what point is close to what point and arranges them for proper sewing.
then it detects the object file and outputs a scene file with just that object, and the sewing in layout done.

i’ve never done a single modeler script, but scene parsing/editing/outputting I do all the time. so Lightfreeze, if you or someone else can arrange the modeler portion (detecting proximity of points selected/all points, then arranging point id’s for sewing), i could no doubt do the easy part and put that out to a scene file format. :wink: what do you think?


#20

Here’s my quick update on what I’d started - Autosew - Not fully tested (seems to work) but should automate sewing for any identical points (ie. cut apart mesh, repaste back on top - Run script)

http://www.kevman3d.com/lightwave.asp?section=plugins&sub=modeler

Still needs a presaved ‘clothFX’ scene (Its rushed) - But should work.

Have a play - I’ll look at it more when I get more spare time…

Kev.