Anim8or Community
General Category => ASL Scripts => Topic started by: neirao on August 15, 2008, 11:55:08 am
-
Hello all,
some one can maker this plugin?
untriangulate faces of mesh..for 3ds objects import..etc..
(http://img164.imageshack.us/img164/5129/untrianglefaceskl4.jpg)
i think then if to change parameters of the "Remove useless points.a8s by Kubajzz" can work...
I use another application for make this..but be cool if Anim8or has this plugin script.. ;)
thanks All! :D
Neirão - Brazil
-
Hi Neirao,
I've heard about somebody trying to make that script before, but I guess he was not succesfull ??? It would be really nice to have that feature in Anim8or...
Unfortunately a script like this is much more complicated than "Remove Useless Points" script, it would take a while to write this one... I added it to my "TryIt" list, but I think this one is too difficult for me...
-
Thanks Kubajzz,
your script is excellent!
i´m work with others languagens of programation but i´m newbie in as8.. :)
possibly you or other member will obtain this too.
thanks again. you are great! ;)
Neirao - Brazil
-
Attached is a script for untriangulating faces.
It uses a parameter called "tolerance" that should be added by Object->Attributes... Click the "new" button, type "tolerance" (case is important), select float, and put a suitably small value like 0.5 as the value. The tolerance parameter is the measure of how "non-planar" the four points in the un-trianglulated face are.
The script creates a copy of the original mesh that is untriangulated. On the console output, it will output a list of all the tolerances found in the mesh to help you select the correct value for your mesh. If you select a tolerance that is too low, simply delete the created mesh copy, change the tolerance value by going to Objects->Attributes..., and re-run the script. Or you can delete the original mesh, change the tolerance value and re-run the script.
The script is not perfect. It often cannot determine the best adjacent face to combine with if the tolerance values are too high. It is often necessary to use repeated applications of the script with ever increasing tolerance values.
Please let me know your feedback.
-
Awesome script NickE!
That looks like a great script. I'm not sure it'll be the most useful for me, since I'm not often converting triangulated meshes to untriangulated since I haven't found a need yet, but that looks like a great addition to the Anim8or toolset :)
-
NickE, you rock! This script is really great, it works perfectly even with huge models!
I have only one minor suggestion - if there are more meshes in your object, the script will untriangulate one of them, but as far as I understand the code, it will choose the mesh to untriangulate no matter what user wants. It's really just a detail, but I think it would be better if it worked with a mesh selected by user. I personally would do this on line 79:
if ($shape.GetKind() == SHAPE_KIND_MESH) --> if ($shape.GetKind() == SHAPE_KIND_MESH && $shape.Selected)
-
Kubajzz,
Excellent suggestion! I have made the change and have attached the updated script.
Add to the instructions posted earlier:
"Select the mesh you would like to untriangulate."
-
Perfect!! :D
congratulations..!!!! :o
neirão Brazil..
-
To make the toolbox kinda complete, here's a link to old triangulation plugin written by Claude:
http://www.anim8or.com/ubb/Forum6/HTML/000143.html (http://www.anim8or.com/ubb/Forum6/HTML/000143.html)
-
thanks nicke well done. :)
-
Attached is an updated version of the script that fixed the issue that Kreator found where a model has no joined triangles.
Your feedback is appreciated!
-
i am getting an error " error on line 155: index value out of bounds '$faceref[5]
any ideas?
-
Try using the latest version of Anim8or (0.97)
If you already are, then I'm not so sure about the problem.
-
too many faces was the problem....after manually untriangulating some faces the script worked
-
i have tried to untriangulate a mesh.but havent succeeded yet.
i get this.
source points=7008
faces=12446, edges=19519.
analysing shape...Tolerance: 0.500
but cant see any new mesh anywhere
-
a: it may take a while
b: you have to make a new attribute called tolerance.
-
I get this error:
Error on line 44: undefined indentifer 'attribute'
error on line 44: ';' expected
-
How do i... USE a script file? It makes absolutely no sense to me at all.
-
First, read the "Installing plug-ins" section on the Scripts page (http://www.anim8or.com/scripts/index.html).
Once you install a script, re-start Anim8or. If the newly installed script is a "Command plug-in" (such as the Untriangulate Faces), there will be a new item in the "Scripts" menu. When you install a parametric-mesh plugin, a new button will appear in the left panel in Object mode and when you install an export plugin, a new option appears in the "Export" dialog box... That's it :)
-
gattispilot: are you using version 0.97 preview? 0.95 doesn't support attributes.