View Full Version : Unfolding UVMesh
j3st3r
06-26-2008, 04:47 AM
Hola,
Here's a script I made to unfold a mesh according to the UV (i.e. the assigned texture is actively using). The main reason is that in game development it allows you to build up details on the plane unfolded geometry to create normal map, etc. It works perfectly on Vista, and any geometry, hopefully it ill work on each OS (capable of running vbscript).
Feel free to use, and comment.
I used it for unfolding motor suit, then build up small details, like cushions, seams, badges etc. It was fun to write it and fun to use it.
http://w3.enternet.hu/matefy/UnfoldGeometry.vbs
and a shot, what is it all about:
http://w3.enternet.hu/matefy/Cap_4.jpg
thiago
06-26-2008, 05:23 AM
Looks nice! thanks for sharing j3st3r!
just if you plan to develop it further, you could have another command that put those points back to the 3d space.
That sounds challenging isn't it? :)
j3st3r
06-26-2008, 05:31 AM
Sure, Thiago. But I'm afraid that the nature of UV data storing is not a friendly to developments, but I'll do my best.
thiago
06-26-2008, 05:41 AM
Well that's not for sure. Was just challenging you :)
what you can do is compare this mesh back to the original one, and put the point array back to that position.
You can also add a property in your object that contains a string parameter, then you output the pointarray before you put it into the UV point position.
But all that would fall apart once you change the point index, and that's when it gets interesting... :)
But this is pretty neat already... I would never thought of just pitch the XZ against the UV and just let it go... lol
j3st3r
06-26-2008, 06:00 AM
The problem is that first I have to explode the mesh...I haven't find any command for selecting UV islands. Maybe if I don't explode the mesh, but find the border edges and disconnect them only, I could make a backtracking. But, maybe the sample index doesn't change at all, because the number of sample point are constant. Who knows...
I'll continue the script, you made me curious!
Cheers,
Jester
j3st3r
06-26-2008, 02:42 PM
To use it, a texture must be connected to the material of the mesh. Teoretically iut should work with 5.11
AceMastermind
06-26-2008, 02:55 PM
Yeah it works on Foundation 5.11, this site must not be updating, I was going to repost my results after another attempt.
Here is my result
http://static1.filefront.com/images/personal/a/AceMastermind/49730/alvkrdocbh.thumb500.jpg
Cool plugin, Nice work! :yes:
a SUPER Thank You for this, now its a lot easier to adjust Uvs and use ALL the modeling tools to adjust them like a way to Smooth UVs that will Work using the Smooth deformers.
Later its only a matter of making an UV projection of the flatened Mesh.
Once again THANK YOU :D
Sarford
06-28-2008, 08:12 PM
Smart thinking Sil3, I would have never thought of it that way. So thatnk you j3st3r and thank you Sil3 :D
Magian
10-09-2008, 11:58 PM
Are the four buttons shown in the screenshot the entire interface for this plugin? Does this work like a "pelt-mapping" solution where seams and pins must be defined?
Also, once this plugin is utilized I am assuming that I will still have the option of tweaking the UVs with XSI's native UV tools, correct? So I could use the plugin to quickly unwrap an organic mesh and then use XSI's relax tool along with other UV editing tools?
I apologize for my newbie-ish questions.
Darren
This plugin is not an UV Unwraper, what it does is creates a new Mesh that is Unfolded as your ALREADY made UV.
Read the first post carefully and it will make sense :P
Magian
10-10-2008, 04:13 PM
Ok, thanks.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.