[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 99
Contact:

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

Post by Wolfmanfx »

Maybe you should use this epsilon?

Code: Select all

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

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 »

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

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

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 »

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.
/* 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
x 179
Contact:

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

Post by jacmoe »

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. :)
/* 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 99
Contact:

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

Post by Wolfmanfx »

Thats the idea :)

shanefarris
Greenskin
Posts: 107
Joined: Sun Mar 01, 2009 8:36 pm
x 6

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

Post by shanefarris »

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

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 »

Why, thank you! :)

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 »

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?
/* 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 »

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.

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 »

Thanks, Omniter! :)
/* 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 »

Keep up the good work.

Kudos :)

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 »

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?

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 »

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?

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 »

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.

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 »

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

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 »

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.

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 & Browse

Post by omniter »

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.

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 »

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.

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 & Browse

Post by omniter »

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?

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 »

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

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 & Browse

Post by omniter »

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.

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 »

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

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

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

Post by CABAListic »

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.

Post Reply