Background

Started by
2 comments, last by pleja 21 years ago
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.
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...
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
--/Ant WhiteheadUnix SysadminPGP Key: http://www.solace.mh.se/~ant/ant.pubkey
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?

This topic is closed to new replies.

Advertisement