Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - bgilb

Pages: 1 [2]
Support / Texture not showing up.
« on: January 15, 2005, 07:07:38 pm »
That problem is solved :D, but now for every vert, it has a extra triangle attatched to the vert at 0,0,0

everything works flawlessy now! check out my screenie :D little bit of photoshop added in to show you the tiles.
Now all i have to add it height of the verts, changing it so that every tile can change its texture

this is just the map editor btw.
copy paste it into your browser else it wont work :D

Support / Texture not showing up.
« on: January 15, 2005, 05:39:51 pm »
no no, i dont need a method to do the job for me :D Im trying to create a grid of verts, then fill it with triangles myself. But for a unknown reason this line comes up ass Null:
Code: [Select]


Edit: Im guessing jPCT combines all the verts at the same point? So something like SimpleVector[][] vertGrid = new SimpleVector[20][20];
would only create one vert at 0f,0f,0f..

Feedback / The future of jPCT
« on: January 15, 2005, 07:53:26 am »
Well, i think even if jPCT goes the way of xith etc it will still be much better. I tried xith and i tried lwjgl and that one monkey one hah. Both times i was let down because the simplicity wasn't there at ALL and thats where jPCT exceeds other ones. We just need more exposure to build the community. When i first came to this site I looked around thinking: "software renderer?! i dont need this!!!" a month or so later i came back and downloaded the fps demo and realized : " what the hell it has a option to change to OPENGL??? why wasn't this set to default!"

Support / Texture not showing up.
« on: January 15, 2005, 05:55:12 am »
Does jPCT not support grids of vertexs? im trying to first create the grid of vertexs, then fill that up with quads..
Code: [Select]

public static void setupMap(int mapSize,Object3D myObj)
SimpleVector[][] vertGrid = null;
float texScale = 0.8f;
int counter=0;
for(int n = 0;n<=(mapSize-1);n++)
for(int l=0;l<=(mapSize-1);l++)
float x = n*2;
float y = l*2;
vertGrid[n][l] = new SimpleVector((x),(y),1f);

for(int a = 0;a<=(mapSize-1);a++)
for(int b=0;b<=(mapSize-1);b++)
SimpleVector v1 = vertGrid[a][b];
SimpleVector v2 = vertGrid[a][b+1];
SimpleVector v3 = vertGrid[a+1][b+1];
SimpleVector v4 = vertGrid[a+1][b];



Support / Texture not showing up.
« on: January 14, 2005, 09:56:38 pm »
woops sorry didnt login, okay i got HALF the quad textured( |\| only top right shows up), but now im not sure how to fix it, heres what my code looks like:

EDIT: Problem discovered! after much looking i figured out that one of the triangles was being draw REVERESED ( didnt think this mattered at first )so for the first addTriangle reversing the order to 1,2,3 and uv will properly fix it :D, also, still not sure how to tile the quads properly :D

Edit2: Im guessing jPCT doesn't support vertex alpha? :-(

Code: [Select]

public void setupMap()
//addTriangle(SimpleVector vert1, float u, float v
//, SimpleVector vert2, float u2, float v2
//, SimpleVector vert3, float u3, float v3)
SimpleVector v1 = new SimpleVector(-5f,-5f,10f);//top left
SimpleVector v2 = new SimpleVector(-5f,5f,10f);//top right
SimpleVector v3 = new SimpleVector(5f,5f,10f);//bot right
SimpleVector v4 = new SimpleVector(5f,-5f,10f);//bot left

Sorry about messiness, basically i indented it to show 1st line = vector,u,v and so on for the addTriangle

Support / Texture not showing up.
« on: January 14, 2005, 03:29:28 am »
It could be a uv problem, im not sure but basically all i did was created my texturemanager, loaded a texture, applied it to a object and then called recreateTextureCoords(), in wireframe i can see that the polygons are still there. as soon as i switch back to textured mode theres nothing there.. and it does load the file im sure

some code:

Code: [Select]

                                Texture tex=new Texture("grass.jpg");
                     texMan.addTexture("base", tex);
cube = new Object3D(4);
setupMap(); // adds polys to the cube mesh

Pages: 1 [2]