Page 15 of 18

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

Posted: Wed Nov 04, 2009 12:54 am
by omniter
Oops. My bad.

EDIT: @sinbad, Where are the cfg files located in the trunk?

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

Posted: Wed Nov 04, 2009 9:23 am
by Noman
In (MainDir)\Cmake\Templates.
I converted the volumetex sample and also changed the config files there to use the new syntax.

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

Posted: Wed Nov 04, 2009 10:31 am
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

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

Posted: Wed Nov 04, 2009 6:04 pm
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. :)

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

Posted: Wed Nov 04, 2009 7:27 pm
by Wolfmanfx
startup sample works :) thx

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

Posted: Wed Nov 04, 2009 10:08 pm
by omniter
Whew. :) Oh, and thanks Noman for changing the cfgs for me. :)

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

Posted: Fri Nov 06, 2009 2:31 pm
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...

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

Posted: Sat Nov 07, 2009 9:38 pm
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. :)

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

Posted: Sat Nov 07, 2009 9:43 pm
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:

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

Posted: Sat Nov 07, 2009 11:21 pm
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...

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

Posted: Sat Nov 07, 2009 11:34 pm
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.

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

Posted: Sat Nov 07, 2009 11:45 pm
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.

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

Posted: Sun Nov 08, 2009 1:28 pm
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...

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

Posted: Sun Nov 08, 2009 2:50 pm
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. :)

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

Posted: Wed Nov 11, 2009 6:44 pm
by sinbad
Great work on the wiki, really well written (as if I expected anything less). Thanks!

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

Posted: Thu Nov 12, 2009 12:06 am
by omniter
Thanks, sinbad! :D Now all that's left is the character model.

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

Posted: Sun Nov 15, 2009 8:57 pm
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

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

Posted: Mon Nov 16, 2009 7:46 am
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?

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

Posted: Mon Nov 16, 2009 7:50 am
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...

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

Posted: Mon Nov 16, 2009 8:31 am
by jacmoe
Let it go.
We already have Spacegaiers two frameworks (basic and advanced). :)

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

Posted: Tue Nov 17, 2009 5:56 pm
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.

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

Posted: Fri Nov 20, 2009 5:56 pm
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.

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

Posted: Fri Nov 20, 2009 6:08 pm
by omniter
Sure, thanks for letting me know. I'll check it out after class. :)

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

Posted: Fri Nov 20, 2009 6:13 pm
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.

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

Posted: Fri Nov 20, 2009 6:37 pm
by Noman
Thanks aguru! Fixed.