Simple projects, but useful (OpenGL) [Updated: 12-01-2010]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Simple projects, but useful (OpenGL) [Updated: 12-01-2010]

Post by Viz_Fuerte »

Hey, hi :D

After much "try" to any game with Irrlicht, I realized that that was not mine, mine is to make tutorials and sample projects. :lol:

I created this new topic, to show my projects. These are simple, but I think very useful and very clear to understand.

Projects created:
- Bloom
- Projective textures
- Depth shadow mapping
- Per-pixel Point light.
- Depth of field.

The first project... Bloom.
Image
Comment: -Debug view mode -
Exe -> http://www.elcreadordavid.hostei.com/pr ... om_EXE.zip
Sorce Code-> http://www.elcreadordavid.hostei.com/pr ... oom_SC.zip

The second project... Projective textures.
Image
Comment: The texture is projected even behind the model (¿bug?)
Exe-> http://www.elcreadordavid.hostei.com/pr ... ve_EXE.zip
Source Code-> http://www.elcreadordavid.hostei.com/pr ... ive_SC.zip

The third project... Depth shadow mapping.
Image
Comment: Many artifacts (the normal using this type of shadow)
Exe-> http://www.elcreadordavid.hostei.com/pr ... SM_EXE.zip
Source Code-> http://www.elcreadordavid.hostei.com/pr ... DSM_SC.zip

The fourth project... Per-pixel point light.
Image
Comment: You can improve performance :lol:
Exe-> http://www.elcreadordavid.hostei.com/pr ... PL_EXE.zip
Source Code-> http://www.elcreadordavid.hostei.com/pr ... PPL_SC.zip

The fifth project... Depth of field.
Image
Comment: Can not get the affect to grid.
Exe-> http://www.elcreadordavid.hostei.com/pr ... OF_EXE.zip
Source Code-> http://www.elcreadordavid.hostei.com/pr ... DOF_SC.zip
Last edited by Viz_Fuerte on Tue Apr 20, 2010 9:53 pm, edited 12 times in total.
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

That looks awesome. Good job :D
multum in parvo
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

Hey, thanks!!

I think that my next project will not be the "Depth of field ".... because I already have prepared a demo with projective textures. :D

The demo, use "multipass", so that the textures are projected onto any material, whether shaders or materials incorporating the Irrlicht.

Be quick and easy :wink:
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

this is cool :D
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

hi
tried it out, coz i pretty want bloom effect in my game, but... this is kinda slow.
it runs with 13 fps on my notebook XD

and i changed the brightness, and the multiplier, but didnt see any changes O.o

cool example thou :3
Image
Image
andres
Competition winner
Posts: 78
Joined: Tue Jul 08, 2008 5:18 pm
Location: Guarapuava/Brazil
Contact:

Post by andres »

nice work!
waiting for projective textures.
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Image
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

Has been done. 8)

I had to take the code of a camera and apart, from there create a projector, easy... but It happens that when the texture affects a mesh, we also casts the texture behind the same surface.

If someone can improve it, improve it. :wink:
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Cool. But neither the first, nor the second demos run on Radeon 9550. Any guesses? :?
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

It's strange, since the effects are written in ARB (more compatible) and not in GLSL.

Another possibility is that you try to compile the code with the downloaded project of the Irrlicht from their website and i use a version of Irrlicht with image loader DDS (thanks Nadro :wink: )
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

I`m not trying to compile it- just running the executable and it crashes at the very beginning- even before the console window gets loaded. :wink:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

Another project. 8)

In this project, I used the same effect to extract the depth of texture, as used in XEffects. As usual with this kind of textures, creating small artifacts.

It must be said that the projects do, is to convey an idea of what should be done to achieve these effects are not completed for use.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

I especially like your projection texture project, keep it up! :D
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

Hey, thank you very much.
I hope, that will be of assistance in any project that needs it :wink:

I have to say are not entirely complete for use, but at least they are made.
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

Well, the fourth project is something that maybe, you going to use more than.
You can create as many points of light, as you wish, so if, performance note ... well, that something can be arranged by arranging the code.

:D
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

man you're quick!
Post Reply