Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,615 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 964 people online right now. Registration is fast and FREE... Join Now!




OpenGL Tips and Special Effects

2 Pages V  1 2 >  
Reply to this topicStart new topic

OpenGL Tips and Special Effects

stayscrisp
post 12 Jul, 2008 - 08:04 AM
Post #1


D.I.C Regular

***
Joined: 14 Feb, 2008
Posts: 258



Thanked 6 times
My Contributions


hey there

Does anyone know any cool special effects for opengl, im just putting together a tech demo for college and finding lots of cool techniques and special effects. I currently am using the stencil buffer for reflections and projected shadows , if anyone wants to know how to do this just ask and if anyone has any ideas of new special effects i could incorporate that would be great smile.gif currently working on environment mapping

cheers
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 12 Jul, 2008 - 04:27 PM
Post #2


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


Parallax mapping
User is offlineProfile CardPM

Go to the top of the page

stayscrisp
post 12 Jul, 2008 - 06:14 PM
Post #3


D.I.C Regular

***
Joined: 14 Feb, 2008
Posts: 258



Thanked 6 times
My Contributions


QUOTE(Tom9729 @ 12 Jul, 2008 - 05:27 PM) *

Parallax mapping


elaborate?
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 13 Jul, 2008 - 11:00 AM
Post #4


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


http://www.google.com/search?q=parallax+mapping
User is offlineProfile CardPM

Go to the top of the page

stayscrisp
post 13 Jul, 2008 - 11:50 AM
Post #5


D.I.C Regular

***
Joined: 14 Feb, 2008
Posts: 258



Thanked 6 times
My Contributions


QUOTE(Tom9729 @ 13 Jul, 2008 - 12:00 PM) *



I could have done that tongue.gif
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 13 Jul, 2008 - 01:58 PM
Post #6


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


tongue.gif Soft shadows would be interesting as well.

And I've always liked the motion blur effect.
User is offlineProfile CardPM

Go to the top of the page

stayscrisp
post 13 Jul, 2008 - 02:13 PM
Post #7


D.I.C Regular

***
Joined: 14 Feb, 2008
Posts: 258



Thanked 6 times
My Contributions



do you use the accumulation buffer for motion blur, iv heard something like that. gonna have to research it.
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 13 Jul, 2008 - 02:37 PM
Post #8


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


I haven't the slightest clue. smile.gif
User is offlineProfile CardPM

Go to the top of the page

bobjob
post 13 Jul, 2008 - 06:53 PM
Post #9


D.I.C Head

**
Joined: 29 Mar, 2008
Posts: 61



Thanked 1 times
My Contributions


I dont know what your fimiliar with so im just gonna say a few, hopefully some are at least helpful.

a few relatively easy ones that have a nice effect are.

Bloom effect:
basically copy the screen to an image. shrink it to, half or a quarter of the original. place it back over the original image, with a blending effect that only blends the birghter parts. increase the bloom by placing it a few more times a pixel or two away from the last shrunkn images location (i hope you get that).

If your playing around with the stencil buffer. you may want to look into stencil shadows. really cool stuff. I found the nehe tutorials (27) really helpful for this. the code can be tweeked alot, but nun the less the concept is really great.

yeah like tom said parallax bump mapping, but thats more about using the fragment/vertex shaders. really easy to implement as there is heeps of variations of the shaders available. all you need to know is how to use the shaders. and thats simple enough. I personally havnt spent much time with shader language, so i wouldnt know how to create it fresh.

if you want to show a demo, and your playing with light sources. Its fun to dazzle ppl with particle effects as the light source. simple and effective.

User is offlineProfile CardPM

Go to the top of the page

stayscrisp
post 14 Jul, 2008 - 12:58 PM
Post #10


D.I.C Regular

***
Joined: 14 Feb, 2008
Posts: 258



Thanked 6 times
My Contributions



thanks for the help guys, im gonna check those things out.

having real trouble with sphere mapping at the minute, for some reason it alters every textured object even tho its only called on one object :s

if anyone can help ill post the code smile.gif
User is offlineProfile CardPM

Go to the top of the page

bobjob
post 14 Jul, 2008 - 05:05 PM
Post #11


D.I.C Head

**
Joined: 29 Mar, 2008
Posts: 61



Thanked 1 times
My Contributions


QUOTE(stayscrisp @ 14 Jul, 2008 - 01:58 PM) *

having real trouble with sphere mapping at the minute, for some reason it alters every textured object even tho its only called on one object :s


sphere mapping, as in cube mapping? not tryn 2 be anal just tryn to undestand, because sphere mapping is taking an image and rapping it around a sphere.
If its sphere mapping then it should only be related to texture co-ordinates and not effect any other model.

Cube mapping sounds like what u may be doing. If it is then im guessing u are enabling a client state at some time before drawing the object. I generally enable client state just before drawing the cube mapped model, or group of cube mapped models, then disable it just after.

eg.
CODE

glActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_CUBE_MAP_ARB);


hope that helps.

User is offlineProfile CardPM

Go to the top of the page

stayscrisp
post 14 Jul, 2008 - 06:11 PM
Post #12


D.I.C Regular

***
Joined: 14 Feb, 2008
Posts: 258



Thanked 6 times
My Contributions



They are spheres so yeah its sphere mapping, opengl has functions that do this

glEnable(GL_S, GL_TEXTURE_2D, &textureId);
glEnable(GL_T, GL_TEXTURE_2D, &textureId);

these are called once u have binded the texture, with a few other parameters

my drawing code is a bit messy so it could just be that, but it looks fine to me and i push and pop matrix :s

really really frustrating
User is offlineProfile CardPM

Go to the top of the page

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 02:51AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month