OgreTootle: Triangle Order Optimization Tool [Links Updated]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
User avatar
ahmedismaiel
OGRE Contributor
OGRE Contributor
Posts: 217
Joined: Wed Jan 25, 2006 11:16 pm
Location: Redmond,WA

OgreTootle: Triangle Order Optimization Tool [Links Updated]

Post by ahmedismaiel »

this tools is a Triangle Order Optimization Tool based on ATI tootle library to reduce the overdraw with no penalty in vertex-limited scenarios, and no runtime cost.

the exe and it's dependencies can be downloaded from
http://tuan.kuranes.free.Fr/OgreTootleBin.rar

the source code can be downloaded from
http://tuan.kuranes.free.fr/OgreTootle_src.zip


the libs and include files of ATI Tootle can be downloaded from
http://ati.amd.com/developer/tootle.html

the tool runs from the command prompt as follows

Code: Select all

OgreTootle -o "optimizedmesh.mesh" "input.mesh"
Note :the triangle optimization technique only make sense for static object s, so it's the only data processed by the tool

hope it's useful ,and as they say on their website "have no reason not to use it " :)

Edit:very Thanks to tuan kuranes for hosting the source and binaries

love Ogre :wink:
Last edited by ahmedismaiel on Sat Mar 17, 2007 11:32 am, edited 1 time in total.
User avatar
Wretched_Wyx
Orc
Posts: 498
Joined: Thu Mar 16, 2006 5:27 pm
Contact:

Post by Wretched_Wyx »

Awesome, a very worthy addition to Ogre! Good work ahmedismaiel.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Yes, looks really useful! Thanks for freeing it :)
Image
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

Kencho wrote:Yes, looks really useful! Thanks for freeing it :)
/signed
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
Ajare
Goblin
Posts: 282
Joined: Sat May 14, 2005 9:20 pm
x 1

Post by Ajare »

Cool. Perhaps that could be added to OgreMeshUpgrader.

edit: external dependencies, probably not I guess. Still, nice work. :)
Last edited by Ajare on Tue Mar 13, 2007 12:05 pm, edited 1 time in total.
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post by syedhs »

Very nice. I like 'free-lunch' optimization where it only gets better without any strings attached :wink:

Edit: Hmm I cant download the binaries although source code is fine.
User avatar
luis
Greenskin
Posts: 122
Joined: Tue Mar 02, 2004 3:33 pm
Location: Spain / Argentina
x 7
Contact:

Post by luis »

thanks for sharing !
Edit: Hmm I cant download the binaries although source code is fine.
i cant either :( i get a 0kb zip.

did anyone make a FPS comparision between "after" and "before" using this tool in ogredemos or any other ogre app?
User avatar
ahmedismaiel
OGRE Contributor
OGRE Contributor
Posts: 217
Joined: Wed Jan 25, 2006 11:16 pm
Location: Redmond,WA

Post by ahmedismaiel »

sorry for the 0KB binaries ,but i think the host doesn't support large files
does any one recommend a good free hosting site?
User avatar
luis
Greenskin
Posts: 122
Joined: Tue Mar 02, 2004 3:33 pm
Location: Spain / Argentina
x 7
Contact:

Post by luis »

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Very useful, thanks for sharing !

Running ogreTootle here on athene mesh does gave me a 100FPS boost in demo_bump whenever using a vertex shader.

It's indeed a very valuable tool.

Cegui Mesh viewer (binary and source) now include OgreTootle in tools Mesh Tab. (there's no parameters for tootlizing now, which is a shame, as view point information can make it even more efficient, but it's hard to do an UI for that...)

@ahmedismaiel: I can host files if you need.
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

tuan kuranes wrote:...Running ogreTootle here on athene mesh does gave me a 100FPS boost in demo_bump whenever using a vertex shader...
Simply *wow* :shock:
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
Levia
Halfling
Posts: 45
Joined: Fri Feb 03, 2006 9:56 pm
Location: The Netherlands

Post by Levia »

Very nice, great job. Im going to try it with our demo.

Any news on the bin? uploaded somewhere else? :)
ynaig
Gnoblar
Posts: 6
Joined: Tue May 03, 2005 12:24 am

Post by ynaig »

Can't you post the source files and the binaries at RapidShare or DepositFiles or MegaUpload?

Ynaig
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

Running ogreTootle here on athene mesh does gave me a 100FPS boost in demo_bump whenever using a vertex shader.
*jaw drops*

Wha? What was your frame rate approximately before and after?
ynaig
Gnoblar
Posts: 6
Joined: Tue May 03, 2005 12:24 am

Post by ynaig »

OK, I managed to get the sources for OgreTootle and I compiled it against the Ogre3D 1.4RC2.
I uploaded the binaries to MegaUpload. Get them at http://www.megaupload.com/?d=SOZ02W8T

Be aware that the correct command is

Code: Select all

OgreTootle modelname.mesh -o optimized_modelname.mesh
I couldn't see too much of a benefit of this kind of optimization in DirectX or OpenGL mode on my Mobility Radeon 9700. It's kinda hard to gauge the improvements in my case.

Ynaig
User avatar
ahmedismaiel
OGRE Contributor
OGRE Contributor
Posts: 217
Joined: Wed Jan 25, 2006 11:16 pm
Location: Redmond,WA

Post by ahmedismaiel »

Links Updated ,

Thanks to tuan kuranes for hosting the source and binaries

@ynaig :the tool can be accessed with either commands because one of them is tagged with -o
mainly the benefit can be shown in meshes that have vertices larger than 2000 vertex with multiple overlaps
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@Falagard : From 600 to 700 Fps
@ynaig: I think that usage of heavy shaders make fps boost more obvious, and even more if whole scene is using it. Read the paper in ati Tootle lib download.
User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California
x 4

Post by JohnJ »

Running ogreTootle here on athene mesh does gave me a 100FPS boost in demo_bump whenever using a vertex shader.
Wow, I had no idea triangle order could make such a difference! I've gotta do some reading on this topic.

This would be a really nice addition to the Ogre command-line tools.
User avatar
Levia
Halfling
Posts: 45
Joined: Fri Feb 03, 2006 9:56 pm
Location: The Netherlands

Post by Levia »

It still gives me a few problems though. I get to see I need to upgrade my mesh (which I already did) and then it just..hands I guess.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

It wasn't immediatly obvious to me, but the algorithm this implements is described here:

http://ati.amd.com/developer/techreport ... SI3D06.pdf

So my question is, can this be applied to meshes generated programatically at runtime, or only to .mseh files from the command line? Maybe it's possible to create a library which an application can link with to make use of this functionality?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Ok, some more questions...

1) Is this a port of the ATI code to Ogre, or your own implementation of thier algorithm?

2) What is the license?

3) My earlier post talked about making a library - would it be possible to go further and integrate into Ogre? Maybe when you create a static object a flag could be passed indicating whether Ogre should apply this algorithm?

4) How fast is it?

5) Is the concept of building 'Triangle Strips' now dead. When using vertex buffers does this new technique replace it?

Looks excellent at any rate!
User avatar
ahmedismaiel
OGRE Contributor
OGRE Contributor
Posts: 217
Joined: Wed Jan 25, 2006 11:16 pm
Location: Redmond,WA

Post by ahmedismaiel »

@Levia :did you use the updated Binaries ? they are compiled with Eithort CVS

@esuvs :
1-the tool is a usage on ATI library which is closed source ,i didn't implement the algorithm my self .i just make it support loading the vertices from ogre mesh and resave them

2- "This program is open source; you can redistribute it and/or modify it
or even burn it if you want :) " this is the license

3-as Ajare said before ,it'll be an extra dependency with no need ,just use the tool on your meshes before shipping

4-it takes around a minute for a couple of thousand vertices ,depending on the number of LOD's and number of vertices on each LOD

5-from my knowledge triangle lists are faster on recent hardware because pixel and vertex shader pipelines can run is parallel on the entire buffer without masking

technically it's possible to meshes generated programatically at runtime but it's designed as a pre compilation step and takes some time because it render the mesh from several viewpoints and measure the outcome .you can do it in a separate thread if you want
User avatar
dennis
Gremlin
Posts: 154
Joined: Mon Nov 11, 2002 4:21 pm

Post by dennis »

There has been a triangle-list optimizer in Ogre for quite some time now. You only need to find it, use it and improve it. You may also discover the vertex cache simulator and use it to objectively measure the effect of the optimizing tool from Ati.
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@dennis: Both ogre index buffer cache optimizer and tootle optimizer are available in ceguimeshviewer. , loading a mesh, then in 'Tool' tab you choose either optimize buffer or 'tootle' button. Try yourself (remember to save mesh and rename them not to overwrite previous modified athena.
Here's my results using demo_dot3bump to show off some vertex GPU use.

Code: Select all

athena.mesh :  620 fps
athena_index:  710 fps
athena_tootle: 780 fps
Note1: tootle is not used at its best as not view point specification is given, as thena could have all under here portiential viewpoints surely removed.
Note2: Without vertex shaders it seems athena_index is faster ~30fps.
User avatar
Levia
Halfling
Posts: 45
Joined: Fri Feb 03, 2006 9:56 pm
Location: The Netherlands

Post by Levia »

@ahmedismaiel: Yep, I had an old mesh, so I upgraded using the tools on the ogre downloads section, then tried with OgreTootle, but then it just shows me that warning that the mesh is old (even though Ive upgraded it) and then it just..seems to do nothing :)
Post Reply