Background Image in DX8 - use a box?

Started by
2 comments, last by Igilima 21 years, 1 month ago
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.
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.
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?
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

This topic is closed to new replies.

Advertisement