Jump to content

  • Log In with Google      Sign In   
  • Create Account


How can I make backgrounds ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 Ineluki   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 October 2001 - 11:49 AM

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.

Sponsor:

#2 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 October 2001 - 07:50 PM

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)

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 14 October 2001 - 09:32 PM


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

#4 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 October 2001 - 01:24 AM

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...

#5 Ineluki   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 October 2001 - 06:45 AM

@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

#6 Ineluki   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 October 2001 - 08:00 AM

I solved my problem.
I simply forgot to switch back to Modelview by glMatrixMode(GL_MODELVIEW)

Thanx to all who helped me



#7 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 October 2001 - 02:34 AM

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.

#8 outRider   Members   -  Reputation: 852

Like
Likes
Like

Posted 16 October 2001 - 01:45 PM

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 -

#9 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 October 2001 - 09:00 PM

I think you will loose quite a lot of perspective :D

#10 outRider   Members   -  Reputation: 852

Like
Likes
Like

Posted 17 October 2001 - 02:10 AM

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 -

#11 Ronin_54   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 03:56 AM

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).




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS