Jump to content
  • Advertisement
Sign in to follow this  
ahmadka

Need help on basic transparency and lighting in GLUT...

This topic is 4138 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys !! This is my first post here, so please help me out people...:D I have recently started learning GLUT, and have been on a mission to create this scene in GLUT....I have gotten about half way though, but now I am facing some serious problems....please hear me out... I am trying to create this image in GLUT: http://img230.imageshack.us/img230/5546/df2id5.jpg Now, I have done some work on it already...like the background gradient (going from white to purple)...I loaded a texture for that...actually I tried to implement it though lighting, but that didnt work for me... Basically, the two major problems I am facing now are these: 1) I dont quite know how to create clouds that are in the bottom half of the picture..... I thought of using clouds 'layers'... Here is the basic idea I thought of: a) I make some cloud textures in photoshop b) I load these textures in GLUT c) I tell GLUT to make the cloud 'layers' transparent, based on the texture color at a specific pixel..If its 100% white, then it should be completely transparent...if its a light blue colour (like in the picture above), then it should be opaque....I dont know how to implement this in GLUT though... 2) The second question I have is this: Can lighting be only used on 3D shapes ? Can't it be used on 2D shapes like GL_QUADS, GL_POLYGON ?? I can get light to fall on 2D shapes like GL_QUADS, etc...but I canNOT get the light to distribute on the *un*evenly...What I mean to say is that, the light just spreads out on the surface of GL_QUADS uniformly eveywhere....whereas it should actually be brighter on areas nearer to the light source (like in real life)... If someone can show me how to use proper lighting on 2D shapes like GL_QUADS, I would be really greatful... Also, here is my project (not finished though): http://rapidshare.com/files/21504891/Undertaker.rar

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!