Google

*OgrePostFilterManager* is born

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!

Moderators: OGRE Team, Moderators

*OgrePostFilterManager* is born

Postby Manuel » Fri Jul 22, 2005 2:35 am

Well, i just finished assembling my sub-project, the OgrePostFilterManager.
By using the addon, you'll be able to implement postfilter effects in Ogre just like you think about the compounding passes: i'll obviously release the code, but i need to clean it up and debug it a little more.
While testing it, i ported the good old heat vision effect:

Image

Then, i fired up RenderMonkey and exported my 3-passes bloom effect: i've exported it with the free Ogre's RenderMonkey exporter and then manually adjusted.
While the bloom was already done (i coded it time ago), the entire Ogre implementation process has required no more than 1 minutes (!), just the time to remember the filter chain 8)

Here are some shoots of the original "Samples/CubeMapping" demo with the bloom addition.

Image

i love this one!
Image
Image
Image
Image


And here are the Ogre's implementations:

HeatVision
Code: Select all
         RenderTexture* rt0 = SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt0", 256, 256 );
         setupRenderTextureAndViewport( rt0 );
         OgrePostFilterPass *pass0, *pass1;

         pass0 = new OgrePostFilterPass( "Fury/HeatVision/LightToHeat" );
         pass0->addInputTexture( NULL );
         pass0->setOutputTexture( rt0 );

         pass1 = new OgrePostFilterPass( "Fury/HeatVision/Blur" );
         pass1->addInputTexture( rt0 );
         pass1->setOutputTexture( NULL );

         filterPasses.push_back( pass0 );
         filterPasses.push_back( pass1 );



Bloom
Code: Select all
         RenderTexture* rt0 = SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt0", 128, 128 );
         setupRenderTextureAndViewport( rt0 );

         RenderTexture* rt1 = SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt1", 256, 256 );
         setupRenderTextureAndViewport( rt1 );

         OgrePostFilterPass *pass0, *pass1, *pass2;

         pass0 = new OgrePostFilterPass( "PostFilters/Blur0" );
         pass0->addInputTexture( NULL );
         pass0->setOutputTexture( rt0 );
         filterPasses.push_back( pass0 );

         pass1 = new OgrePostFilterPass( "PostFilters/Blur1" );
         pass1->addInputTexture( rt0 );
         pass1->setOutputTexture( rt1 );
         filterPasses.push_back( pass1 );

         pass2 = new OgrePostFilterPass( "PostFilters/Bloom" );
         pass2->addInputTexture( NULL );
         pass2->addInputTexture( rt1 );
         pass2->setOutputTexture( NULL );
         filterPasses.push_back( pass2 );



As soon as i'll find the time to clean it up and testing a bit more i'll release it :o
User avatar
Manuel
Veteran
 
Posts: 308
Joined: Sat Apr 17, 2004 9:35 pm

Postby Robomaniac » Fri Jul 22, 2005 2:39 am

l33t
phear hingo

My Webpage
User avatar
Robomaniac
Veteran
 
Posts: 736
Joined: Tue Feb 03, 2004 6:39 am

Postby Praetor » Fri Jul 22, 2005 3:00 am

Wow, I'd been thinking about this for a while, but of course i was far from the point when i'd need to start doing post processing. Very impressive indeed.
User avatar
Praetor
OGRE Team Member
OGRE Team Member
 
Posts: 3285
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US

Postby CombatWombat » Fri Jul 22, 2005 3:35 am

Ooh very nice! :D
User avatar
CombatWombat
Regular
 
Posts: 140
Joined: Fri Feb 04, 2005 11:05 pm
Location: Melbourne, Aus

Postby joi » Fri Jul 22, 2005 4:30 am

Cool! KEEP IT UP!
maya 7.0, vs 2005, ogre 1.2
joi
Veteran
 
Posts: 329
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Postby nfz » Fri Jul 22, 2005 5:13 am

Fantastic stuff Manual! Can't wait to see the code. I have been following your posts about post filtering with great interest since I have been modifying Ogre internals to make this process a lot easier. Some of its in cvs HEAD already but the changes to RTT aren't yet. Wumpus is also enhancing RTT which will make texture rendering a lot easier.

I think your post is an excellent candidate for the the Showcase section, but who knows, maybe it will get moved :D.
nfz
OGRE Contributor
OGRE Contributor
 
Posts: 1466
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Postby spookyboo » Fri Jul 22, 2005 6:06 am

I'm was planning something similar in my FXplugin that I'm working on. I'm afraid that I have to steal your code and use that.
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
 
Posts: 884
Joined: Tue Jul 06, 2004 5:57 am

Postby skullfire » Fri Jul 22, 2005 7:12 am

awesome, simply brilliant! *love this community!*
I may have alzheimer, but at least I dont have alzheimer.
User avatar
skullfire
Regular
 
Posts: 150
Joined: Sat Mar 19, 2005 7:51 pm
Location: San Jose, Costa Rica

Postby Manuel » Fri Jul 22, 2005 8:25 am

@nfz
I didn't know you modified Ogre internals, so i think it will be pretty fast ;)
Are these modifications into the "ogreaddons" directory?! Sure i'll take a look because i have some thoughts about this too ;)
Feel free to move the thread where you think is best: i have had some doubt about where to post it..

@spookyboo
Eheh ;) No problem for me, i'm glad i can help you out!
User avatar
Manuel
Veteran
 
Posts: 308
Joined: Sat Apr 17, 2004 9:35 pm

Postby supersuper » Fri Jul 22, 2005 8:35 am

Beautiful pictures!

Cannot wait for the code....
supersuper
Veteran
 
Posts: 293
Joined: Wed Feb 11, 2004 5:41 pm
Location: England!

Postby discipline » Fri Jul 22, 2005 8:38 am

very beautiful! That razor is looking better than ever!
User avatar
discipline
OGRE Community Helper
OGRE Community Helper
 
Posts: 766
Joined: Mon May 16, 2005 12:09 am
Location: San Diego, CA, USA

Postby :wumpus: » Fri Jul 22, 2005 11:08 am

Sounds very cool and useful.. I'm sure it could get you a place in ogreaddons if you want :) Shouldn't this be in showcase?
User avatar
:wumpus:
OGRE Team Member
OGRE Team Member
 
Posts: 3760
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands

Postby Manuel » Fri Jul 22, 2005 12:19 pm

:wumpus: wrote:Sounds very cool and useful.. I'm sure it could get you a place in ogreaddons if you want :) Shouldn't this be in showcase?


Well, that's a good place to live ;)
User avatar
Manuel
Veteran
 
Posts: 308
Joined: Sat Apr 17, 2004 9:35 pm

Postby sinbad » Fri Jul 22, 2005 2:08 pm

Lovely job :) Yes, this should go into ogreaddons - if it's not in the next couple of days, ask one of the other devs to organise it since I'll be on leave.
User avatar
sinbad
OGRE Founder, Ex-Lead
OGRE Founder, Ex-Lead
 
Posts: 25661
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands

Postby jacmoe » Fri Jul 22, 2005 3:26 pm

This is beautiful! :)
Finally, it looks like you can actually program shaders with Ogre without bending over backwards!
Really nice! Looking forward to playing with this! 8)
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - Ogre project wizards for VC8, VC9, VC10 and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17873
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby Praetor » Fri Jul 22, 2005 4:43 pm

Manual wrote:SharedData::getSingleton().iRoot->getRenderSystem()->createRenderTexture( "rt0", 256, 256 );


Hrrm, is this your code, is this a call into the Ogre engine?

@nfz This seems a little awkward, like he's reaching into some dark area of the engine. iRoot? Is this the kind of thing you were talking about changing with the RTT elements of Ogre? Or maybe this is Manual's class.

Either way, excellent job again. Needs a wiki and an addon. I can't wait to just "plug" in some shaders!
User avatar
Praetor
OGRE Team Member
OGRE Team Member
 
Posts: 3285
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US

Postby Praetor » Fri Jul 22, 2005 4:47 pm

Oh, and a question for Manual about your heat vision. It looks like the shader just takes the light from the scene and uses that? Have you thought about creating "heat textures" for the entities? When the heat vision is off, you use the normal textures, when the heat vision is on, you use these textures to represent the entity's heat? Thought maybe it would be a help to be more like real heat vision.
User avatar
Praetor
OGRE Team Member
OGRE Team Member
 
Posts: 3285
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US

Postby jacmoe » Fri Jul 22, 2005 4:52 pm

Here is the revival of the Heat Vision:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=8031&highlight=heat+vision

((The rest of the search results for "heat vision", require all words, are very interesting, indeed)) :wink:
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - Ogre project wizards for VC8, VC9, VC10 and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17873
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby Praetor » Fri Jul 22, 2005 5:00 pm

Ah, very good. thanks
User avatar
Praetor
OGRE Team Member
OGRE Team Member
 
Posts: 3285
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US

Postby Manuel » Fri Jul 22, 2005 5:23 pm

Thank you for the appreciation friends, also props to the great Ogre that let's you what you really want!

@Praetor
Praetor wrote:Hrrm, is this your code, is this a call into the Ogre engine?


Yes, it's my own code: it's a singleton (SharedData) to remove hacky globals, except rare cases, i hate them all :shock:
Code: Select all
iRoot
isn't a dark area of the engine, you need it if you want to be able to create renderTexture objects the right way.
About the HeatVision: sure it would be great implementing "heat textures" but the demo i wrote was a just-for-fun thing, usefull only for getting experienced on shaders programming. Feel free to modify it :D
User avatar
Manuel
Veteran
 
Posts: 308
Joined: Sat Apr 17, 2004 9:35 pm

Postby Manuel » Fri Jul 22, 2005 5:31 pm

sinbad wrote:Lovely job :) Yes, this should go into ogreaddons - if it's not in the next couple of days, ask one of the other devs to organise it since I'll be on leave.


@sinbad
Thank you sinbad, i hope to be able to do it in the next days. In addition, i'll really appreciate any design-related comments/critics (from your own but also from everyone).
User avatar
Manuel
Veteran
 
Posts: 308
Joined: Sat Apr 17, 2004 9:35 pm

Postby Manuel » Fri Jul 22, 2005 5:37 pm

jacmoe wrote:This is beautiful! :)
Finally, it looks like you can actually program shaders with Ogre without bending over backwards!
Really nice! Looking forward to playing with this! 8)


Thank you jacmoe, hope to release it soon!
User avatar
Manuel
Veteran
 
Posts: 308
Joined: Sat Apr 17, 2004 9:35 pm

Postby supersuper » Sat Jul 23, 2005 8:17 am

Please include more examples of filters when you release this (to prove that it works in all cases).

Crashy would certainly love this code for his demo.
supersuper
Veteran
 
Posts: 293
Joined: Wed Feb 11, 2004 5:41 pm
Location: England!

Postby Marcel_S » Sat Jul 23, 2005 12:56 pm

:D WOW!! we want that!!!!

great work, the posteffects are beautiful!
User avatar
Marcel_S
Newcomer
 
Posts: 18
Joined: Thu Jul 07, 2005 2:31 pm
Location: Berlin, Germany

Postby Crashy » Sat Jul 23, 2005 2:28 pm

Wonderfull :) :)
Ploum ploum....;
Crashy
Veteran
 
Posts: 929
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France

Next

Return to Showcase

Who is online

Users browsing this forum: GenesisRage, Jeason and 4 guests