Lost Adventurer, Aleks Kirilenko (3D)
LC #42 Pipers Alley

View Full Version : Stitch elements / edges

01-13-2011, 02:56 AM
HNY Everyone ^^.

I have a problem with textured .3ds models. Whenever I import the models, the textures are always broken into small pieces, 1 per poly. As you can see from the image below.


Now I would like to make a script to Stitch elements together automatically by running through the edge count and one by 1 stitch the polys together..

For Example. I have a .3ds model of a plant with hundreds of leaves. Of course this is a pain in the arse to stitch one by one.

Is there a way to do an (preferably) EDGECOUNT IN UwvUnwrap and loop through that number with the stitcher?

So edge 1 ---> Stitch, Edge 2 ---> Stitch. etc etc

Ive tried using getselectVerticesByNode.count but that doesn't work

Here is a sample of my script of what I got thus far.

if $ == undefined or selection.count>1 then
format "select 1 object"
messagebox "Select 1 object" title:"Oops!"
for o in selection do
max modify mode
theMod = unwrap_uvw()
addmodifier o theMod
themod.setTVSubObjectMode 1
max select all
vertcount = themod.getSelectedGeomVerts()
for i = 1 to vertcount do
-- themod.weldselected()

01-13-2011, 06:07 AM
could you supply a test model? (the one in the picture for instance).
makes it much easier to help you on this one.. :)

01-13-2011, 06:12 AM
of course, no problem :)

find attached

01-13-2011, 06:19 AM
the error you describe in first post is not in the model you posted,
it looks perfectly fine to me. is it correct model you supplied? (or was it already fixed?..)

01-13-2011, 07:08 AM
Huh which error did I post about? I was just looking for a quick solution to stitch edges one at a time. :S

01-18-2011, 12:09 AM

01-18-2011, 12:18 AM
Why not just weld with a value of 0,01? Shouldn't that work on your example mesh?

01-18-2011, 02:42 AM
Ive tried that before and well that is the problem.

The uvws are on top of each other as you can see from the picture in the first post.

So when I weld the verts together, it will not only weld the one next to it, but also under.

So what im really looking for is a way to loop through all the edges 1 by 1 and then stitch em up 1 by 1..

CGTalk Moderation
01-18-2011, 02:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.