PDA

View Full Version : Stitch elements / edges


Papigiulio
01-13-2011, 01: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.

http://img140.imageshack.us/img140/6355/stitchuvw01.jpg


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!"
)
else
(
for o in selection do
(
max modify mode
theMod = unwrap_uvw()
addmodifier o theMod
(modPanel.getCurrentObject()).unwrap.edit();
themod.setTVSubObjectMode 1
max select all
vertcount = themod.getSelectedGeomVerts()
for i = 1 to vertcount do
(
i.stitchverts
)
-- themod.weldselected()
)
)
)

stigatle
01-13-2011, 05: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.. :)

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

find attached

stigatle
01-13-2011, 05: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?..)

Papigiulio
01-13-2011, 06: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

Papigiulio
01-17-2011, 11:09 PM
...anyone?

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

Papigiulio
01-18-2011, 01: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, 01: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.