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

GaryNas

Members
  • Content count

    121
  • Joined

  • Last visited

Community Reputation

134 Neutral

About GaryNas

  • Rank
    Member
  1. Quote:Original post by jyk Anyway, I guess my question for you would be, what in the above example indicates that clip coordinates are in a right-handed space? What should I be looking for exactly? Thanks for the great example jyk. Going through your calculations, it's clear that this confirms what you found regarding OpenGL clip space being left handed. The -1 (3,2) entry in the projection matrix is what turns the right handed system into a left handed one. To me, this thread has been a great help in simplifying OpenGL/Direct3D interoperability. To me, the only fundamental difference between the two is the z-axis of NDC space going from [-1,1] in OGL and [0,1] in D3D, and an engine that uses both renderers only has to take this difference into consideration.
  2. Quote:Original post by jyk So in short, I don't see anything there that indicates that clip space is right-handed in OpenGL. Here's a test for you jyk - try running your right handed OpenGL/Direct3D engine through PIX and see what your post vertex shader values are. I'm willing to bet that they are represented in this space by a left handed system. If we could somehow use PIX with OpenGL, then I would guess they would be represented by a right handed system. It's precisely this space that I'm *guessing* makes DirectX/OpenGL left/right handed. I've just tried this using two Direct3D right handed engines and both are left handed when I look at the vertex shader output. Thoughts?
  3. Quote:Original post by jyk Can you provide a link to a reference? This is the best I can do: http://www.gamerendering.com/2008/10/05/clip-space/ :(
  4. Quote:Original post by jyk What leads you to believe that clip space is right-handed in OpenGL? The internet? :) For DirectX (using a left handed system), if I look at the vertex shader output in PIX, all visible vertices have a positive z value.
  5. Quote: All the discussion now is about whether the API itself introduces a handedness. But since all aspects that play a role can be re-programmed or, with OpenGL's newest specifications, have to be be programmed, the consensus seems me to be that there is no real handedness in OpenGL. Instead, the handedness comes from the way an application uses the API. So saying OpenGL uses RHS is substantiated in the history where the utility functions like glFrustum and glOrtho as well as the default winding rules and depth test were used widely by applications, and those functions and defaults have done a set-up for RHS. Wow. There's been some really good discussion on this topic here. I think that jyk's mention of face culling gives us a clue. I believe that clip space (i.e. post projection space, before homogenous divide which transforms us to NDC space) is hard coded in each API to be a specific handedness. Direct3D uses a left handed clip space and OpenGL a right handed clip space. It's in this space that face culling and frustum clipping occurs. Frustum clipping is something we have no control over, so possibly at this point OpenGL expects a right handed system (i.e. looking down -z) to properly clip. Is this right?
  6. Quote:Original post by cgrant The pipeline requires the data to be as such for processing..i.e internally it makes the assumption that stuff are in a right handed coordinate system. Not directly related, but APIs have to make certain assumptions, ex. that is why by default vertices in GL have to be specified counter-clockwise...thats just the way it is. Ah, this is exactly what I'm getting at. Do you know which part of the pipeline requires a right handed system? I've searched all over for this info, but all I can find is "OpenGL is right handed", "DirectX is left handed".
  7. Quote:Original post by Yann L Why do some countries drive on the right and some on the left side of the road ? It's a convention. They had to pick something. Do you mean they had to pick something for the glu library, or for OpenGL? Let me give an example. Assume my models, and world are left handed. I use this left handed world in OpenGL and do not convert to a right handed system. Which part of OpenGL will have trouble with this left handed system? I believe the problem would be in clip space, but I'm not sure.
  8. Quote:Original post by gtdelarosa2 Negative Z points away from the camera origin( into the screen ) and Positive Y points up, Positive X points towards the right. Yes, that's a right handed system, but what about OpenGL requires this?
  9. I often hear OpenGL referred to as using a right handed coordinate system, but I'm a little unclear as to the precise reason why this is so. Sure, the gluXXX helper functions operate in a right handed system, but what specifically about OpenGL makes it right handed?
  10. Quote:Original post by jyk The difference is not that one extends to positive z and the other to negative z, but rather that in OpenGL the canonical view volume extends from -1 to +1 in the z direction, while in Direct3D it extends from 0 to 1 in the z direction. I think I meant post-projection space. It's the space after projection, but before divide by w, which takes you into normalized device space (i.e. canonical view volume). It's here that the API's do culling and frustum clipping, and in Direct3D this looks down positive z and on OpenGL negative z. So yeah, this is the only part of the pipeline that I imagine would make one API left or right handed.
  11. Quote:Original post by jyk DirectX/Direct3D isn't really any more left-handed than it is right-handed (at least not as I understand it). Given that the DX math library has included LH and RH versions of all the transform functions for which handedness matters for quite a while now (if I'm not mistaken), I'm not actually sure why Direct3D is still commonly thought of as being 'left handed'. I might be overlooking something though. This is what's confusing me. The DirectX documents state that DX is left handed, but it's not really clear what that means. It's the same as saying OpenGL is right handed. Yeah, the gluXXX support functions are right handed, but what specifically about OpenGL is right handed? As I mentioned, I think it's clip space that matters. DirectX clip space extends to positive z, and OpenGL extends to negative z. Am I way off here?
  12. Quote:Original post by Emergent So for the purpose of handedness, the basis {(1,0,0),(0,1,0),(0,0,1)} is not the same as the basis {(0,1,0),(1,0,0),(0,0,1)}. But if someone comes up to me and says is {(1,0,0),(0,1,0),(0,0,1)} left handed or right, there's no way I can determine that, correct? It would be an arbitrary decision based on if I use my left or right hand to visualize the cross of (1,0,0) and (0,1,0).
  13. I've been reading how the determinant of 3 basis vectors can be taken to determine handiness of the coordinate system. (u x v) . z > 0 == right hand (u x v) . z < 0 == left hand I'm not clear on how this works though. Say my three vectors are: [1,0,0], [0,1,0], [0,0,1]. The determinant is always 1, yet I can still use these basis vectors for either a right handed or left handed system. What am I missing?
  14. In my Direct3D 9 renderer I'm starting I would like to use a right handed coordinate system, but I'm not completely clear on the steps I need to take. Am I correct in thinking that everything stays in the right handed system until projection? (e.g. I can build my camera with D3DXMatrixLookAtRH)? I guess even more fundamentally, what precisely does it mean that Direct3D 9 is "left handed"? Is it because clip space is left handed?
  15. I'm a little confused about cross product and left/right coordinate systems. Consider these two vectors: A = {0, 0, 1} B = {1, 0, 0} Without considering coordinate systems, the cross product is {0,1,0}. Now in a left handed system, I get {0, -1, 0} following the right hand rule, but {0,1,0} using a left hand rule. This is obviously a basic question, but I'm not quite sure how to interpret this. How can I use this information to build a look at camera matrix in the two different coordinate systems? Thanks for any info.