UV Unwrap on the way
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
UV Unwrap on the way
I found some open source code, OpenNL with sample code for unwrapping uvs. Original sphere on the left, export/import in obj format from the modified sample code shows the unwrap on the right and the other 2 spheres in between show my attempt at apply uv directly. Maybe have something done by next week.
-
Cellulo
- Lieutenant
- Posts: 927
- Joined: 27 Sep 2012, 07:48
- Type the number ten into the box: 9
- Location: France
Re: UV Unwrap on the way
Cool Clintonman, you can also found the source code of Roadkill 1.1 based on blender technology unwrapping here , maybe it help you or no:
http://www.box.net/shared/static/gqlk7hi5ia.zip
http://www.box.net/shared/static/gqlk7hi5ia.zip
-
nigec
- Master Chief Petty Officer
- Posts: 561
- Joined: 21 May 2009, 18:46
Re: UV Unwrap on the way
I think there's a Sketchup plugin which uses the same idea
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
Re: UV Unwrap on the way
Very nice, Clinton!
Looking forward to it!
Looking forward to it!
-
Rhino169
- Senior Chief Petty Officer
- Posts: 201
- Joined: 29 Nov 2009, 03:15
Re: UV Unwrap on the way
Clintonman never ceases to amaze! 
-
Draise
- Captain
- Posts: 3200
- Joined: 21 Sep 2009, 19:33
- Type the number ten into the box: 0
- Location: Bogota, Colombia
Re: UV Unwrap on the way
WOAH WOAH WOAH.. Will you implement this into TS?

-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
Got it working so it doesn't need to export/import an obj file. Truespace doesn't have any seam marking so I apply a morph then use the cut edges tool. Cut edges doesn't always cut all the way so I reshape the mesh to be sure the cuts are full, do any extra cuts then run the unwrap. If it looks good then choose the default morph and heal the mesh. The process is a little awkward. I think if there is some way to indicate where the cuts are it would be a little easier. It also unwraps big in the uv, way outside the 0-1 uv space so that needs to be reduced.
-
Draise
- Captain
- Posts: 3200
- Joined: 21 Sep 2009, 19:33
- Type the number ten into the box: 0
- Location: Bogota, Colombia
Re: UV Unwrap on the way
Is there no way to select the edges you want to cut along, "add to cutlines" into a memory bank, then with another button make it recall and "select cutlines" to then modify them later??? Once you have "add to cutlines", which would be in the memory, it would use those lines to run the unwrap seams?
Or do you literally have to cut your mesh with a "Split Edge" or "Cut Edge"?
Or do you literally have to cut your mesh with a "Split Edge" or "Cut Edge"?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
Sometimes it changes the mesh so that the edge you select doesn't exist anymore after the cut. If you save the selection and reselect you get something different.Draise wrote:Is there no way to select the edges you want to cut along, "add to cutlines" into a memory bank, then with another button make it recall and "select cutlines" to then modify them later??? Once you have "add to cutlines", which would be in the memory, it would use those lines to run the unwrap seams?
Or do you literally have to cut your mesh with a "Split Edge" or "Cut Edge"?
I chose to cut the mesh because that's the easiest way to do it. Otherwise I have to write a bunch of specialized code to virtually break up the mesh and then combine the result back to the original mesh. The cutting process isn't as awkward as I thought. Most of the time a useful selection exists after the cut and the edge can be moved immediately after the cut. I thought there was no selection because it disappears visually.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
It looks like it's possible to make triangle selections and just uv those triangles. The only thing is that it looks like pe mode changes the triangles. Image shows before and after. The lower numbers are the original triangles. I tried to unwrap triangles 16 and 17 but then triangles 30 and 31 became 16 and 17 and they got the uv change.
I think the way it will work is like Draise said only instead of saving edge selections it will save triangle selection information. Next would be running the unwrap outside of pe mode. The ideal solution would get the selection, exit pe mode while the plugin is running and then update the uv. Otherwise it will have to be a combination of script and plugin to make it happen.
Advantage is it can do it without cutting up the mesh.
I think the way it will work is like Draise said only instead of saving edge selections it will save triangle selection information. Next would be running the unwrap outside of pe mode. The ideal solution would get the selection, exit pe mode while the plugin is running and then update the uv. Otherwise it will have to be a combination of script and plugin to make it happen.
Advantage is it can do it without cutting up the mesh.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
Thanks for the link. It has some good stuff in there. If I decide to make a really good uv unwrap in the future I'll use this as the starting point. I will just use the code I already have for this first version. It's limited but much simpler.Cellulo wrote:Cool Clintonman, you can also found the source code of Roadkill 1.1 based on blender technology unwrapping here , maybe it help you or no:
http://www.box.net/shared/static/gqlk7hi5ia.zip
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
I haven't done much this weekend but I got the new Make Human program destroyed the uv with a cube map and unwrapped the head. The 2 islands next to the face are the insides of the eye sockets, the one at the bottom is the inside of the mouth and the uneven bit is a portion of the head with both ears. I was using some of the meshes included with trueSpace for testing but something in the old files would cause crashes when I needed to cut the edges and when I did succeed the unwrap looked bad. It still needs to scale the uv values down to a good size and it needs error checking to prevent crashes, but it is coming along better than I expected. It might actually be useful when it's done. I could not have said that a few days ago, it was looking pretty bad at that time.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
Not going as well as expected. It looks like the base code is a lot more limited than I thought. I tried unwrapping a hand from the make human model and it was terrible. The quality is determined by the mesh orientation. That should not be the case at all. The next step will be to study the Roadkill code.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: UV Unwrap on the way
I couldn't get any meaningful result from roadkill. As far as I could tell I'm feeding it the correct data, but it just doesn't work. Must be some incompatibility in the code with tS. So I went back and took the simplistic code from before as far as I could. It works well for simple shapes. For more complex meshes I'll be using Blender or Roadkill.


