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!

TwOgre - An AntTweakBar Integration

Postby CaseyB » Mon Apr 09, 2007 6:25 am

<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

For this message the author CaseyB has received kudos
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
 
Posts: 1335
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Postby betajaen » Mon Apr 09, 2007 9:14 am

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
betajaen
OGRE Moderator
OGRE Moderator
 
Posts: 3446
Kudos: 57
Joined: 18 Jul 2005
Location: Wales, UK

Postby celic » Mon Apr 09, 2007 9:58 am

Nice idea to implement this kind of GUI control.
User avatar
celic
Gnome
 
Posts: 363
Kudos: 0
Joined: 23 Mar 2005
Location: Chisinau/Moldova

Postby Kencho » Mon Apr 09, 2007 10:45 am

Sweet! This will be pretty useful! Thanks for that :)
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4534
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby P » Mon Apr 09, 2007 1:20 pm

Great stuff !

It looks like really useful, looking forward to try it.
P
OGRE Expert User
OGRE Expert User
 
Posts: 431
Kudos: 1
Joined: 07 Jan 2005
Location: UK

Postby Purrpledone » Mon Apr 09, 2007 2:15 pm

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
Purrpledone
Halfling
 
Posts: 45
Kudos: 0
Joined: 11 Mar 2007
Location: Toronto, Canada

Postby CaseyB » Mon Apr 09, 2007 5:49 pm

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
CaseyB
OGRE Contributor
OGRE Contributor
 
Posts: 1335
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Postby pekar » Mon Apr 09, 2007 6:36 pm

Excellent! Goodbye tweak-n-build! This could even be useful for original gameplay.
User avatar
pekar
Halfling
 
Posts: 92
Kudos: 0
Joined: 04 Mar 2007
Location: Belgium

Postby detox » Mon Apr 09, 2007 9:17 pm

Nice work, good to see you are making progress on this.
User avatar
detox
Greenskin
 
Posts: 103
Kudos: 0
Joined: 07 Sep 2006
Location: Ohio, USA

Postby big_o » Mon Apr 09, 2007 10:49 pm

Very cool!
big_o
Goblin
 
Posts: 279
Kudos: 0
Joined: 19 Feb 2006

Postby Assaf Raman » Mon Apr 09, 2007 11:04 pm

Nice work!
:D
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3092
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

Postby sinbad » Tue Apr 10, 2007 12:01 pm

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 :)
User avatar
sinbad
OGRE Founder (Retired)
OGRE Founder (Retired)
 
Posts: 25870
Kudos: 63
Joined: 06 Oct 2002
Location: Guernsey, Channel Islands

Postby redmonk » Tue Apr 10, 2007 8:07 pm

Nice! Really nice GUI compare to CEGUI!
redmonk
Kobold
 
Posts: 39
Kudos: 0
Joined: 23 Sep 2006

Postby nikki » Tue Apr 10, 2007 8:24 pm

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
nikki
Old One
 
Posts: 2730
Kudos: 12
Joined: 17 Sep 2005
Location: Princeton, New Jersey, USA

Postby CaseyB » Tue Apr 10, 2007 10:08 pm

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
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
 
Posts: 1335
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Postby redmonk » Wed Apr 11, 2007 12:01 am

Yup! We both are correct.
redmonk
Kobold
 
Posts: 39
Kudos: 0
Joined: 23 Sep 2006

Postby redmonk » Wed Apr 11, 2007 12:06 am

Where I can download the code so I can integrated in my application?
redmonk
Kobold
 
Posts: 39
Kudos: 0
Joined: 23 Sep 2006

Postby CaseyB » Wed Apr 11, 2007 12:51 am

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
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Postby CaseyB » Wed Apr 11, 2007 5:44 am

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
CaseyB
OGRE Contributor
OGRE Contributor
 
Posts: 1335
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Postby Kencho » Wed Apr 11, 2007 10:53 am

Thanks :) Will definitely have to sink my teeth on this :)
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4534
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby redmonk » Wed Apr 11, 2007 11:06 am

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
redmonk
Kobold
 
Posts: 39
Kudos: 0
Joined: 23 Sep 2006

Postby syedhs » Wed Apr 11, 2007 11:20 am

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?
User avatar
syedhs
Silver Sponsor
Silver Sponsor
 
Posts: 2626
Kudos: 42
Joined: 29 Aug 2005
Location: Kuala Lumpur, Malaysia

Postby redmonk » Wed Apr 11, 2007 11:34 am

Working! Thank for this nice GUI. Great work.
redmonk
Kobold
 
Posts: 39
Kudos: 0
Joined: 23 Sep 2006

Postby CaseyB » Wed Apr 11, 2007 2:48 pm

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
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
 
Posts: 1335
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Postby Chimelion » Wed Apr 11, 2007 4:43 pm

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.
Chimelion
Kobold
 
Posts: 35
Kudos: 0
Joined: 25 Mar 2007

Next

Return to Showcase

Who is online

Users browsing this forum: No registered users and 3 guests