Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

117 Neutral

About taytay

  • Rank
  1. I am not a native speaker, so it is very hard for me to comprehend your questions. Sorry.   I guess you are trying to select between OpenGL and Direct3D? (DirectX is more than Direct3D).   Some of your arguments are wrong, It is not like OpenGL is not supported by GPUs. I don't think it would matter in your case.   And you can run OpenGL applications on Windows, so if you are going for 'bigger market share', OpenGL is the actual winner.   But in the end if you have to choose between two, I would say Direct3D just because of DirectX. It simplifies OS dependent things for you (Keyboard/Mouse interaction, windows) and has a lot of features that will help you. I am pretty sure OpenGL also has external support for those (glut for example, but it is really bad. I don't know anything else, didn't used OpenGL for PC for a while. Any other answers?) but they are harder to use and configure because in DirectX everything is designed to work with each other.   However, especially since you are new in graphics programming I would suggest you to try a game engine. If you don't, you have to reinvent the wheel again and again, and in computer graphics that is a bit more complex than a literal wheel. I am not very familiar with game engines however a friend of mine is using XNA, he had no experience before and he is doing fine.
  2. taytay

    Lighting and Shadows

    In deferred lighting, you render all necessary information for lighting (normals, color, position of each pixels) to a separate buffer and then use these buffers to render for each light without actually re-drawing your scene. After that you add outputs of all light sources and build your final result.   I used shadow volumes with deferred lighting before. With shadow volumes, you basically find which pixels on screen are lighted by a light and which are not. With that information, while rendering your light to final buffer you disregard shadowed areas. I am not sure how it would with different shadow algorithms   Hope that helps.
  3. (I also need to calculate final up vector better, it can wait though)
  4. It looks like what I really needed was simply spherical interpolation, I am now simply interpolating between end and beginning eye & up vectors using it and calculate side vec by cross product.   Check this out! (Click on stars to move them)
  5. Hello all,     I am trying to move my camera smoothly. I use eye, up and side vectors and camera position to hold camera properties. Moving camera is OK, I am using a beizer curve and interpolate my camera position along with that curve.   However I am stuck with camera rotation. I have my initial and final eye up and side vectors but couldn't get far with this information. I google a bit and I suppose I should use quaternions but I couldn't find how I can convert between my structure and quaternions. There are answers for pitch roll and yaw but I couldn't even be able to calculate them (I only managed to find pitch & roll from eye vector).   So basically I want to be able to convert between   eye, up, side vectors <=> quaternions   or eye, up, side vectors <=> pitch, yaw, roll   Also I can simply linear interpolate quaternions right?   On a side note, is there a way to rotate other two camera vectors using the first one. I mean lets say camera moves from v1 to v2. My new eye vector is normal(v2-v1) lets say it is e2 and old eye vector is e1. can I calculate new up vector using e2 and e1? (I can cross product to calculate side vector after that)   Thanks for all help!
  6. taytay

    Career Advice?

    @Tom Thanks for the answer. I am from Istanbul. Checked gamedevmap and most of the sites in there are either unrelated to game development or they are dead. Rest are usually focused on flash games such as ones on facebook. On few of them actually makes video games. Well I guess focusing on personal projects will be my best option for next year. Hopefully I can make something that can draw attention from companies. If not I don't think it will be very hard for me to get a job one of the companies in Turkey.
  7. taytay

    Map feels too small

    @thok 3d FPS no game engine, just opengl Here are some screen shots In that terrain each grid is 2000x2000 unit, they are not really visible though. the river is half the grid size so its width is 1000 unit. Each screenshot is taken from a different camera height (1, 10, 100, 1000) but the difference is not much. If I multiply every vertex with let's say 10, it does not make any difference. the map feels the same. For example that blue line is suppsed to be a river but it is too small. @3333360 Is changing the fov good idea? My current FOV is 60. Maybe things will look better when I add familiar things like trees etc
  8. I think I am missing something very basic in game programming. Why my map feels so small? If camera is closer to ground, it should feel bigger right? If I multiply the coordinate of every vertex on scene, it still does not make any difference. Flattening the scene (by like halving the z values) works but I don't want to do that. Am I missing something basic here?
  9. taytay

    Career Advice?

    Video game industry is almost non-existent in where I live (Turkey). Currently I am a CS post-graduate student and I am really interested in game programming. I have a job for now but still hoping for a job as a game programmer after my graduation. I think of myself as a good programmer. Instead of using external libraries, I always interested in lower level stuff. How things works etc. Here is a couple of projects I did. My graduation projects, a multiplayer FPS game. Done in DirectX. Offer things like deferred shading, shadow volumes, terrain painting, md3 animation etc. It was mostly done but lacks UI, different maps, models, sounds etc My current project, started as an attempt to learn opengl (relearn actually, learned immediate stuff in school and they forced me to hate OpenGL). It is a random terrain generating project, still in very early phases. So do you think I have a chance in game industry? What should I do/learn before I graduate? Continue to do personal projects like this? And after I graduate, how should I look for jobs, do people hire from different countries? I think making indie games will be easiest choice but not sure if I will be able to spare enough time for that while working on another job.
  10. taytay

    Realy weird problem

    On an unrelated note, I am having artifacts caused by z buffer. I am planning to use different depth test settings for farther part of the terrain. Do you thing this is viable glMatrixMode (GL_PROJECTION); glLoadIdentity (); gluPerspective (45.0f, (GLfloat)(g_window->init.width)/(GLfloat)(g_window->init.height), 1000, 1500000.0f); glMatrixMode (GL_MODELVIEW); //render the low quality model of the terrain that is farther than the camera glMatrixMode (GL_PROJECTION); glLoadIdentity (); gluPerspective (45.0f, (GLfloat)(g_window->init.width)/(GLfloat)(g_window->init.height), 0.1, 10000.0f); glMatrixMode (GL_MODELVIEW); glClear(GL_DEPTH_BUFFER_BIT); //render the higher quality model around the camera
  11. taytay

    Realy weird problem

    wow, found the problem. I am allocating way too much memory and it somehow causes this problem. I should be more careful while using something like 1024*1024*12 in malloc calls.
  12. I am getting a really weird crash. Not related but I am doing this. I am generating a terrain but it is too big. I decided to split index buffer into smaller parts. In future I am planning to generate a more detailed version of these parts, and the parts clsoer to camera will be rendered using detailed versions. It was perfectly working while I was generating the whole index buffer at once, but now I have problems. My application has two choices, generate world or load world. Generate world generates a random terrain and stores this in a file. Load map loads the terrain from the file. Weird thing is it only crashes when I generating the world. It generates and saves the world correctly (as far as I know) but crashes on first glDrawElements that uses the new partial index buffers. part of my generate world function for(i=0; i<16; i++){ for(j=0; j<16; j++){ glGenBuffersARB(1, &partIB[j]); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, partIB[j]); glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(unsigned int)*partIBSizes[j], partInd[j], GL_STATIC_DRAW_ARB); fprintf(fout, "%d %d %d %d %d\n", i, j, partIBSizes[j], partIB[j], partInd[j][0]); } } glGenBuffersARB(1, &vb); glBindBufferARB(GL_ARRAY_BUFFER_ARB, vb); glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(Vertex)*1022*1022*5, buf, GL_STATIC_DRAW_ARB); memcpy(bufBig, buf, sizeof(Vertex)*1022*1022*5); if(SAVE){ fwrite(buf, sizeof(Vertex)*1022*1022*5, 1, mapData); for(i=0; i<16; i++){ for(j=0; j<16; j++){ fwrite(&partIBSizes[j], sizeof(unsigned int), 1, mapData); fwrite(partInd[j], sizeof(unsigned int)*partIBSizes[j], 1, mapData); } } } and part of my load world function fread(buf, sizeof(Vertex)*1022*1022*5, 1, mapData); unsigned int *partInd = (unsigned int *)malloc(sizeof(unsigned int)*1024*1024); for(int i=0; i<16; i++){ for(int j=0; j<16; j++){ fread(&partIBSizes[j], sizeof(unsigned int), 1, mapData); fread(partInd, sizeof(unsigned int)*partIBSizes[j], 1, mapData); glGenBuffersARB(1, &partIB[j]); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, partIB[j]); glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(unsigned int)*partIBSizes[j], partInd, GL_STATIC_DRAW_ARB); fprintf(fout, "%d %d %d %d %d\n", i, j, partIBSizes[j], partIB[j], partInd[0]); } } free(partInd); glGenBuffersARB(1, &vb); glBindBufferARB(GL_ARRAY_BUFFER_ARB, vb); glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(Vertex)*1022*1022*5, buf, GL_STATIC_DRAW_ARB); As you can see both functions are pretty much same. fprintf(fout, "%d %d %d %d %d\n", i, j, partIBSizes[j], partIB[j], partInd[0]); prints same thing for both functions, however on first run of program, it generates world and saves it but crashes after draw method. However on second run it loads the world but does not crash. What might be the problem? Also my render function. It creashes on first iteration of loop, after the glDrawElements call. glBindBufferARB(GL_ARRAY_BUFFER_ARB, vb); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); glVertexPointer(3, GL_FLOAT, sizeof(Vertex), BUFFER_OFFSET(0)); glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT, sizeof(Vertex), BUFFER_OFFSET(12)); glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Vertex), BUFFER_OFFSET(24)); for(int i=0; i<16; i++){ for(int j=0; j<16; j++){ //fprintf(fout, "%d %d %d %d\n", i, j, partIBSizes[j], partIB[j]); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, partIB[j]); glDrawElements(GL_TRIANGLES, partIBSizes[j], GL_UNSIGNED_INT, BUFFER_OFFSET(0)); } }
  13. oggs91: wow, looks great. I will check triplanar shading. currently I am working on rivers, it is much harder than I thought. Here is a picture of possible rivers generated by algorithm. it kinda works but still needs lots of work. any good tutorials on this subject?
  14. taytay

    2D camera - visibility rect

    You can use gluProject to translate 3d coordinates to 2d screen coordinates. Imagine an object is bounded by a box. find screen coordinates of all corner of that box. If they all on the same side of screen don't draw the object I don't know what project exactly returns, let's assume it returns 0<x<1 and 0<y<1 if pixel is on screen. If all points returned x<0 or x>1 or y<0 or y>1 then it will not be on the screen. you can use also depth value which will be returned from gluproject to find which objects are behind the camera or too far away
  15. thanks, I guess I will work on shaping terrain a bit more. It should have bigger plains instead of all cavities. I have many ideas but too little time with all my work and graduate program I am planning the area will be huge, that is why I am not using textures on this model. It will dynamically increase level detail once you are close enough to surface and there will be textures.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!