Jump to content
  • Advertisement

Archived

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

Igilima

Background Image in DX8 - use a box?

This topic is 5681 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. I''m trying to create the standard starfield backdrop for a space flight sim. I''m going to default to the "texture the inside of a box" method unless there is a better way. Can you set a texture/graphic as the default infinitely distant background for a D3D scene? If so, would that be better than "the texture the inside of a box" method? I thought that I read somewhere in a book that you could set a texture as the default background for a D3D scene. I have gone back through the couple of books that I read on DX and haven''t been able to find where this might be mentioned. Perhaps I''m not finding that reference because my memory is faulty and this capability was from some other 3D engine doc that I read.

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Igilima
Hi. I''m trying to create the standard starfield backdrop for a space flight sim. I''m going to default to the "texture the inside of a box" method unless there is a better way.

Can you set a texture/graphic as the default infinitely distant background for a D3D scene? If so, would that be better than "the texture the inside of a box" method?

I thought that I read somewhere in a book that you could set a texture as the default background for a D3D scene. I have gone back through the couple of books that I read on DX and haven''t been able to find where this might be mentioned. Perhaps I''m not finding that reference because my memory is faulty and this capability was from some other 3D engine doc that I read.



Maybe you can, if you draw it first at close distance, clear the z buffer and draw the rest. The big downside is that it won''t move when the camera moves.

A sky box is good enough, and can be very convincing. Just make sure that you deform the textures, like ``==--__--=='''' or else it will look like a box. A skybox with properly deformed textures is indistinguishable from a (much more expensive) skydome.

Share this post


Link to post
Share on other sites
If you set the right view and an orthogonal projection, and make it one unit wide by one unit high, and disable the z-buffer, you could render a 1 by 1 square, which would fill the entire scene, and as such, the entire screen. Then you could set everything to normal and draw the rest. Of course, it''s not as convincing as a cool moving box.

I''m interested in that skybox. Do you make it really small, and render it first, or is it okay to just make one gigantic box around your entire scene? And how, exactly, should your textures be deformed? What about the edges?

Share this post


Link to post
Share on other sites
quote:

Just make sure that you deform the textures, like ``==--__--=='''' or else it will look like a box



I am working on this same problem right now. How would I deform the textures as you describe? I''m using DirectGraphics 9 w/ C++.

-Mike

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!