[SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Threads related to Google Summer of Code
Locked
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] Improve Ogre's Compositor Framework

Post by Noman »

I'm pretty sure all the problems are consequences of case sensitivity. Some shader files are not found which lead to the programs not loading which lead to the compositors not load which lead to the segfault.

Is is my fault however. Shame that I can't set windows to be case sensitive to be able to double-check myself when fixing it, but I will do my best to fix all the case issues. Will try to upload a case-sensitive patch tomorrow.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by CABAListic »

I don't think the problem is that the shader files aren't found, but that they are empty - every single file within Samples/Media/DeferredShadingMedia/DeferredShading is empty. Or are those remnants, and the actual shaders are someplace else?
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] Improve Ogre's Compositor Framework

Post by Noman »

Hmm... Will double check everything and post a new version of the patch tomorrow.
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] Improve Ogre's Compositor Framework

Post by Noman »

New (V2) version of the patch available here :

https://sourceforge.net/tracker/index.p ... tid=302997

Changes :
- Style fixes - I think no more opening brace in same line as statement
- Linux compilation fixes
- Case sensitivity fixes (I hope I got all of them down)
- Updated to patch against current trunk
- Cleaned up media scripts to have no errors/warnings during script parsing.

Same routine - two patches and one zip, all should be applied in main ogre dir. I successfully patched, compiled and ran against trunk in windows using this patch.

About the empty files - I think patches can't delete files, only wipe them clean (when i finish patching, I get asked if i want to delete the now-empty files). If the empty files were glsl/hlsl, its fine. The only shaders the new demo uses are cg...
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by CABAListic »

Ok, patch compiles fine, sample is running now :)
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] Improve Ogre's Compositor Framework

Post by Noman »

Woohoo!
One step closer to merge! Thanks for the help!

Still need to test on mac - sinbad / anyone else up for it?
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] Improve Ogre's Compositor Framework

Post by Wolfmanfx »

Applied the patches and compiling now so its just a matter of time :)
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by Assaf Raman »

Noman wrote:Woohoo!
...
Still need to test on mac - sinbad / anyone else up for it?
My mac died (just to explain why I don't help here...).
Watch out for my OGRE related tweets here.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by masterfalcon »

Assaf Raman wrote:
Noman wrote:Woohoo!
...
Still need to test on mac - sinbad / anyone else up for it?
My mac died (just to explain why I don't help here...).
I may try at some point. I've been really busy with the samples browser on iphone and work(almost submission time). It's all checked into trunk right?
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] Improve Ogre's Compositor Framework

Post by Noman »

Not yet - we're going for the major platforms compatibility before we check into trunk. Windows and linux are down, mac is currently in testing.
If mac passes, I'll wait for the OK from sinbad and commit to trunk.
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] Improve Ogre's Compositor Framework

Post by sinbad »

I'm supposed to be packing tonight but I'll see if I can quickly run it through on my Mac before I go.
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] Improve Ogre's Compositor Framework

Post by Wolfmanfx »

http://nopaste.info/dd777c332f.html

The demo runs but sibenik.mesh does not show up and some material errors above in the log i will try it later again with a complete fresh checkout bute Athene is showing up and the mini lights also and the knots too.

[edit]
OS is SnowLeo
GCC 4.2
nv9400 MacMini
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] Improve Ogre's Compositor Framework

Post by Noman »

Did you unzip the binary media file from the comment section in the patch?
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] Improve Ogre's Compositor Framework

Post by Wolfmanfx »

yep the mesh is there its also shown in the log but i am getting a fresh checkout to eliminate possible user errors ;)
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] Improve Ogre's Compositor Framework

Post by Noman »

It seems like the auto-generated shaders are not compiling properly. What hardware are you running on?
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] Improve Ogre's Compositor Framework

Post by sinbad »

I built it ok but got an error in the resource setup:

Code: Select all

An exception has occured: OGRE EXCEPTION(7:InternalErrorException): /Users/steve/projects/Cthugha/ogre/build/osx/bin/Debug/Demo_Compositor.app//Users/steve/projects/Cthugha/ogre/Samples/Media/packs/OgreCore.zip - error whilst opening archive: Unable to read zip file. in ZipArchive::checkZzipError at /Users/steve/projects/Cthugha/ogre/OgreMain/src/OgreZip.cpp (line 280)DefaultWorkQueue('Root') 
This just looks like a problem with not identifying absolute paths on OS X and prepending the bundle location inappropriately. The correct way to do it is shown in ExampleApplication:

Code: Select all

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_IPHONE
                // OS X does not set the working directory relative to the app,
                // In order to make things portable on OS X we need to provide
                // the loading with it's own bundle path location
				if (!StringUtil::startsWith(archName, "/", false)) // only adjust relative dirs
					archName = String(macBundlePath() + "/" + archName);
#endif
                ResourceGroupManager::getSingleton().addResourceLocation(
                    archName, typeName, secName);
I'm afraid I'm completely out of time now as I have to pack, good to see WolfmanFX can help too anyway.
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] Improve Ogre's Compositor Framework

Post by Wolfmanfx »

I am on it also fixed the same error belongs with the new additons from masterfalcon.
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] Improve Ogre's Compositor Framework

Post by Wolfmanfx »

So tested it with a complete fresh checkout (build without threading and without boost) and everything works right of the box i have also recorded a movie thats show that the demo is working i will just upload it.

[edit]
Here the link http://www.team-bytestorm.com/Screen%20 ... mputer.m4v

Maybe it would be a better approach to enable relative paths on mac/iphone through a explicit chdir

Code: Select all

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_IPHONE
               chdir(macBundlePath());
#endif
then i do not have to prefix every relative resource with bundlePath

btw nice work :)
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by masterfalcon »

Wolfmanfx wrote:So tested it with a complete fresh checkout (build without threading and without boost) and everything works right of the box i have also recorded a movie thats show that the demo is working i will just upload it.

[edit]
Here the link http://www.team-bytestorm.com/Screen%20 ... mputer.m4v

Maybe it would be a better approach to enable relative paths on mac/iphone through a explicit chdir

Code: Select all

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_IPHONE
               chdir(macBundlePath());
#endif
then i do not have to prefix every relative resource with bundlePath

btw nice work :)
Thanks Wolfman! I'm taking a look at it right now.

BTW, should fixes be committed to the branch?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by masterfalcon »

I'm just gonna attach the patched Compositor.cpp.
Attachments
Compositor.cpp.zip
(5.57 KiB) Downloaded 158 times
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] Improve Ogre's Compositor Framework

Post by Noman »

Theoretically we should, but these things appeared when I merged my work into head, so we'll have to merge changes back into the branch as well, which I'm not sure I want to do.
Anyway, updated the next version of the patch :

https://sourceforge.net/tracker/index.p ... tid=302997

So if both demos work on mac, windows and linux, I think we're good to go. Am I right?
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] Improve Ogre's Compositor Framework

Post by sinbad »

I tested on my Mac while squatting in a corridor of the hotel the conference is being held in :)

Builds & runs, slightly odd display that looks like some of the surrounding church mesh is missing, and still the issue with the torus knots normal maps looking a little wrong, but if it builds & runs on Windows & Linux too it's in a fit enough state to merge and resolve these issues in trunk.
Screen shot 2009-10-14 at 13.46.28.jpg
Screen shot 2009-10-14 at 13.46.28.jpg (101.74 KiB) Viewed 5738 times
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] Improve Ogre's Compositor Framework

Post by Noman »

Just committed the patch into trunk! The project is now part of Ogre head!
I just got a fresh checkout of trunk, everything works cleanly on windows.
Would be happy if the platform testers could try as well..
User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm
x 3

Re: [SoC 2009 - Accepted] Improve Ogre's Compositor Framework

Post by aguru »

Code: Select all

[100%] Building CXX object Tests/PlayPen/CMakeFiles/PlayPen.dir/src/PlayPen.cpp.o
/home/mz/Development/ogre/Tests/PlayPen/src/PlayPen.cpp: In member function 'void PlayPenApplication::testCompositorTechniqueSwitch(bool)':
/home/mz/Development/ogre/Tests/PlayPen/src/PlayPen.cpp:3277: error: 'class Ogre::CompositionTechnique::TextureDefinition' has no member named 'shared'
/home/mz/Development/ogre/Tests/PlayPen/src/PlayPen.cpp:3295: error: 'class Ogre::CompositionTechnique::TextureDefinition' has no member named 'shared'
make[2]: *** [Tests/PlayPen/CMakeFiles/PlayPen.dir/src/PlayPen.cpp.o] Error 1
make[1]: *** [Tests/PlayPen/CMakeFiles/PlayPen.dir/all] Error 2
I know PlayPen is not really top priority, but I thought I'd post the info anyway :) With disabled "tests" in the cmake config everything compiles and installs fine.
I'm on linux btw.
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] Improve Ogre's Compositor Framework

Post by Noman »

Doh! forgot about playpen. Fixed!
Locked