Collada optimizeMesh / NvTriangleStripper
Forum rules
Developer discussions only. Newbie questions belong in the HELP! forum. This is a forum for discussing development work on Ardor3D add-ons and extensions. Basically, anything that is Ardor3D that is not in the ardor3d-core module.
Developer discussions only. Newbie questions belong in the HELP! forum. This is a forum for discussing development work on Ardor3D add-ons and extensions. Basically, anything that is Ardor3D that is not in the ardor3d-core module.
6 posts
• Page 1 of 1
Collada optimizeMesh / NvTriangleStripper
I've incorporated the GeometryTool as an option during the import of Collada files (it's already part of Obj by default.) It works with both animated and static models, and you can turn it on with importer.setOptimizeMeshes(true). You can fine tune the behavior with setOptimizeSettings where you pass in a varargs or array of MatchCondition enums detailing the elements of vertices that must be the same for 2 vertices to be merged.
In tests, I've seen models lower vertex counts by as much as 66%, which as you can imagine may improve skinning calculations - among other things. I'm reworking some of this code to be more generic, but it will already work for most cases. Let me know if you try it out and your results / bugs / etc.
Also of possible interest, I've ported the nvidia triangle stripper library to Ardor3D (from the original C++ source.) It's setup as a Visitor object for easy application against your models or scenes. It works on both regular meshes and skinned meshes and includes the option of applying their reordering of vertices to try to optimize their cache locality. The end result is better performance on some models and worse on others if lots of degenerate triangles or many small strips are created. For example, running it on our OBJ pitcher, I get 30% better performance, but blindly running it on seymour I can get 20% worse or 5% better, depending on settings. You can find the tri stripper in the ardor3d-extras package.
As we work on the wiki tutorials over the next 2 months or so, more specific hints / details on using both of these features should be added.
In tests, I've seen models lower vertex counts by as much as 66%, which as you can imagine may improve skinning calculations - among other things. I'm reworking some of this code to be more generic, but it will already work for most cases. Let me know if you try it out and your results / bugs / etc.
Also of possible interest, I've ported the nvidia triangle stripper library to Ardor3D (from the original C++ source.) It's setup as a Visitor object for easy application against your models or scenes. It works on both regular meshes and skinned meshes and includes the option of applying their reordering of vertices to try to optimize their cache locality. The end result is better performance on some models and worse on others if lots of degenerate triangles or many small strips are created. For example, running it on our OBJ pitcher, I get 30% better performance, but blindly running it on seymour I can get 20% worse or 5% better, depending on settings. You can find the tri stripper in the ardor3d-extras package.
As we work on the wiki tutorials over the next 2 months or so, more specific hints / details on using both of these features should be added.
Gratitude is a mark of a noble soul and a refined character.
-

renanse - Site Admin
- Posts: 2958
- Joined: Tue Oct 28, 2008 6:49 pm
- Location: Austin, TX
Re: Collada optimizeMesh / NvTriangleStripper
Hi!
Was this GeometryTool enabled by default before?
There is a real need of tutorials as there are a few fully open source projects using Ardor3D as far as I know and as I'm not the designer of this engine, maybe I don't do some things as I should, for example when using Ardor3D UI HUD. Does it mean that no big feature will be added for a while?
Was this GeometryTool enabled by default before?
There is a real need of tutorials as there are a few fully open source projects using Ardor3D as far as I know and as I'm not the designer of this engine, maybe I don't do some things as I should, for example when using Ardor3D UI HUD. Does it mean that no big feature will be added for a while?
- gouessej
- regular
- Posts: 1206
- Joined: Fri May 01, 2009 3:26 am
- Location: France
Re: Collada optimizeMesh / NvTriangleStripper
gouessej wrote:Was this GeometryTool enabled by default before?
If you mean in OBJ importer, then yes it has, by design.
gouessej wrote:There is a real need of tutorials
Yes, we know.
gouessej wrote:Does it mean that no big feature will be added for a while?
I assume by "it" you are referring to the writing of more documentation. No, we have things that we'll continue to work on as usual. And of course the community is always able to offer contributions.
Gratitude is a mark of a noble soul and a refined character.
-

renanse - Site Admin
- Posts: 2958
- Joined: Tue Oct 28, 2008 6:49 pm
- Location: Austin, TX
Re: Collada optimizeMesh / NvTriangleStripper
Hey,
Just wanted to add my thanks for implementing this feature!
I can't wait to see if/and how it accelerates stuff on Android.
<thread hijack>
We're still working on Caravel, fleshing out the entire game before a release
(So its status is officially upgraded no longer summer-project..)
Once I get new screenshots/releases, I'll update the main thread!
Sorry for not keeping you up to date, but that's mainly because of the fact that progress is all in either game or network logic..
(Not to mention the fact that I'm swamped at the university..)
</th>
Anyway, again thanks for implementing this!!!
Just wanted to add my thanks for implementing this feature!
I can't wait to see if/and how it accelerates stuff on Android.
<thread hijack>
We're still working on Caravel, fleshing out the entire game before a release
(So its status is officially upgraded no longer summer-project..)
Once I get new screenshots/releases, I'll update the main thread!
Sorry for not keeping you up to date, but that's mainly because of the fact that progress is all in either game or network logic..
(Not to mention the fact that I'm swamped at the university..)
</th>
Anyway, again thanks for implementing this!!!
- methius
- regular
- Posts: 93
- Joined: Mon Jul 06, 2009 4:41 am
Re: Collada optimizeMesh / NvTriangleStripper
renanse wrote:gouessej wrote:Was this GeometryTool enabled by default before?
If you mean in OBJ importer, then yes it has, by design.
Can you explain what you mean with "by design"? As I'm doing server-rendering of single meshes I want to test out if there's a performance increase or decrease when minimizeVerts is en/disabled. Currently I'm using OBJ files and the minimizeVerts takes around 1 sec. And now I wanted to try it without the optimization.
- neothemachine
- regular
- Posts: 88
- Joined: Tue Mar 13, 2012 9:58 am
Re: Collada optimizeMesh / NvTriangleStripper
Obj format defines sections as belonging to smoothing groups. We use the GeometryTool to join vertices together (smoothing normals) if they belong to the same group.
Gratitude is a mark of a noble soul and a refined character.
-

renanse - Site Admin
- Posts: 2958
- Joined: Tue Oct 28, 2008 6:49 pm
- Location: Austin, TX
6 posts
• Page 1 of 1
Return to Extensions Development Discussions
Who is online
Users browsing this forum: No registered users and 1 guest