• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

111 Neutral

About asp_kom

  • Rank
  1. Hi! I have map with SSDO, map with light calculation result. How to combine them?
  2. How to rename Topic to mark it as SOLVED ? [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img]
  3. [img]http://s7.postimage.org/mbzd25ztn/image.png[/img] Error was here: [CODE] memcpy(&texCoords[FinishedFaces*2+i][0], mesh->texcos[face->index[ i ]], sizeof(float)*2); [/CODE] shoul'd be: [CODE] memcpy(&texCoords[FinishedFaces*3+i][0], mesh->texcos[face->index[ i ]], sizeof(float)*2); [/CODE] fail [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img]
  4. Compared texture coordinates, verticies and faces loaded by lib3ds and my own 3ds-loader. Everything match. Checked texture coordinates VBO with gDebugger. Coordinates are wrong ...[img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]
  5. Here is rendering code: [CODE] shaderProg->use(); shaderProg->setUniform("MVP",float_mvp); //shaderProg->setUniform("textureMy",(int)GL_TEXTURE0); shaderProg->setUniform("textureMy",(int)0); glBindBuffer(GL_ARRAY_BUFFER, ::model->getTexcoordVBO()); int m_texcord_loc = shaderProg->getAttribLocation("texcord"); glEnableVertexAttribArray(m_texcord_loc); glVertexAttribPointer(m_texcord_loc, 2, GL_FLOAT, GL_FALSE, 0, 0); ::model->bindTexture(); //rendering model ::model->Draw(); glUseProgram(0); [/CODE] rendering model: [CODE] // Enable vertex and normal arrays glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); // Bind the vbo with the normals glf_->glBindBuffer(GL_ARRAY_BUFFER, m_NormalVBO); // The pointer for the normals is NULL which means that OpenGL will use the currently bound vbo glNormalPointer(GL_FLOAT, 0, NULL); glf_->glBindBuffer(GL_ARRAY_BUFFER, m_VertexVBO); glVertexPointer(3, GL_FLOAT, 0, NULL); // Render the triangles glDrawArrays(GL_TRIANGLES, 0, m_TotalFaces * 3); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); [/CODE]
  6. Does anybody have experience with lib3ds? Using OpenGL with GLSL shaders. Looks like model is loaded fine. But when I try to render it with texture, I recieve something horrible: [img]http://s14.postimage.org/aye41x7g1/glsl_Textured.png[/img] Here is model with texture coordinates interpreted as colors: [img]http://s18.postimage.org/n3br1vdw9/glsl_Texcoords.png[/img] Here is my code for loading texture (gDebugger shows that texture is loaded normally): [CODE] glGenTextures(1,&textureId); FREE_IMAGE_FORMAT fif = FreeImage_GetFileType(filename); FIBITMAP* fib = FreeImage_Load(fif,filename,0); int width = FreeImage_GetWidth(fib); int height = FreeImage_GetHeight(fib); char* pixels = (char*)FreeImage_GetBits(fib); glBindTexture(GL_TEXTURE_2D,textureId); glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,width,height,0,GL_BGR_EXT,GL_UNSIGNED_BYTE,pixels); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); FreeImage_Unload(fib); [/CODE] Here is my code for loading model (I work with GLM library): [CODE] glm::vec3 *vertices = new glm::vec3[m_TotalFaces*3]; glm::vec3 *normals = new glm::vec3[m_TotalFaces*3]; glm::vec2 *texCoords = new glm::vec2[m_TotalFaces*3]; Lib3dsMesh * mesh; unsigned int FinishedFaces = 0; // Loop through all the meshes for (int i = 0; i < m_model->nmeshes; i++) { mesh = m_model->meshes[i]; lib3ds_mesh_calculate_face_normals(mesh, (float (*)[3])&normals[FinishedFaces*3][0]); // Loop through every face for(unsigned int cur_face = 0; cur_face < mesh->nfaces;cur_face++) { Lib3dsFace * face = &mesh->faces[cur_face]; for(unsigned int i = 0;i < 3;i++) { memcpy(&vertices[FinishedFaces*3 + i][0], mesh->vertices[face->index[ i ]], sizeof(float)*3); memcpy(&texCoords[FinishedFaces*2+i][0], mesh->texcos[face->index[ i ]], sizeof(float)*2); } FinishedFaces++; } } // Generate a Vertex Buffer Object and store it with our vertices glf_->glGenBuffers(1, &m_VertexVBO); glf_->glBindBuffer(GL_ARRAY_BUFFER, m_VertexVBO); glf_->glBufferData(GL_ARRAY_BUFFER, (sizeof(float)*3) * 3 * m_TotalFaces, &vertices[0], GL_STATIC_DRAW); // Generate another Vertex Buffer Object and store the normals in it glf_->glGenBuffers(1, &m_NormalVBO); glf_->glBindBuffer(GL_ARRAY_BUFFER, m_NormalVBO); glf_->glBufferData(GL_ARRAY_BUFFER, (sizeof(float)*3) * 3 * m_TotalFaces, &normals[0], GL_STATIC_DRAW); // Generate Vertex Buffer Object and store texture coordinates in it glf_->glGenBuffers(1, &m_TexcoorVBO); glf_->glBindBuffer(GL_ARRAY_BUFFER, m_TexcoorVBO); glf_->glBufferData(GL_ARRAY_BUFFER, (sizeof(float)*2) * 3 * m_TotalFaces, &texCoords[0], GL_STATIC_DRAW); // Clean up our allocated memory delete[] vertices; delete[] normals; delete[] texCoords; [/CODE] gDebugger shows that all texture coordinates in VBO belong to interval [0.0, 1.0] Here is my vertex shader: [CODE] #version 330 in vec3 position; in vec2 texcord; out vec2 o_texcord; uniform mat4 MVP; void main() { gl_Position = MVP * vec4(position,1.0); o_texcord = texcord; } [/CODE] Here is my fragment shader: [CODE] #version 330 in vec2 o_texcord; out vec4 fragmentColor; uniform sampler2D textureMy; void main() { fragmentColor = texture2D( textureMy, o_texcord); } [/CODE] In 3ds max model looks fine: [img]http://s18.postimage.org/b773e3uvt/3ds_Max.png[/img] What am I doing wrong?[img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img]