(C++)Irrlicht 1.1 : Fake Glow,Dream and Night Vision

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Anteater
Posts: 266
Joined: Thu Jun 01, 2006 4:02 pm
Location: Earth
Contact:

Post by Anteater »

Awesome! What's the license for this?
Simson
Competition winner
Posts: 95
Joined: Wed Nov 30, 2005 8:53 am
Location: France : midi pyrénées

Post by Simson »

The same license of irrlicht.
You can modify,ditribute, use for commercial project etc....
Anteater
Posts: 266
Joined: Thu Jun 01, 2006 4:02 pm
Location: Earth
Contact:

Post by Anteater »

I just added it to my game, and it's great. There is one very strange glitch, though. The gravity for my enemies has stopped working. I've had this problem involving RTT before, so I don't think it's a problem with your code.

EDIT: By the way, I used both glow at 128 and dream at 32 at the same time, and it created a beautiful light bloom effect.
Lee Zhi Eng
Posts: 34
Joined: Tue Aug 22, 2006 2:48 pm
Location: Malaysia

Post by Lee Zhi Eng »

40-50 frames per second on nVidia GeForce fx 5200.

Great! :D
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

WOW!!!!! :shock:
I say agian... WOW!!!!!
but anyway... This is gonna make it into my current game project somehow :D
pushpork
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

Post by buhatkj »

really cool effects, and easier to use than shaders it looks like...
I wish the shader interface was simpler, then it might be as straightforward to use as your code :-P
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

How can the shader interface get any simpler? Or rather, what is so complicated about it? I prefer using the shader interface over standard materials anyway.
Image
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

HELP!!!!

I tried it using Irrlicht 1.0 (the one my project uses) and fixed the ONE error (SMaterial doesn't have a PointCloud property in 1.0)
Now I get this: :cry:

Image

Any ideas? is it 1.0 or my code I'm using?
If not I'll have to try to upgrade to 1.1 again and fix the errors :evil:
pushpork
Simson
Competition winner
Posts: 95
Joined: Wed Nov 30, 2005 8:53 am
Location: France : midi pyrénées

Post by Simson »

Hello,
try to change in the "create" method the value of ScaleX and SizeY by :

Code: Select all

f32 resultat = cos((CamGlow->getFOV()/2));

resultat = 1.09f/resultat;

resultat = (resultat*resultat) - (1.09f*1.09f);

resultat = sqrt(resultat);

f32 SizeY = resultat;

f32 ScaleX = resultat * CamGlow->getAspectRatio();
It's the maths i use in the version 1.2 and that work perfect but it doesn't work in the 1.1 because I think the FOV is buggy.
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

Thanks... I'll try that when I get home :D
pushpork
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

nope... no effect :cry:
maybe I'll try a version of it without my 'game framework' in action as well... like a hello world or something.
pushpork
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

same demo code with your fix AND irrlicht 1.0
same problem.
Both driver, OGL & D3D.
I may give up on it for now :cry:
pushpork
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Hey i really like these effects and would like to use them in ShootIrr(look at project announcements) if u don't mind. Do you think that u could adjust the code that it works with a normal icamerascenenode? would be awesome
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

hmmm.
I tried the demo and it workes with 1.1, but as soon as I plug it into my game (updated to 1.1 :D ) it causes a crash :?
Maybe I'll try again.

I use VC++ toolkit 2003.
What compiler did u use?
Should I use irr:: for ambiguity problems in compiling?
Do you wish I would just shut up :D :shock: ?
pushpork
Simson
Competition winner
Posts: 95
Joined: Wed Nov 30, 2005 8:53 am
Location: France : midi pyrénées

Post by Simson »

Hello,
I have tested with GNU GCC under linux and windows with code::blocks and that work perfect.
I have compiled and tested this code with Visual C++ 2005 express and the platform SDK of microsoft and that work perfect to.
But maybe with the VC++ toolkit 2003 that doesn't work, i dunno ...
Post Reply