• 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.

Archived

This topic is now archived and is closed to further replies.

meganova75

d3dim!!! Did I miss something?

3 posts in this topic

I would recommend the book Computer Graphics - Principles and Practice by Foley, van Dam, Feiner and Hughes, published by Addison Wesley. It has a section entitled Viewing in 3D which sounds like what you want. It covers a great number of other topics.

That's where I learned. I'm sure there are alternative resources on the web though.

0

Share this post


Link to post
Share on other sites
Try the OpenGL Programming Guide also called the red book. You can read it for free over the internet. Well, as far as 3D transformations go, either explicitly create a 4x4 matrix and fill it with numbers, or use an api function where you give the rotation angle in radians or degrees, and the axis that you want to rotate the point around. Basically, all of your vertices are multiplied by the matrix and are displayed on the screen.
In OpenGL:

glPushMatrix();
glBegin(GL_TRIANGLES);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(2.0f, 2.0f, 0.0f);
glVertex3f(4.0f, 0.0f, 0.0f);
glEnd();
glPopMatrix();

This creates a triangle with lower left corner in the middle of the screen which is x=y=z=0. In OpenGL you have a matrix stack, that contains a 4x4 matrix and is called the current matrix. When you call the glPushMatrix() you make a copy of the matrix that's on the first level of the stack and it will be written to the second level of the stack and becomes the current matrix. Let's say I am creating a 3D cube, so I write a code that draws one face of the cube. Then copy the current matrix to second level, since the first level matrix already contains values that specify your view and projection. I rotate the new quad face with glRotatef(90.0f, 0.0f, 1.0f, 0.0f) around y-axis (that's the 1.0f that I tell OpenGL to rotate the face counter clockwise) then I use glTranslatef(-2.0f, 0.0f, 0.0f) to move the rotated face 2 feet to the left(negative x-axis). The rotation occured around one fixed world coordinate system with its center at x=y=z=0. So the order of operation would be:
1) glPushMatrix()
2) do glTranslate*() call
3) do glRotate*() call
4) glBegin()
.... glVertex*() stuff
5) glEnd()
6) glPopMatrix()

Next
1) do same
2) go 2 feet to the right i.e. positive x-axis
3) rotate -90 deg clockwise
4) draw second face
5) same
6) same

OpenGL will issue glRotate* and glTranslate* in reverse, so the matrices are generated by OpenGL first, i.e. rotation happens first then movement along negative x axis is second. The current matrix contains view and projection values, so you don't want to change this, therefore issue glPushMatrix() to make a copy, then OpenGL creates a translation matrix which is left multiplied by current matrix, then OpenGL creates rotation matrix which is also left multiplied by now view, projection, translate matrix, then your matrix becomes a convoulted mess with view, projection, translation, and rotation values all multiplied together, and after that your vertices are multiplied by this current 2nd level matrix. After translated and rotated vertices of the first face are send to the card, then the 2nd level matrix is destroyed by OpenGL and you remain again at center x=0, y=0, z=0, and current matrix stack contains view and projection values only. Then second face is drawn and you're back to center again. You can also draw 3D cube without rotation or translation and without glPushMatrix and glPopMatrix, but that way you have to really draw the cube in 3D with different values for each vertex, since each face is oriented differently in 3D scene, instead here I drew only one face and moved it and rotated it to position(I am reusing the same vertices for the next three faces). To recap, under OpenGL you tell the api what primitive you want to draw with glBegin(GL_TRIANGLES), then you specify the right amount of vertices, in this case 3 since it's a triangle, then use glEnd() to tell the api that you're done specifying vertices, then you call glFlush() to send data to the video card, and then you swap the back buffer where your triangle is rendered to the front buffer which the video card scans and sends output to your monitor. Hope this will help you. Good luck


0

Share this post


Link to post
Share on other sites
If you are having problems understanding transforming to different spaces in 3D, you might be better of learning how it works in 2D first its much easyier to understand. Ive got some docs somewhere covering this sort of thing, if you get stuck mail me and ill see if i can help Steve_sm98@yahoo.co.uk
0

Share this post


Link to post
Share on other sites

direct3d im forces you (well...me) to use a "geometery pipeline". The documentation explains the pipeline as if I were supposed already be familiar with one. Well, I'm not. I understand the "mathematics" I just can't grasp the concepts of translating coordinates from one "space" to another. I've come to the conclusion that I am missing some necessary foundation. I mean the key to learning HOW something works is understanding WHY it works.

1.Is there a way to get around having to implement my own rendering pipeline? (I ask this because I saw a complete source that did
nothing of the sort)

2.If not, can you point out a great resource for CONCEPTUAL 3d graphics. (I DON'T NEED ANOTHER MATH BOOK).

thanks.

------------------

0

Share this post


Link to post
Share on other sites