We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › uv mapping: tiling and p3d vs opengl
Page Index Toggle Pages: 1
uv mapping: tiling and p3d vs opengl (Read 849 times)
uv mapping: tiling and p3d vs opengl
Aug 17th, 2006, 7:50pm
 
I am now mapping an image to the sides of the earth slice to create the effect of layers.

When I zoom (click applet and use q and a) the uv mapping will just stop scaling at a certain point. It seems that the vertical mapping will stop at the width or height of the texture. Why can't it go further

Another (minor) problem is the difference in opengl and p3d.
p3d:
...
opengl:
...
Might this be the same problem as this one (even though it doesn't have the weird diagonal mapping)
Re: uv mapping: tiling and p3d vs opengl
Reply #1 - Aug 17th, 2006, 8:03pm
 
Without seeing the code, it's almost impossibel to say what's going wrong.

It could be that the OpenGL one is technically doing the right  thing, and the P3D one doing it "wrong" but does what you want... But it's impossible to tell without being able to see the parts that're going wrong.
Re: uv mapping: tiling and p3d vs opengl
Reply #2 - Aug 17th, 2006, 11:04pm
 
Well I started putting in code but left it out eventually because it would only confuse things. Here it is Code:
beginShape(TRIANGLE_STRIP);
texture(eGrn);
int j = n==0?0:(iYln-1);
for (int i=0; i<iXln; i++) {
float fCCC = oPrl.aLnd[i][j];
vertex(fScl*(i-iXln/2), fScl*(j-iYln/2), fCCC*fScd-fWtr*fScd, 0,0);
vertex(fScl*(i-iXln/2), fScl*(j-iYln/2), iBtm, 1,fUVV);
}
endShape();
Where eGrn is a PImage of 1 by 2048 and fUVV the float that scales the texture vertically. The map will scale untill fUVV reaches eGrn.height. If fUVV exceeds eGrn.height nothing will happen (although you'd expect the texture to tile).
Page Index Toggle Pages: 1