[SoC 2009 - Accepted] Unified Samples Framework & Browser

Threads related to Google Summer of Code
Post Reply
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

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

Post by Wolfmanfx » Thu Jan 14, 2010 9:59 pm

Maybe you should use this epsilon?

Code: Select all

#include <limits>
std::numeric_limits<Ogre:Real>::epsilon;
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

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

Post by jacmoe » Thu Jan 14, 2010 10:01 pm

So, just for get about the scaling.
Set the epsilon to 0.0000001 and everything is great.
0 x
/* 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

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

Post by omniter » Thu Jan 14, 2010 10:27 pm

Are you talking about the new "fast mode" that was added? Heh, I was wondering what that was all about. Thanks for the fix. :)
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

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

Post by jacmoe » Thu Jan 14, 2010 10:33 pm

No. :)
The problem is simply the epsilon which is set too high for really low camera speeds.
It works with a topspeed of 3.0f now.
I only noticed because I am working on a scene loader for the Blender exporter where everything is 1 metre/1 unit.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

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

Post by jacmoe » Thu Jan 14, 2010 10:34 pm

Wolfmanfx wrote:Maybe you should use this epsilon?

Code: Select all

#include <limits>
std::numeric_limits<Ogre:Real>::epsilon;
Looks like a nice universal solution. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

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

Post by Wolfmanfx » Thu Jan 14, 2010 11:06 pm

Thats the idea :)
0 x

shanefarris
Greenskin
Posts: 105
Joined: Sun Mar 01, 2009 8:36 pm

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

Post by shanefarris » Mon Jan 18, 2010 6:16 pm

omiter, just started looking at the framework now, nice job!
0 x

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

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

Post by omniter » Mon Jan 18, 2010 6:20 pm

Why, thank you! :)
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

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

Post by jacmoe » Tue Jan 19, 2010 10:22 am

jacmoe wrote:
Wolfmanfx wrote:Maybe you should use this epsilon?

Code: Select all

#include <limits>
std::numeric_limits<Ogre:Real>::epsilon;
Looks like a nice universal solution. :)
Is this going to be committed? :)
Or should I file a patch?
0 x
/* 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

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

Post by omniter » Tue Jan 19, 2010 2:59 pm

Okay, commited. :)

Oh and by the way, Noman, the Compositors sample makes the browser's shady overlay all white. I don't understand compositors all too well, so I don't know if this is unavoidable for the sample, but this effect remains after the sample ends, so I'm guessing something isn't being cleaned up.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

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

Post by jacmoe » Tue Jan 19, 2010 3:13 pm

Thanks, Omniter! :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

vocoder84
Gnoblar
Posts: 1
Joined: Fri Dec 04, 2009 4:03 am

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

Post by vocoder84 » Tue Jan 26, 2010 5:43 am

Keep up the good work.

Kudos :)
0 x

User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm

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

Post by aguru » Thu Jan 28, 2010 4:30 pm

On gentoo linux I get crashes with the Sinbad example:[codeSampleBrowser: /home/mz/Development/ogre/svn/OgreMain/include/OgreMath.h:578: static T Ogre::Math::Clamp(T, T, T) [with T = float]: Assertion `minval < maxval && "Invalid clamp range"' failed.
][/code]

It only happens when I use the WASD keys to walk around. Anyone else hitting that bug?
0 x

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

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

Post by omniter » Thu Jan 28, 2010 7:32 pm

Well, I'm guessing the problem originates from somewhere around here:

Code: Select all

			Real yawAtSpeed = yawToGoal / Math::Abs(yawToGoal) * deltaTime * TURN_SPEED;
			// reduce "turnability" if we're in midair
			if (mBaseAnimID == ANIM_JUMP_LOOP) yawAtSpeed *= 0.2f;

			// turn as much as we can, but not more than we need to
			if (yawToGoal < 0) yawToGoal = Math::Clamp<Real>(yawToGoal, yawAtSpeed, 0);
			else if (yawToGoal > 0) yawToGoal = Math::Clamp<Real>(yawToGoal, 0, yawAtSpeed);
But I can't see what the problem is...
Math::Abs(yawToGoal) * deltaTime * TURN_SPEED will always be positive...
so yawAtSpeed and yawToGoal will always have the same sign.
If yawToGoal is < 0, then yawAtSpeed will be < 0, so Clamp(yawToGoal, yawAtSpeed, 0) should be fine (min < max).
If yawToGoal is > 0, then yawAtSpeed will be > 0, so Clamp(yawToGoal, 0, yawAtSpeed) should also be fine (min < max).

I don't get your bug, but then again, I'm not running Gentoo. Anyone else having this issue?
0 x

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

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

Post by Noman » Mon Feb 01, 2010 2:32 pm

Fixed the compositor white screen thing (it wasn't a matter of the compositor framework, but the RTT display was modifying a pass that the framework used internally, changing the texture name. I don't know why a copy of the material isn't used, but oh well).

Also fixed some stop/start/stop/start related crashes, I can't get any others reproducing now.
0 x

User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany

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

Post by xadhoom » Tue Feb 09, 2010 11:41 am

Just one more crash:
- start instancing demo
- select shadow checkbox
- go back to menu
- select shadow sample
->crash in release mode (didn´t check the debug mode)
So the instancing demo is missing some shadow parameter cleanup?!

Btw: When setting "static geometry" in the instancing demo some of the space ships still disappear at the top of the stack...

xad
0 x

censor
Kobold
Posts: 27
Joined: Sat Jun 19, 2010 8:18 pm
Location: Erie, PA

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

Post by censor » Sat Jun 26, 2010 4:33 am

Hi! I noticed the following apparent bug in the Dynamic Texturing (DynTex) sample as available from the sample browser in Version 1.7.1. When I compiled OGRE 1.7.1 from the source using Visual Studio 2008 under Windows 7 Ultimate, the frost was temporarily cleaned in wrong places, several hundred pixels above the mouse cursor (with the left button down and the mouse being moved around). When I compiled OGRE 1.7.1 from the same source using Visual Studio 2008 under Windows XP Professional on another computer, the frost was cleaned correctly in the area immediately under the mouse cursor. If this is not the right forum to report suspected bugs for discussion, please let me know which one's right.
0 x

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

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

Post by omniter » Sat Jun 26, 2010 8:44 am

I can't think of a better place to report this problem, but I honestly can't diagnose it. I don't see why it would happen under one OS and not another.
0 x

censor
Kobold
Posts: 27
Joined: Sat Jun 19, 2010 8:18 pm
Location: Erie, PA

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

Post by censor » Sat Jun 26, 2010 3:52 pm

I ran the Windows 7 version one more time and realized that the whole frost area is shifted half a screen up relative to the bird there, so only half of the screen is getting covered with the frost. So the mouse position is read in the right place, but the effect of the action is displayed in a wrong place.
0 x

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

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

Post by omniter » Tue Jul 06, 2010 7:35 am

I'm using the same OS and compiler as you are. I tried with the 1.7.1 SDK, and there was no problem. You said you compiled OGRE from source?
0 x

censor
Kobold
Posts: 27
Joined: Sat Jun 19, 2010 8:18 pm
Location: Erie, PA

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

Post by censor » Thu Jul 08, 2010 6:58 pm

This is correct. I compiled from source, then ran the sample browser. I started the penguin-frost sample from the sample browser.
0 x

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

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

Post by omniter » Fri Jul 09, 2010 4:59 am

Okay, that's just weird. I compared the new source and the SDK code, and it's exactly the same, except that Ogre::uint8 changed to uint.
0 x

SimonW
Gnoblar
Posts: 21
Joined: Wed Aug 12, 2009 3:39 pm
Location: Vienna, Austria

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

Post by SimonW » Thu Oct 07, 2010 8:34 am

Hi, everyone,

over the last year, I created a SSAO sample based on the sample browser as my bachelor's project. (sources and a preliminary documentation can be found at https://bitbucket.org/simonwallner/ogre-ssao-sample and https://bitbucket.org/simonwallner/ssao ... x/ssao.pdf, official announcement to follow in the next days.)

Now I wonder, if it was possible to distribute my compiled version of my sample separately from the ogre core, so that users can just download the small sample and start it with an existing version of the sample browser, without further configuration?

kind regards,
Simon
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

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

Post by CABAListic » Thu Oct 07, 2010 8:47 am

In principle, yes, but your compiler and build settings would have to match exactly with those used to build the Ogre version your users have. Simplest way would be to use the SDK version of Ogre for your compiler and build the sample with it; then everyone with the same compiler who uses the SDK could run your sample.
0 x

Post Reply