I have a fairly decent implementation of a sphrerical roam which is the
size
of earth. The terrain has nice variance, but texturing is a problem.
What I did was to define a cube with six sides and 8 vertices and give the
vertices texture coordinates such as 0 to 100 000, and set my texturing to
wrap. This way the textures would repeat like I wanted for them, since the
textures are only detail textures.
The problem is that I can not find any way to define the 8 vertices
texture
coordinates to avoid singularities. If for example I define one face to be
0,0 in top left corner and 1,1 ( forget about repetition for a second) in
the lower right corner, then I could let the right side start with 1,0 in
its top left and end with 0,1 in lower right corner and so on. This way I
can make it tile fine arround the "equator", but the poles will be bad, as
can clearly be seen since the u.v coordinates for all four vertices will
have v=1. u will vary, but v is constant, so I get stripes on the pole
squares.
I have tried to mix and shuffle the coordinates in all sorts of ways, but
I
can not make it work, and I don't really expect to make that simple scheme
work.
But... what is the solution then? The roaming spheres I have found, odly
enough never mention this aspect of it all. I am currently considering
calculatin gthe vertex texture coordinates on the fly, based on the
observers position, but it seems a little messy. Any comments or hints
will
be welcome


|