*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!
User avatar
Manuel
Gremlin
Posts: 193
Joined: Sat Apr 17, 2004 9:35 pm
Contact:

*OgrePostFilterManager* is born

Post by Manuel »

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
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

l33t
phear hingo

My Webpage
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

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
CombatWombat
Greenskin
Posts: 138
Joined: Fri Feb 04, 2005 11:05 pm
Location: Melbourne, Aus

Post by CombatWombat »

Ooh very nice! :D
joi
Gnome
Posts: 327
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Post by joi »

Cool! KEEP IT UP!
maya 7.0, vs 2005, ogre 1.2
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

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.
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 151
Contact:

Post by spookyboo »

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
skullfire
Gremlin
Posts: 150
Joined: Sat Mar 19, 2005 7:51 pm
Location: San Jose, Costa Rica
Contact:

Post by skullfire »

awesome, simply brilliant! *love this community!*
I may have alzheimer, but at least I dont have alzheimer.
User avatar
Manuel
Gremlin
Posts: 193
Joined: Sat Apr 17, 2004 9:35 pm
Contact:

Post by Manuel »

@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!
supersuper
Greenskin
Posts: 114
Joined: Wed Feb 11, 2004 5:41 pm
Location: England!

Post by supersuper »

Beautiful pictures!

Cannot wait for the code....
User avatar
discipline
OGRE Community Helper
OGRE Community Helper
Posts: 766
Joined: Mon May 16, 2005 12:09 am

Post by discipline »

very beautiful! That razor is looking better than ever!
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

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
Manuel
Gremlin
Posts: 193
Joined: Sat Apr 17, 2004 9:35 pm
Contact:

Post by Manuel »

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

Post by sinbad »

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
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

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)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

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 Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

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
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Here is the revival of the Heat Vision:
http://www.ogre3d.org/phpBB2/viewtopic. ... eat+vision

((The rest of the search results for "heat vision", require all words, are very interesting, indeed)) :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

Ah, very good. thanks
User avatar
Manuel
Gremlin
Posts: 193
Joined: Sat Apr 17, 2004 9:35 pm
Contact:

Post by Manuel »

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
Gremlin
Posts: 193
Joined: Sat Apr 17, 2004 9:35 pm
Contact:

Post by Manuel »

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
Gremlin
Posts: 193
Joined: Sat Apr 17, 2004 9:35 pm
Contact:

Post by Manuel »

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!
supersuper
Greenskin
Posts: 114
Joined: Wed Feb 11, 2004 5:41 pm
Location: England!

Post by supersuper »

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.
User avatar
Marcel_S
Gnoblar
Posts: 18
Joined: Thu Jul 07, 2005 2:31 pm
Location: Berlin, Germany
Contact:

Post by Marcel_S »

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

great work, the posteffects are beautiful!
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Post by Crashy »

Wonderfull :) :)
Follow la Moustache on Twitter or on Facebook
Image
Post Reply