Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

pleja

Background

This topic is 5637 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

I''m doing space scene/animation. So I need stars in background. I made a simple polygon far away down the z-axis but it seems to be a significant performance hit. Is there any faster way? And is there a posibility that I load that background once and then never redraw it, only stuff closer to camera? Some pseudo-code would be great.

Share this post


Link to post
Share on other sites
Advertisement
One polygon in the background is a performance hit??
How the hell did you manage that??! How big is the texture you are using for it?

Try explaining a bit more about your scene... Is it all just a 2D background? Or do you only want the stars in the background of a 3D scene?

Look into skyboxes, skyplanes, and skydomes...

Share this post


Link to post
Share on other sites
The absolutly simplest manner is just to use a skybox or varient thereof, there is a good tutorial on sky box at GameTutorials:

http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg2.htm

That should get you started, you can even use a combination of
skybox and dynamic object/effects to create more of a feeling
of depth to your background.

--
/Ant Whitehead
Unix Sysadmin
PGP Key: http://www.solace.mh.se/~ant/ant.pubkey

Share this post


Link to post
Share on other sites
http://public.st.carnet.hr/~iplestin/mat.jpg
screenshot
Looks nice?

Anyway, tex is 512x512.

How about other question, can I clear only stuff in front of background since it is not moving anyway?

Share this post


Link to post
Share on other sites

  • 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!