[SoC 2009 - Accepted] Unified Samples Framework & Browser

Threads related to Google Summer of Code
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

Oops. My bad.

EDIT: @sinbad, Where are the cfg files located in the trunk?
User avatar
Noman
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by Noman »

In (MainDir)\Cmake\Templates.
I converted the volumetex sample and also changed the config files there to use the new syntax.
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by xadhoom »

The key input works great. Thanks!

Starting up samples directly somehow doesn´t work here. I´ve added "StartupSample=Sample_Instancing" to (OGRE_BUILD)\bin\release\samples.cfg. When runing in release mode he just starts as usual...

The instancing demo has a bug. If you select 1000 entities there are actually less then 1000 in staticmesh/independent entities mode (I didn´t count them but its clearly visible that some of the upper ships disappear). The performance difference between is very small.

xad
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

xadhoom, as mentioned earlier, Sample_Instancing is the filename of the sample plugin, which contains the sample with the title "Instancing". So change the line to StartupSample=Instancing, or whatever the title of that sample is. :)
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by Wolfmanfx »

startup sample works :) thx
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

Whew. :) Oh, and thanks Noman for changing the cfgs for me. :)
User avatar
Noman
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by Noman »

Had a look at the instancing demo, as I also encountered something that looked strange.
The 'instancing' option actually rounds UP the number of instances. I don't know if this is intentional or not, but that is what happens. When dealing with the razors (default model), there are 80 models per 'floor', and the instancing techniques rounds em up to the closest multiple of 80. So there will actually be 1040 razors at 1000 when using the instancing technique.

Now that i think of it, i think its intentional - the original default was 160 entities (a multiple of 80) so there was no difference between the techniques. I changed it to 100, but that makes the difference visible from the start (since instancing technique rounds up to 160 already). I'll just change the starting point back to 160...
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

The articles are finally done! :D I have to divide up the article into 3, because the original one exceeded 32KB or something. The one about the framework links to the ones about the tray manager and the camera controller.

Intro to the OgreBites Samples Framework
Intro to the SdkTrays GUI System
Intro to the SdkCameraMan Camera Controller

Please check them out and proofread if you can, guys. :)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by jacmoe »

Man, you kick ass! :)
Very thorough, enjoyable, polished. Just like your GSOC project. Colour me impressed. :D

I wouldn't mind at all if you just continued through the Ogre Wiki ... :twisted:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by spacegaier »

Just watched your latest video, and I would propose to also allow the user to toggle the help dialog via the F1 key (in addition to H), as this is probably the more common key for that.

I also put your three articles in the SoG2009 category, however I don't know if that the most suited for them. Is there more to come about this sample thing or is everything documented now? Because an own category for three articles is perhaps too much...
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by jacmoe »

You could put them in a OgreBites category, and a Samples Framework as well. Maybe even in a Samples category.. :)
Categories are for searching.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

jacmoe: Thanks for your comments. :D
spacegaier: The F1 shortcut was added before I even made the video. I just didn't mention it. Heh.

I don't think Summer of Code 2009 is a good tag at all. Yes, this work was done over the summer, but it's now part of the trunk, and there's no reason for anybody to know/care that this code was developed during the Summer of Code 2009. "Samples" should work well. I don't think the number of articles within a category would make the category more/less suitable.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by spacegaier »

Okay, my first thought: No!!!
But after rethinking it: Why not...Somebody could even write a little article about a specific sample and explain it in depth, which then would go in this category as well.

So, I am convinced now :) .

EDIT: One thing though (not only adressed at you, but everyone): If you enter code in the wiki, don't do this indentation hack to get it displayed in code style, but put a

Code: Select all

<pre></pre>
tag around it. Just for future refernce...
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

Oh okay. That was my first time making wikis, so I didn't know. I'll keep that in mind for the future.
EDIT: All fixed. :)
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:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by sinbad »

Great work on the wiki, really well written (as if I expected anything less). Thanks!
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

Thanks, sinbad! :D Now all that's left is the character model.
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by xadhoom »

The camera rolls itself a bit (looks like a wrong quaternion calculation) when looking around in the volume texture demo...
I´ve not seen this behaviour in other demos.

xad
User avatar
Noman
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by Noman »

Small question that popped into my mind when I converted demos :

We clearly stated that this sample framework will NOT be a simple application framework, and that ExampleApplication.h etc will remain.
However, if all the demos are ported to the new framework, there won't be any usage examples of ExampleApplication.h in the SDK, which I think is bad. (New users might not be aware of its existence)

I see four ways to solve this :
1) Keep some demos in the ExampleApplication framework
2) Duplicate some demos and put them in both frameworks
3) Add some of the tutorials to the SDK as ExampleApplication demos
4) Add a link in ExampleApplication.h to the wiki, where tutorials using it can be found. (Tho, will everyone find ExampleApplication.h to look at the wiki?)

Have we addressed this yet?
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by xavier »

I vote for letting ExampleApplication die a natural death and moving onto a more typical paradigm. This would mean redoing the tutorials of course. But that's just me...
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by jacmoe »

Let it go.
We already have Spacegaiers two frameworks (basic and advanced). :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
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:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by sinbad »

I left ExampleApplication.h and ExampleFrameListener.h in the repo simply to avoid unnecessarily breaking the code of users who already use them, and also to avoid invalidating all the tutorials that reference it. We won't be using it in the core anymore, but there's no point breaking stuff if we don't have to. If need be, we can add a simple unit test to prove that it still compiles as a backwards compatibility proof.

Going forward, it's been made clear to me that people wanting to learn how to create their own apps with Ogre would rather copy & paste a complete, self-contained template app as a starting point and hack on that, than to derive from 'example' classes. That's why I've been encouraging everyone to bear in mind the difference between the 2 groups of people making apps: the team and other users who just want to create a new sample or test an effect out (for whom the new sample browser is perfect), and those who want to learn how to make a new standalone app with Ogre, for whom something like the PracticalApplication in the wiki is more appropriate. ExampleApplication's problem is that it tried to cover both bases, and ended up doing neither 100% effectively. So yeah, maybe it won't be left to completely die until all the references to it are gone, but it will be considered legacy only from now on.
User avatar
Noman
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by Noman »

Ok :)

Omniter - I think I found a bug in the SelectMenu widget, probably related to item removal. To reproduce, get the latest trunk, and in the compositor demo do this :

1) Enable the "B&W" and "Laplace" compositors
2) Select the Laplace texture from the RTT debug menu in the top right corner
3) Disable the "Laplace" compositor
4) Try to select a texture from the RTT debug menu in the top right corner

This will result in a crash.
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by omniter »

Sure, thanks for letting me know. I'll check it out after class. :)
User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm
x 3

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by aguru »

There is a minor build error on linux in latest svn trunk (r9331):

Code: Select all

[ 87%] Building CXX object Samples/Compositor/CMakeFiles/Sample_Compositor.dir/src/Compositor.cpp.o
ogre/Samples/Compositor/src/Compositor.cpp: In member function ‘virtual void Sample_Compositor::checkBoxToggled(OgreBites::CheckBox*)’:    
ogre/Samples/Compositor/src/Compositor.cpp:271: error: ambiguous overload for ‘operator+’ in ‘std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>](((const char*)";")) + i’              
ogre/OgreMain/include/OgreUTFString.h:2346: note: candidates are: Ogre::UTFString Ogre::operator+(const Ogre::UTFString&, wchar_t)         
ogre/OgreMain/include/OgreUTFString.h:2341: note:                 Ogre::UTFString Ogre::operator+(const Ogre::UTFString&, char)            
ogre/OgreMain/include/OgreUTFString.h:2337: note:                 Ogre::UTFString Ogre::operator+(const Ogre::UTFString&, Ogre::uint32)    
ogre/OgreMain/include/OgreUTFString.h:2333: note:                 Ogre::UTFString Ogre::operator+(const Ogre::UTFString&, Ogre::uint16)    
ogre/OgreMain/include/OgreUTFString.h:2329: note:                 Ogre::UTFString Ogre::operator+(const Ogre::UTFString&, const Ogre::UTFString&) <near match>                                                                                                                                             
make[2]: *** [Samples/Compositor/CMakeFiles/Sample_Compositor.dir/src/Compositor.cpp.o] Error 1                                                                 
make[1]: *** [Samples/Compositor/CMakeFiles/Sample_Compositor.dir/all] Error 2                                                                                  
make: *** [all] Error 2    
In line 271, you just have to cast i to something explicit, like (unsigned int) and all is fine.
User avatar
Noman
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2
Contact:

Re: [SoC 2009 - Accepted] Unified Samples Framework & Browser

Post by Noman »

Thanks aguru! Fixed.
Post Reply