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 » Tue Mar 13, 2007 8:06 am

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.
0 x

User avatar
Wretched_Wyx
Orc
Posts: 498
Joined: Thu Mar 16, 2006 5:27 pm
Contact:

Post by Wretched_Wyx » Tue Mar 13, 2007 9:08 am

Awesome, a very worthy addition to Ogre! Good work ahmedismaiel.
0 x

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Tue Mar 13, 2007 9:53 am

Yes, looks really useful! Thanks for freeing it :)
0 x
Image

User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria

Post by stoneCold » Tue Mar 13, 2007 11:27 am

Kencho wrote:Yes, looks really useful! Thanks for freeing it :)
/signed
0 x
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

Post by Ajare » Tue Mar 13, 2007 11:58 am

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.
0 x

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 1

Post by syedhs » Tue Mar 13, 2007 12:02 pm

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.
0 x

User avatar
luis
Greenskin
Posts: 109
Joined: Tue Mar 02, 2004 3:33 pm
Location: Spain / Argentina
x 2
Contact:

Post by luis » Tue Mar 13, 2007 2:42 pm

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?
0 x

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

Post by ahmedismaiel » Wed Mar 14, 2007 1:04 pm

sorry for the 0KB binaries ,but i think the host doesn't support large files
does any one recommend a good free hosting site?
0 x

User avatar
luis
Greenskin
Posts: 109
Joined: Tue Mar 02, 2004 3:33 pm
Location: Spain / Argentina
x 2
Contact:

Post by luis » Wed Mar 14, 2007 4:00 pm

0 x

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

Post by tuan kuranes » Thu Mar 15, 2007 5:46 pm

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.
0 x

User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria

Post by stoneCold » Thu Mar 15, 2007 6:11 pm

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:
0 x
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 » Fri Mar 16, 2007 9:01 am

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

Any news on the bin? uploaded somewhere else? :)
0 x

ynaig
Gnoblar
Posts: 6
Joined: Tue May 03, 2005 12:24 am

Post by ynaig » Fri Mar 16, 2007 2:09 pm

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

Ynaig
0 x

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

Post by Falagard » Fri Mar 16, 2007 2:13 pm

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?
0 x

ynaig
Gnoblar
Posts: 6
Joined: Tue May 03, 2005 12:24 am

Post by ynaig » Fri Mar 16, 2007 6:29 pm

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
0 x

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

Post by ahmedismaiel » Sat Mar 17, 2007 11:36 am

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
0 x

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

Post by tuan kuranes » Sat Mar 17, 2007 1:38 pm

@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.
0 x

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Post by JohnJ » Sat Mar 17, 2007 3:01 pm

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.
0 x

User avatar
Levia
Halfling
Posts: 45
Joined: Fri Feb 03, 2006 9:56 pm
Location: The Netherlands

Post by Levia » Sun Mar 18, 2007 9:39 am

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.
0 x

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

Post by PolyVox » Sun Mar 18, 2007 10:48 am

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?
0 x

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

Post by PolyVox » Sun Mar 18, 2007 11:00 am

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!
0 x

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

Post by ahmedismaiel » Sun Mar 18, 2007 12:48 pm

@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
0 x

User avatar
dennis
Gremlin
Posts: 154
Joined: Mon Nov 11, 2002 4:21 pm

Post by dennis » Sun Mar 18, 2007 11:42 pm

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.
0 x

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

Post by tuan kuranes » Mon Mar 19, 2007 4:57 pm

@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.
0 x

User avatar
Levia
Halfling
Posts: 45
Joined: Fri Feb 03, 2006 9:56 pm
Location: The Netherlands

Post by Levia » Mon Mar 19, 2007 5:37 pm

@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 :)
0 x

Post Reply