I don't know if this is an advanced question of a n00bie question, but here will do!
I'm using jIrr to program what is basically an FPS game for my final year project at uni. jIrr (for those who don't know) is a java binding for Irrlicht. I'm not getting any help on my current problem from the jIrr forum so i thought i'd try here, and it shouldn't be a java based problem.
What i do is randomly create a maze and then output it to a .x file and then read it back in using the engines ability to read .x files. But only a certain percentage of the mesh is displayed properly. It seems to have managed to read all the data properly and says the correct number of polys that the mesh contains but not all the faces of the walls of the maze are displayed.
If the mesh just contains 4 walls then it only displays 2 of the walls properly, the 3rd has 2 sides missing and the 4th wall doesn't appear at all. If the mesh contains a whole single storey maze then it only displays about 50% of it (the left 50% if looking at it from above), and if the mesh contains a double storey maze then it displays the lower storey fully and then only about 10%ish of the top storey.
I'm very confused by all this so if any one has any ideas i'd greatly appreciate it!
Also, another problem is displaying textures on the walls, they're displayed really really small so you have to be right up against the wall to see the texture at all, instead it just looks like one colour. The textures are also displayed upside down which is annoying and strange but can be dealt with by turning the file containing the texture upside down easily enough. I think this problem is probably down to how the .x file is created, maybe i'm doing something wrong there....
Meshes not fully displayed and tiny textures!
sounds like some of your walls are facing the wrong way. this depends on the direction of the triangles, clockwise or anticlockwise, but I can't remember which side is forwards.
As for the textures, sounds like a problem with your texture coordinates, but having never made an x file I couldn't offer any suggestions.
i hope this post wasn't completely worthless
As for the textures, sounds like a problem with your texture coordinates, but having never made an x file I couldn't offer any suggestions.
i hope this post wasn't completely worthless
I don't think its the faces facing the wrong way, as then they'd be visible from the other side... and then there wouldn't be the strange thing that when the whole maze is loaded half shows etc.
As for the texture thingy that is right actually, i went through a lot of stress to get them showing properly (and they don't always show properly if the wall is rotated so they still need some work) but if i change around the texture coords a bit then they display the textures on their sides, so either i can go through more stress of trying to fix em, or just flip the files the textures come from... I think i know which one i'll opt for!
Cheers for the help!
As for the texture thingy that is right actually, i went through a lot of stress to get them showing properly (and they don't always show properly if the wall is rotated so they still need some work) but if i change around the texture coords a bit then they display the textures on their sides, so either i can go through more stress of trying to fix em, or just flip the files the textures come from... I think i know which one i'll opt for!
Cheers for the help!
A whipping would be delightful!
I'm using java as it's the language i know best, have been learning it for 2 years at uni having known no languages beforehand. It was suggested that a C based language would be best but i figured that sticking to java would be best as i'm more confident with it than i would be with a C language i'd just started learning, my supervisor for my my project also agreed with this pretty much.
Don't think it's misplaced vertices either due to the fact that it'll display most of the mesh but not the last parts of it.. although maybe it could be something going wrong when the last vertices are being added to the mesh..
I know there's not much info i've given but i'm not sure what else would be useful to know, and of course there's the problem that i'm using java and irrlicht is in a C language so i kept it as close to the engine side of things as poss!
I'm using java as it's the language i know best, have been learning it for 2 years at uni having known no languages beforehand. It was suggested that a C based language would be best but i figured that sticking to java would be best as i'm more confident with it than i would be with a C language i'd just started learning, my supervisor for my my project also agreed with this pretty much.
Don't think it's misplaced vertices either due to the fact that it'll display most of the mesh but not the last parts of it.. although maybe it could be something going wrong when the last vertices are being added to the mesh..
I know there's not much info i've given but i'm not sure what else would be useful to know, and of course there's the problem that i'm using java and irrlicht is in a C language so i kept it as close to the engine side of things as poss!