Jump to content
  • Advertisement

limpacp

Member
  • Content Count

    55
  • Joined

  • Last visited

Community Reputation

122 Neutral

About limpacp

  • Rank
    Member
  1. Hello! I have a 3d scene. My camera is flying trough this scene using path. This path is an array of vertex coordinates (z,y,z) and i'm using gluLookAt function here. My problem is that the fov is not stable and i know why, but i can't solve it. Please look at the pseudo: vector3f eye_pos = path_array[ i ]; vector3f look_at = path_array[ i + 4 ]; glLookAt( eye_pos, look_at, up_vector); If i'm right, the distance between position at and [i+4] is not constant. And as a result i can't get the smooth flying effect. I'm right ? Please, give me some advices about this things. n.b.: this path array was taking from the obj file, that was maded by our designers.
  2. Hmm. I've just done reading some info about "frustum culling", and now i have some question about it since some things are not clear for me. All this articles and tutorials shows how to cull whole objects not single triangles. So, if i will check every triangle for visibility it will be faster than just drawing it with glVertex3f, so openGl will do this culling for me? My scene is a single big object and my target "as i understand" is to minimize calls to the glVertex3f by skipping invisible triangles (i'm not talking about backface culling here) so the camera can be set inside of this object. So i don't have any objects that i can cull, only triangles and triangles. And for me is not clear if my math for culling will be faster in the result than just pass this all triangles to the openGL, since openGL will not draw invisible triangles.
  3. Hello. I have a small app that can load and display given obj file, but my boss says that we need to optimize the displaying function. Currently it just go trough the all objects and drawing all the faces. He wants to optimize it by checking each triangle for visibility, and only if it visible - draw it. My problem is that i'm new in 3D. I don't know how to do that. So, from my point of view, i need to take a triangle and check if it visible on the screen. If i'm right, the problem can be solved by adding a routine that checks if my triangle fits or intersects with the screen rectangle. But i don't know this 3d math, so i can't undrstand how to "project" this triangle to the screen and how to check if it fits or intersects with the screen rectangle. Please help.
  4. limpacp

    Strange obj files.

    Yes, i'm using text version. ...btw, after openning this obj by Blender and then exporting it back to obj it starts working normally. I think there is problem in 3DMax obj exporter, may be there some differences. Can't find any info about this issue.
  5. Hi there. The problem: I've write my own OBJ file parser. Currently it can parse only the vertex data, normals and faces (no texture coordinates, shading groups etc...) and drawing it. For testing i've used some obj files downloaded from some sites. And they all working good. But when my friend gives me some obj files, that was exported from 3dmax8 my parser not drawing it correctly, it looks like all the vertexes has a random coordinates etc... I've spent number of nights to debug this parser and it works good. I mean, that all data sotred in obj file are readed and stored in my structures correctly. The problem is in obj file a think. So i don't understand why some obj files are working, others - no. May be i need to do some calculations before drawing? Or may be there is a different formats for obj files? Please help.
  6. limpacp

    2D explosion animation drawing.

    Thanks for info. ...btw after taking a look into this all, i'm thinking to insert explosion code to my game instead of using sprites. It gives me more random explosion animations and they all will be more flexible to use. Since i need to explode some asteroids and other objects with differet sizes. Big thanks!
  7. Hello. I've no idea how to draw animated explosion. I don't have any 3D software, only photoshop cs. The main idea is to draw the number of sprites with explosion steps. I've found couple of tutorials but they all not related to the game art. Please, can you tell me where i can read some articles and/or tutorials related to the games art? Thanks!
  8. limpacp

    Rectangle math question.

    Sorry, but it was replay for joanusdmentia question, since it was the last replay to my question, only then i've seen other replays. Thanks to everyone for help!
  9. limpacp

    Rectangle math question.

    The rect is the simplest rect defined as {x,y,w,h}. And i need to check if it completely 100% inside of other rect. Thanks for answers anyway.
  10. limpacp

    Rectangle math question.

    Hi there! There is a "science" way to check if my rect is inside other biggest rect? And how i can find a closest distance from the center of my rect to the border of rect that i'm inside. Thanks!
  11. limpacp

    Unable to lock texture (d3dx9)

    Oh, it helps. Thanks!
  12. Hi. I have a very strange problem. I've never get in this situation as only now. So, my app is d3dx9, device is created with CreateDeviceEx (hardware vertex processing, 800x600, 1 backbuffer and windowed). There is no problem. Backbuffer format is X8R8G8B8. When i'm creating texture with CreateTexture(256,256,1,0,D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &pTexture,NULL). And failed with error: INVALID CALL. If i'm replacing D3DPOOL_MANAGED to D3DPOOL_DEFAULT, it's ok but failed when i'm doing pTexture->LockRect(0, &rcRect, NULL, 0); I've never get this error in previos directx 8. So, i found a way to lock - using D3DPOOL_SYSTEMMEM. But then failed DrawPrimitive with E_FAIL and exception (long memory call or smt.). I don't have any ideas what can be wrong, so please, help. Thanks!
  13. Stuart Yarham, you were right! I've missed this things about texture coordinates offset by a half texel. Now it looks equally on both ATi and nVidia cards. Thanks!
  14. First i'm loading image data into memory, then creating textures (size is power of 2), then copy image data to texture. I'm trying to say that they looks like stretched ony by 1 pixel. For example texture size is 10x10, but renderes like 11x11 or 9x9 and only on nvidia. Thanks!
  15. I've post this code, because i think the problem was in calculating the right window box dimensions. I will post some screenshots at monday, currently i haven't any nVidia PCs near.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!