Archived

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

Ineluki

How can I make backgrounds ?

Recommended Posts

Ineluki    122
I want to peplace the black background with textures. How can I do that ? I have 6 square sized bitmaps witch I intended to use for it -> front, right, back, left, top and bottom. I want to make a 360° panorama viewer. Thanx for your help and sorry for my bad English. Post Scriptum: Loading the Texture is NOT my problem. I just don''t know how to assign them to the background. I tried to assign them to a cube and view it from inside, but even with glDisable(GL_FACE_CULLING) nothing was displayed.

Share this post


Link to post
Share on other sites
Ronin_54    122
Somewhere in the back of my mind, I don''t think you should try to set the background... Just create several quads that are textured, and linked... And create a really fuzzy algorithm to link them together, since you shouldn''t rotate, just move over them (ie. all the quads are on the same plane)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster

tex4---tex5---tex6---tex4---tex5---tex6---tex4---tex5---tex6
| | | | | | | | |
tex1---tex2---tex3---tex1---tex2---tex3---tex1---tex2---tex3
| | | | | | | | |
tex4---tex5---tex6---TEX4===TEX5===TEX6---tex4---tex5---tex6
| | | || || || | | |
tex1---tex2---tex3---TEX1===TEX2===TEX3---tex1---tex2---tex3
| | | | | | | | |
tex4---tex5---tex6---tex4---tex5---tex6---tex4---tex5---tex6
| | | | | | | | |
tex1---tex2---tex3---tex1---tex2---tex3---tex1---tex2---tex3

the ones in bold are the starting 6 textures (you might want to do 3 rows and 2 columns). then, when you move the camera (lets say we''re going right), when TEX4 and TEX1 are off the screen, you draw them next to TEX3 and TEX6. do the same when looking up/down.

crap explaination i know, but i hope you get the idea.

MENTAL

Share this post


Link to post
Share on other sites
Ronin_54    122
Hmmm... Let''s call front 1, left 2, back 3, right 4, top 5 and bottom 6, and assuming you can rotate up, left, right and down...

Though one Would have to do that per texture

When looking at 1:
up = going to 5
down = going to 6
left = going to 2
right = going to 4

When looking at 2:
up = going to 5
down = going to 6
left = going to 3
right = going to 5

When looking at 3:
up = going to 5
down = going to 6
left = going to 4
right = going to 2

When looking at 4:
up = going to 4
down = going to 6
left = going to 3
right = going to 1

When looking at 5:
up = turning 180 degrees.
Down = going to 1, 2, 3 or 4
Left = spinning left
Right = spinning right

When looking at 6:
See 5, switch up and down

It would also require you to ''rotate'' the textures, ''cause the top of 1 is connected to the bottom of 5, the top of 2 is connected to the left of 5, etc. etc.

Just try to imagine it...

Share this post


Link to post
Share on other sites
Ineluki    122
@Ronin_54

I think thats not exactly what I intended.
I want to view it from any angle (e.g. alpha=45°; beta=-12.756°).
It should be just like in some ID-Games (e.g. Quake) except you can not move around.

Thx for your suggestions so far.

Ineluki

Share this post


Link to post
Share on other sites
Ronin_54    122
That''s the illusion I created.

You can''t just create a box with six textures, and put the camera inside it.

By linking the six textures in the right order, you can (by moving around in 2d) get the *illusion* you are looking around in 3d.

Share this post


Link to post
Share on other sites
outRider    852
quote:

You can''t just create a box with six textures, and put the camera inside it.



Why not? I tried it once and it worked very well, though I didn''t go far with it.

------------
- outRider -

Share this post


Link to post
Share on other sites
outRider    852
Explain, I''m not sure what the problem with that method would be. Would it be the fact that the texture would seem stretched at the corners of the cube or what?

------------
- outRider -

Share this post


Link to post
Share on other sites
Ronin_54    122
The problem would be the distance from a point on the plane to the camera. When you rotate the camera, it is possible to look into a corner of the cube, meaning, you would see 3 distorted textures (my personal experience).

Share this post


Link to post
Share on other sites