Skip to main content

Changing TexCoords only have influence in corners of QuadArray??

1 reply [Last post]
nikolai
Offline
Joined: 2003-06-10
Points: 0

Can someone explain this to me:

I make a QuadArray with 4 vertexes. It is flat and 10000x10000, with center in origin.

I apply a 2d texture about 5x5 in size. Looks good.

I make a behavior that wakes up each frame, and moves the TexCoord so it seems like the texture is "flowing". The coord for every vertex is moved the same distance in the same direction.

Now this "flow" looks great when I observe 1 of the 4 corners in the Quad. But the further I observe from either one of these corners the slower the "flow" becomes. Between the corners it is still. At further inspection the flow at each corner is in opposite direction of each other, so they 'cancel' out at the middle.

Is this expected behavior? I do my flow calculations in doubles to avoid loss of precision.

Any suggestions?

example info:

texture is wrappped S&T, 2 x anisotrophic

Point3d[] coordinates = {
new Point3d (-5000,0,-5000),
new Point3d (-5000,0,5000),
new Point3d (5000,0,5000),
new Point3d (5000,0,-5000)};

initial texCoords:
TexCoord2f[] textCoord = {
new TexCoord2f (2000, 0),
new TexCoord2f (2000, 2000),
new TexCoord2f (0.0f, 2000),
new TexCoord2f (0.0f, 0.0f)};

example 1st frame texcoords:
TexCoord2f[] textCoord = {
new TexCoord2f (1999, -1),
new TexCoord2f (1999, 1999),
new TexCoord2f (-1, 1999),
new TexCoord2f (-1, -1)};

example 2nd frame texcoords:
TexCoord2f[] textCoord = {
new TexCoord2f (1998, -2),
new TexCoord2f (1998, 1998),
new TexCoord2f (-2, 1998),
new TexCoord2f (-2, -2)};

etc, etc..

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bayblade
Offline
Joined: 2006-02-17
Points: 0

This is purely speculation, but with texcoord resolutions in the thosands, and a 5x5 texture--is it possible you're seeing some texture aliasing which gets amplified the farther away you move from the texture?

Does it still occur if you used a 128x128 texture (with no internal tiling or repetition on it) and texcoords such as:

initial texCoords:
TexCoord2f[] textCoord = {
new TexCoord2f (2.0, 0.0),
new TexCoord2f (2.0, 2.0),
new TexCoord2f (0.0, 2.0),
new TexCoord2f (0.0, 0.0) };

example 1st frame texcoords:
TexCoord2f[] textCoord = {
new TexCoord2f (1.99, -0.01),
new TexCoord2f (1.99, 1.99),
new TexCoord2f (-0.01, 1.99),
new TexCoord2f (-0.01, -0.01)};