Maybe you can use the commandline tool by Wine.merlinblack wrote:I'm thinking about how to generate gorilla files, etc on Linux.
Gorilla - minimal hud and overlay replacement for OGRE
- Beauty
- OGRE Community Helper
- Posts: 767
- Joined: Wed Oct 10, 2007 2:36 pm
- Location: Germany
- x 39
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Help to add information to the wiki. Also tiny edits will let it grow ...
Add your country to your profile ... it's interesting to know from where of the world you are.
Add your country to your profile ... it's interesting to know from where of the world you are.
- AshMcConnell
- Silver Sponsor
- Posts: 605
- Joined: Fri Dec 14, 2007 11:44 am
- Location: Northern Ireland
- x 16
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 08-Sep-20
Here is it in-game. Works well IMO and quite a nice performance boost over the admittedly poor implementation of using 3d models for each RPM bar (300fps vs 250fps)
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Look at Gorilla go.
I wonder if it would be any faster with a ScreenRenderable?
I wonder if it would be any faster with a ScreenRenderable?
- AshMcConnell
- Silver Sponsor
- Posts: 605
- Joined: Fri Dec 14, 2007 11:44 am
- Location: Northern Ireland
- x 16
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
It isn't easy for me to use a screen renderable as the dash isn't treated as a separate object in my car loaded. I did try not updating Gorilla at all and I saw maybe 1-2fps change (hard to say it flickers a bit), but it's definitely not a problem.
Thanks for a great little lib, much appreciated! I am still learning and gradually getting to know some of the lower level stuff, libs like Gorilla make the learning curve much less scary and I can look at how the code works and hopefully it will eventually go in by osmosis
All the best,
Ash
Thanks for a great little lib, much appreciated! I am still learning and gradually getting to know some of the lower level stuff, libs like Gorilla make the learning curve much less scary and I can look at how the code works and hopefully it will eventually go in by osmosis
All the best,
Ash
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Alright. I remember reading something in the Viewport class, that you can turn off auto-updating. Perhaps you could tell the viewport to update only when Gorilla does, that should do less writes to the texture. So you may gain a bit more FPS.
- AshMcConnell
- Silver Sponsor
- Posts: 605
- Joined: Fri Dec 14, 2007 11:44 am
- Location: Northern Ireland
- x 16
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Already donebetajaen wrote:Alright. I remember reading something in the Viewport class, that you can turn off auto-updating. Perhaps you could tell the viewport to update only when Gorilla does, that should do less writes to the texture. So you may gain a bit more FPS.
I only update when the number of lights have changed or the Speed / Gear changes. I mark it as dirty and do a render on the next update
Last edited by AshMcConnell on Tue Sep 14, 2010 3:34 pm, edited 1 time in total.
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
- toglia
- Gnome
- Posts: 336
- Joined: Sat Dec 08, 2007 4:28 am
- Location: Canada
- x 7
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
I'm about to finish a simple 2d Sprite Editor based on aj's Canvas, maybe I could port it to Gorilla as well. I'm very interested on having independent material shaders per sprite, which I have read its possible now with Gorilla, right?
I was thinking, since aj's Canvas actually packs Textures and Fonts into an Atlas, a simple tool based on this lib could be designed to generate Gorilla definition files and png atlas textures automatically, that would be much nicer for real production pipeline.
Right now I'm pretty busy myself, but I would love to help building this tool, maybe in a few weeks.
I was thinking, since aj's Canvas actually packs Textures and Fonts into an Atlas, a simple tool based on this lib could be designed to generate Gorilla definition files and png atlas textures automatically, that would be much nicer for real production pipeline.
Right now I'm pretty busy myself, but I would love to help building this tool, maybe in a few weeks.
- Beauty
- OGRE Community Helper
- Posts: 767
- Joined: Wed Oct 10, 2007 2:36 pm
- Location: Germany
- x 39
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Can you give us links to the applications?toglia wrote:simple 2d Sprite Editor
Atlas, a simple tool based on this lib
Also it would be nice when you create a wiki page for your sprite editor and add a link to it from the wiki page Digital Content Creation Tools.
Help to add information to the wiki. Also tiny edits will let it grow ...
Add your country to your profile ... it's interesting to know from where of the world you are.
Add your country to your profile ... it's interesting to know from where of the world you are.
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Seems a bit over the top to me. There are hundreds of Font-to-texture programs out there, and as for sprites and a few minutes in Paint.net for the sprites.toglia wrote:I'm about to finish a simple 2d Sprite Editor based on aj's Canvas, maybe I could port it to Gorilla as well. I'm very interested on having independent material shaders per sprite, which I have read its possible now with Gorilla, right?
Nope. One material/texture per screen.
togila wrote:I was thinking, since aj's Canvas actually packs Textures and Fonts into an Atlas, a simple tool based on this lib could be designed to generate Gorilla definition files and png atlas textures automatically, that would be much nicer for real production pipeline.
As for packing, When developing Gorilla I was going to do this, I can think of at about two algorithms to do this for you. It's just simple box packing.
- toglia
- Gnome
- Posts: 336
- Joined: Sat Dec 08, 2007 4:28 am
- Location: Canada
- x 7
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
@Beauty
I will do this once its finished and translated. Right now its in spanish.
The Canvas lib I was talking about:
http://princeofcode.com/canvas.php#overview
http://www.ogre3d.org/forums/viewtopic.php?t=41365
Its packs multiple sprites and fonts into a single ogre texture on runtime.
@Betajaen.
Well yeah, maybe its not a big deal. But I find it very important when dealing with non programmers (artists).
I will do this once its finished and translated. Right now its in spanish.
The Canvas lib I was talking about:
http://princeofcode.com/canvas.php#overview
http://www.ogre3d.org/forums/viewtopic.php?t=41365
Its packs multiple sprites and fonts into a single ogre texture on runtime.
@Betajaen.
Well yeah, maybe its not a big deal. But I find it very important when dealing with non programmers (artists).
- toglia
- Gnome
- Posts: 336
- Joined: Sat Dec 08, 2007 4:28 am
- Location: Canada
- x 7
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Don't know why I assumed... no rotation per sprite either, I guess.betajaen wrote: Nope. One material/texture per screen.
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Nope, but it's easy to hack in. It's just a few lines of cos and sin.toglia wrote:Don't know why I assumed... no rotation per sprite either, I guess.betajaen wrote: Nope. One material/texture per screen.
- merlinblack
- Goblin
- Posts: 223
- Joined: Thu Mar 15, 2007 10:05 am
- Location: Sydney, Australia
- x 7
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Started making a binding to Lua using Luabind. I'm keeping it separate to my other bindings (you want to keep Luabind source units small) so it should be easily incorporated by others. So far so good!
The gorrilla_3d.cpp is chock full of useful code isn't it! Not to mention a very cool demo.
The gorrilla_3d.cpp is chock full of useful code isn't it! Not to mention a very cool demo.
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Terry Pratchett, Reaper Man
- merlinblack
- Goblin
- Posts: 223
- Joined: Thu Mar 15, 2007 10:05 am
- Location: Sydney, Australia
- x 7
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
I'm seeing a problem with double deletion in my app. I think its layers... If you add to the App d'tor in the Console example it shows similar behaviour... anyone else? Looks like if you just delete your Silverback instance at the end all is ok, but if you destroy a layer before doing that, it tries to delete it again in the Silverback d'tor and kaboom! bits go flying.
Code: Select all
delete mConsole;
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Terry Pratchett, Reaper Man
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Weird. Are you using the latest commit from the Git repository?
There is definite code in Silverback::destroy and the shutdown function in OgreConsoleForGorilla does call it.
There is definite code in Silverback::destroy and the shutdown function in OgreConsoleForGorilla does call it.
- merlinblack
- Goblin
- Posts: 223
- Joined: Thu Mar 15, 2007 10:05 am
- Location: Sydney, Australia
- x 7
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Yeah, I pulled from your repo before I posted to make sure I was up to date.
I think the call:does not completely clear things out and you get a problem when the Silverback d'tor runs.
I still looking into it. Just trying to figure out the Layer index business - I think the problem may be in there perhaps.
EDIT:
To recreate, addto App::~App of the console example, so the OgreConsole d'tor runs. On my machine it seg-faults when deleting rectangles with a null pointer within the Silverback d'tor.
I think the call:
Code: Select all
mScreen->destroy( mLayer )
I still looking into it. Just trying to figure out the Layer index business - I think the problem may be in there perhaps.
EDIT:
To recreate, add
Code: Select all
delete mConsole;
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x0805a022 in Gorilla::Layer::destroyAllRectangles (this=0xb66293f8) at Gorilla.cpp:1109
1109 OGRE_DELETE (*it);
(gdb) bt
#0 0x0805a022 in Gorilla::Layer::destroyAllRectangles (this=0xb66293f8) at Gorilla.cpp:1109
#1 0x08059d51 in ~Layer (this=0xb66293f8, __in_chrg=<value optimised out>) at Gorilla.cpp:1074
#2 0x08057914 in ~LayerContainer (this=0xb71e4c78, __in_chrg=<value optimised out>) at Gorilla.cpp:679
#3 0x0805904d in ~Screen (this=0xb71e4c78, __in_chrg=<value optimised out>) at Gorilla.cpp:959
#4 0x080571ce in ~Silverback (this=0xb7ce46e0, __in_chrg=<value optimised out>) at Gorilla.cpp:608
#5 0x0804fc5f in ~App (this=0x8092978, __in_chrg=<value optimised out>) at examples/gorilla_ogreconsole.cpp:90
#6 0x0804ee52 in main () at examples/gorilla_ogreconsole.cpp:289
(gdb) print *it
$1 = (class Gorilla::Rectangle *&) @0x0: <error reading variable>
(gdb) quit
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Terry Pratchett, Reaper Man
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
Fixed.
http://github.com/betajaen/gorilla
Code: Select all
Fixed crash whilst deleting a already deleted Layer in the Silverback destructor.
- merlinblack
- Goblin
- Posts: 223
- Joined: Thu Mar 15, 2007 10:05 am
- Location: Sydney, Australia
- x 7
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 12-Sep-20
And fix tested!betajaen wrote:Fixed.
http://github.com/betajaen/gorillaCode: Select all
Fixed crash whilst deleting a already deleted Layer in the Silverback destructor.
Thanks Betajaen!
git rebase even went without any dramas - partly as I've learned what not to do....
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Terry Pratchett, Reaper Man
- vitefalcon
- Orc
- Posts: 438
- Joined: Tue Sep 18, 2007 5:28 pm
- Location: Seattle, USA
- x 13
Re: gorilla - hud/overlay replacement - Updated on 16-Sep-20
Awesome, awesome utility/addon. Had some trouble to integrate it with 1.6.5 though (like the use of OGRE/Ogre.h instead of Ogre.h, Ogre::vector, Screen class not implementing the renderQueueStarted(...) and an error in the cpp file where you an iterator was being accessed as a nested-typedef in Ogre::VectorIterator). But otherwise, SUPER-EASY overlays ...
@Betajaen: Dude, out of sheer curiosity, do you ever take a break?
BTW, I'm attaching the modified code to make it work in 1.6.x (and down, hopefully) for those who're interested, with this post.
@Betajaen: Dude, out of sheer curiosity, do you ever take a break?
BTW, I'm attaching the modified code to make it work in 1.6.x (and down, hopefully) for those who're interested, with this post.
- Attachments
-
- Gorilla_1.6.X.zip
- The implementation of Gorilla that will work on 1.6.x (and hopefully for the versions below it).
- (26.59 KiB) Downloaded 140 times
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 16-Sep-20
Nice, I can merge nearly all of your your changes into the Git hub repo if you like.
And, not really no.
And, not really no.
- vitefalcon
- Orc
- Posts: 438
- Joined: Tue Sep 18, 2007 5:28 pm
- Location: Seattle, USA
- x 13
Re: gorilla - hud/overlay replacement - Updated on 16-Sep-20
That'd be awesome!betajaen wrote:Nice, I can merge nearly all of your your changes into the Git hub repo if you like.
LOL! It's your hard work that makes our lives easybetajaen wrote:And, not really no.
Good work with Gorilla
- betajaen
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 16-Sep-20
Code: Select all
Made Gorilla compile under Ogre 1.6.5 (vitefalcon)
http://www.ogre3d.org/forums/viewtopic.php?p=404540#p404540
The only thing I couldn't do is the "#include <OGRE/Ogre.h>" thing for that you need to know the Ogre version, and to get that you need to include Ogre, which you can't do with out knowing the version, which you get by including it. So it's an endless loop.
- vitefalcon
- Orc
- Posts: 438
- Joined: Tue Sep 18, 2007 5:28 pm
- Location: Seattle, USA
- x 13
Re: gorilla - hud/overlay replacement - Updated on 16-Sep-20
LOL yea... That's an issue. One way around that would be to have a #define above it to say something like
Edit: Man... I gotta admit, this is helping me loads as a visual debugging output, like checking out how my interpolation is getting messed up (I draw a graph on the screen for that using Gorilla::LineList).
Edit2: Just noticed... thanks for the credit
Code: Select all
#define GORILLA_OGRE_1_7_X 67328 // (1<<16 + 7<<8)
#define GORILLA_OGRE_1_6_X 67072 // (1<<16 + 6<<8)
// By default it's for 1.7.x change this for your version of OgreSDK
#define GORILLA_OGRE_VERSION GORILLA_OGRE_1_7_X
#if GORILLA_OGRE_VERSION >= GORILLA_OGRE_1_7_X
# include <OGRE/Ogre.h>
#else
# include <Ogre.h>
#endif // GORILLA_OGRE_VERSION >= GORILLA_OGRE_1_7_X
Edit2: Just noticed... thanks for the credit
- merlinblack
- Goblin
- Posts: 223
- Joined: Thu Mar 15, 2007 10:05 am
- Location: Sydney, Australia
- x 7
- Contact:
Re: gorilla - hud/overlay replacement - Updated on 16-Sep-20
Hi, here's a wee patch to stop Gorilla segfaulting should you give Rectangle::background_image( const String& ) a not existing sprite name. I've made it throw an exception which suits me, with the Luabind binding I've starting making, you may want to do something different.
Upload attachment....The extension is not allowed.... what? why? Sigh.
It's a git patch - so should 'git am' right in.
Upload attachment....The extension is not allowed.... what? why? Sigh.
It's a git patch - so should 'git am' right in.
- Attachments
-
- patch.zip
- Zipped patch file
- (989 Bytes) Downloaded 144 times
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Terry Pratchett, Reaper Man