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

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

Post by Noman » Sat Oct 10, 2009 6:27 pm

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.
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] Improve Ogre's Compositor Framework

Post by CABAListic » Sat Oct 10, 2009 6:32 pm

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?
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] Improve Ogre's Compositor Framework

Post by Noman » Sat Oct 10, 2009 7:25 pm

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

Post by Noman » Sun Oct 11, 2009 1:26 pm

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...
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] Improve Ogre's Compositor Framework

Post by CABAListic » Sun Oct 11, 2009 2:05 pm

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

Post by Noman » Sun Oct 11, 2009 2:18 pm

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

Still need to test on mac - sinbad / anyone else up for it?
0 x

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] Improve Ogre's Compositor Framework

Post by Wolfmanfx » Sun Oct 11, 2009 4:31 pm

Applied the patches and compiling now so its just a matter of time :)
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

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

Post by Assaf Raman » Sun Oct 11, 2009 4:53 pm

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...).
0 x
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
Contact:

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

Post by masterfalcon » Sun Oct 11, 2009 5:02 pm

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?
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] Improve Ogre's Compositor Framework

Post by Noman » Sun Oct 11, 2009 5:07 pm

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.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

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

Post by sinbad » Sun Oct 11, 2009 5:26 pm

I'm supposed to be packing tonight but I'll see if I can quickly run it through on my Mac before I go.
0 x

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] Improve Ogre's Compositor Framework

Post by Wolfmanfx » Sun Oct 11, 2009 5:37 pm

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
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] Improve Ogre's Compositor Framework

Post by Noman » Sun Oct 11, 2009 5:44 pm

Did you unzip the binary media file from the comment section in the patch?
0 x

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] Improve Ogre's Compositor Framework

Post by Wolfmanfx » Sun Oct 11, 2009 5:47 pm

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

Post by Noman » Sun Oct 11, 2009 6:01 pm

It seems like the auto-generated shaders are not compiling properly. What hardware are you running on?
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

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

Post by sinbad » Sun Oct 11, 2009 8:01 pm

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.
0 x

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] Improve Ogre's Compositor Framework

Post by Wolfmanfx » Sun Oct 11, 2009 9:07 pm

I am on it also fixed the same error belongs with the new additons from masterfalcon.
0 x

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] Improve Ogre's Compositor Framework

Post by Wolfmanfx » Sun Oct 11, 2009 9:48 pm

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 :)
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

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

Post by masterfalcon » Sun Oct 11, 2009 11:02 pm

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?
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

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

Post by masterfalcon » Sun Oct 11, 2009 11:18 pm

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

Post by Noman » Mon Oct 12, 2009 8:40 am

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?
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

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

Post by sinbad » Wed Oct 14, 2009 1:51 pm

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 4184 times
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] Improve Ogre's Compositor Framework

Post by Noman » Wed Oct 14, 2009 2:14 pm

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..
0 x

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

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

Post by aguru » Wed Oct 14, 2009 2:56 pm

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.
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] Improve Ogre's Compositor Framework

Post by Noman » Wed Oct 14, 2009 2:59 pm

Doh! forgot about playpen. Fixed!
0 x

Locked