Tiled texture on an infinitly big plane?

Started by mystara, March 26, 2007, 09:13:16 PM

Previous topic - Next topic

mystara

G'day,
I'm trying to achieve a particular effect, and I'm not sure whether it's possible - and if it is, how it might be done. I'm open to blindingly obvious solutions which make me look like an idiot as well as cunningly clever solutions (although they may beg more questions).

So I have a user controlled camera (forward/backward/left/right) in an empty world. However, I'd like to give the user some kind of visual feedback for the movement of the camera. So for example, that they can see how quickly the camera is moving.
So what I was hoping to do was to apply a black/white tiled texture on to an entire plane (infinitely big in all directions). So no matter how far the camera moves, the user will continue to see the camera is moving.

Possible?

Cheers!

EgonOlsen

No. Everything has to be build out of polygons. And a polygon can't have an infinite size. Even if it would have a very huge size, you'll run into accuracy errors sooner or later. I think that this effect can be simulated by either using multiple objects that switch positions when needed or by applying some kind of clever vertex controller which basically does the same thing in a more resource friendly way. However, both solutions are not trivial.

Hrolf

There is a quick cheat! You can make a TextureEffect to scroll the texture of a large poly in the desired direction while the poly and camera stay still - I used this to give the impression of a boat travelling over water once...

cyberkilla

http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Wojtek

#4
Hello,

Recently I had a similar problem - how to create a textured world for my space game. I have read that thread, however what I needed was a little bit different than Mystara. I wanted to have a starfield that is not moving when starship is travelling, however it needs to look different if camera angle is changed.

I have created a solution that may be helpful for others too.

So what I did was to create a very big sphere (lets say with radius=1000), textured it and put camera inside it.

My game is working the way, that camera is always looking at player's ship from some specified distance (so in fact it is being moved with the spaceship during the game). Having that implemented I continueusly update the sphere center position to be the same as ship's one, so when ship is moving, the starfield looks the same from cameras perspective, however when camera angle is changed, it looks different.


I have uploaded an example with textured sphere and camera located in the sphere center. It is possible to use arrows to change camera angles and see how world texture is changing.
The example files can be downloaded from: working example with sources

Thanks,
Wojtek