TwOgre - An AntTweakBar Integration

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
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

TwOgre - An AntTweakBar Integration

Post by CaseyB »

<edit>
The project has moved to Bitbucket:

https://bitbucket.org/jacmoe/twogregui

Update your links/bookmarks. :)

</edit>

I have spent a little bit of time integrating the AntTweakBar GUI System, discussed in this thread into Ogre. It's not the prettiest thing, but it's very easy to use and rather fully featured. It would be great for some kind of an editor. I just got all of the appropriate variable type wrapped up so I thought I'd post some pics and a video. I still need to get callbacks working, right now you'd have to poll the values, and I want to build AntTweakBar and TwOgre into the same static lib or dll, so you'd only need the one. I'll release everything once that's done! Now on to the eye candy!

Image
Image
Image

And here's the link to the video:
www.MooProductions.org/TwOgre.avi
Image
Image
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

Betajaen likes, and I really like the dial thing going on with the floating point widgets, back in the Amiga days there was GUI library called MUI which had something quite similar to that.

With all these new Ogre based GUI systems, I think they are all giving CEGUI a run for it's money now. :D
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova
Contact:

Post by celic »

Nice idea to implement this kind of GUI control.
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 »

Sweet! This will be pretty useful! Thanks for that :)
Image
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

Great stuff !

It looks like really useful, looking forward to try it.
User avatar
Purrpledone
Halfling
Posts: 45
Joined: Sun Mar 11, 2007 3:11 am
Location: Toronto, Canada
Contact:

Post by Purrpledone »

Very nice! I've put AntTweakBar on my Things to Try list since I saw that thread in General Discussion, so I'll definitely give this a try when you release it.
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post by CaseyB »

Thanks everyone for the encouragement! I thought the Dial Widget was very cool too! That's one of the biggest things that made me want to bring this GUI System into Ogre! I have sent the original developer an email with some questions, hopefully he'll respond soon.
Image
Image
User avatar
pekar
Halfling
Posts: 92
Joined: Sun Mar 04, 2007 2:56 pm
Location: Belgium

Post by pekar »

Excellent! Goodbye tweak-n-build! This could even be useful for original gameplay.
User avatar
detox
Greenskin
Posts: 103
Joined: Thu Sep 07, 2006 1:13 am
Location: Ohio, USA
Contact:

Post by detox »

Nice work, good to see you are making progress on this.
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Very cool!
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

Nice work!
:D
Watch out for my OGRE related tweets here.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

I'm also one of those that put AntTweakBar on my 'to play with later' list because it looks very useful. Nice to see it ported to Ogre - of course a place in ogreaddons can be reserved on request :)
redmonk
Kobold
Posts: 39
Joined: Sat Sep 23, 2006 10:09 am

Post by redmonk »

Nice! Really nice GUI compare to CEGUI!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

redmonk wrote:Nice! Really nice GUI compare to CEGUI!
I think it is better off used for tweaking (hence its name) and quick adjustment of variables like in test applications and level editors, whereas CEGUI has more features such as buttons, dialogs etc. So, we really can't compare them.
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post by CaseyB »

nikki wrote:I think it is better off used for tweaking (hence its name) and quick adjustment of variables like in test applications and level editors, whereas CEGUI has more features such as buttons, dialogs etc. So, we really can't compare them.
Absolutely true! This fills a different need than CEGUI, BetaGUI and SimpleGUI, it's not terribly pretty, but is very easy to set up and has great flexibility as far as how to group things and collapse groups, etc.
Image
Image
redmonk
Kobold
Posts: 39
Joined: Sat Sep 23, 2006 10:09 am

Post by redmonk »

Yup! We both are correct.
redmonk
Kobold
Posts: 39
Joined: Sat Sep 23, 2006 10:09 am

Post by redmonk »

Where I can download the code so I can integrated in my application?
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post by CaseyB »

redmonk wrote:Where I can download the code so I can integrated in my application?
You can't yet, I have a couple more things to wrap up before it's ready to distribute.
Image
Image
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post by CaseyB »

Ok, I integrated the AntTweakBar code and my code all into the same project and created four build targets
  • Release
    Debug
    Static_Release
    Static_Debug
so you can choose to link it with a dll or a static lib, I have also included the example that I posted pictures of. I still haven't worked in the callbacks, so for now the only way to get data out of the Variables is to poll them. It's not TOO bad if you don't have that many, but if you're going to make a real World Editor you'll really need the callback. I am working on it. I have also emailed Philippe Decaudin, the creator of AntTweakBar, and he told me that add a String variable type is #1 on his TODO list, so that should be coming around soon!

You can get it from an SVN repo hosted by Google:
svn checkout http://twogregui.googlecode.com/svn/trunk/ twogregui

SETUP
If you use the Ogre SDK then you should be all set. TwOgre should build right out of the box for you.

If you Build Ogre from Source then you'll need to add the OGRE_SRC environment variable to point to your ogrenew folder. Then TwOgre should build with no problems.
Image
Image
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 »

Thanks :) Will definitely have to sink my teeth on this :)
Image
redmonk
Kobold
Posts: 39
Joined: Sat Sep 23, 2006 10:09 am

Post by redmonk »

Ogre 1.4.0 (Eihort) with VS2005 SP1 [debug-mode] and is crashing on Line 38 / OgreApp.cpp and the Ogre.log is Ok!

Code: Select all

Line 38 / OgreApp.cpp:
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();

Code: Select all

Error dialog:
Unhandled exception at 0x106ea7d6 in Example_WorldEditor.exe: 0xC0000005: Access violation reading location 0x0000005c.

Code: Select all

Ogre.log:
12:19:13: *-*-* OGRE Initialising
12:19:13: *-*-* Version 1.4.0 (Eihort)
12:19:13: Creating resource group Bootstrap
12:19:13: Added resource location 'media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
12:19:13: Added resource location 'media' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/fonts' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/materials/programs' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/materials/scripts' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/materials/textures' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/models' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/overlays' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/particle' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/gui' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
12:19:13: Added resource location 'media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
12:19:13: Added resource location 'media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
12:19:13: Added resource location 'media/packs/dragon.zip' of type 'Zip' to resource group 'General'
12:19:13: Added resource location 'media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
12:19:13: Added resource location 'media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
12:19:13: Added resource location 'media/packs/skybox.zip' of type 'Zip' to resource group 'General'
12:19:14: Parsing scripts for resource group Autodetect
12:19:14: Finished parsing scripts for resource group Autodetect
12:19:14: Parsing scripts for resource group Bootstrap
12:19:14: Parsing script OgreCore.material
12:19:14: Parsing script OgreProfiler.material
12:19:14: Parsing script Ogre.fontdef
12:19:14: Parsing script OgreDebugPanel.overlay
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 »

Okay I have got it running, but I have to change the followings:-
Listener.cpp

Code: Select all

...
if(mInputManager->numMice() > 0)
...
if(mInputManager->numKeyboards() > 0)
Your OIS version is not the same as mine, not sure which is more recent.

And in plugins.cfg, change the pluginfolder to wherever you store it.

Nice! Btw, cant we edit the value using keyboard directly?
redmonk
Kobold
Posts: 39
Joined: Sat Sep 23, 2006 10:09 am

Post by redmonk »

Working! Thank for this nice GUI. Great work.
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post by CaseyB »

syedhs wrote: Your OIS version is not the same as mine, not sure which is more recent.
And in plugins.cfg, change the pluginfolder to wherever you store it.
Nice! Btw, cant we edit the value using keyboard directly?
Doh, sorry about that's because I am using the CVS Head version of OIS. I'll fix that. And good catch on the plugins.cfg, I'll put that in the original post. You can add Keyboard shortcuts, I forgot about that, I'll update the example tonight.
Image
Image
Chimelion
Kobold
Posts: 35
Joined: Sun Mar 25, 2007 10:52 am

Post by Chimelion »

Nice, thank you. Only thing I will need to change before I test it out will be to de-couple the OIS dependency from the TwOgre API. Since I don't use OIS in my own app, that's the only hang-up atm. No problem having OIS in the example, but I don't think it should be coupled in API.
Post Reply