• 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

144 Neutral

About Conoktra

  • Rank
  1. Thank you to everyone the help!  It turns out it was the "sliver" problem.  Marching cubes was making some triangles that where simply too small and narrow in certain places.  Tweaking the scale was able to increase the stability.  Thanks again.
  2. Hello.   I am using Bullet Physics 2.82 and am getting some weird results.  I build some voxel terrain and pass the mesh information to Bullet Physics (via btTriangleIndexVertexArray with btBvhTriangleMeshShape).  It works fantastically, except that in certain spots basic shapes can fall through the terrain.  Here is a video of it:  http://www.youtube.com/watch?v=-sElC7c-Ug8&t=0m23s   I have tried quite a bit to fix it, and post here as a "last resort" of sorts.  Help is very much appreciated!  I have tried: Rebuilding Bullet Physics with double precision. Increasing the cycles-per second to 120 and even 240 simulations/second. Increased all objects' collision margins (btCollisionShape::setMargin()) to larger values (0.1, 0.5, 1.0). Reversed the vertex winding order (in-case it was a backward facing polygon allowing the fall-through). And still objects fall through the terrain!  There is no visual deformity-- the terrain is built and displayed correctly.  The debug drawer also shows the terrain is built in that area.  The physics shape is built off of the same data that is used for the rendering.  Any idea on what could cause this?   Terrain initialization (performed on each chunk of the terrain's octree): // pre-filled, just here to show you the declaration s32 * indices; btScalar * vertices; physicsMesh = new btTriangleIndexVertexArray(mesh->indices.size() / 3, indices, sizeof(s32) * 3, mesh->vertices.size(), vertices, sizeof(btScalar) * 3); physicsShape = new btBvhTriangleMeshShape(physicsMesh, true, true); physicsShape->setMargin(0.04); // tried changing to 0.1/0.5/1.0 btVector3 inertia(0, 0, 0); physicsShape->calculateLocalInertia(0.0, inertia); physicsMotionState = new btDefaultMotionState(btTransform(btQuaternion(0, 0, 0, 1), btVector3(0, 0, 0))); btRigidBody::btRigidBodyConstructionInfo rigidBodyCI( 0, // mass physicsMotionState,// initial position physicsShape, // collision shape of body inertia // local inertia ); physicsRigidBody = new btRigidBody(rigidBodyCI); physicsRigidBody->setLinearVelocity(btVector3(0, 0, 0)); physicsRigidBody->setAngularVelocity(btVector3(0, 0, 0)); physicsRigidBody->setFriction(1.0); // This is done in a separate threads. Making it single-threaded made no difference. bulletManager.lock(); bulletManager.addRigidBody(physicsRigidBody); bulletManager.unlock(); Basic shape initialization: physicsShape = new btSphereShape(minGroupRange); physicsShape->setMargin(0.04); // tried 0.1/0.5/1.0 btVector3 inertia(0, 0, 0); physicsShape->calculateLocalInertia(1.0, inertia); btRigidBody::btRigidBodyConstructionInfo rigidBodyCI( 1.0, // mass this, // initial position physicsShape, // collision shape of body inertia // local inertia ); physicsRigidBody = new btRigidBody(rigidBodyCI); physicsRigidBody->clearForces(); physicsRigidBody->setLinearVelocity(btVector3(0, 0, 0)); physicsRigidBody->setAngularVelocity(btVector3(0, 0, 0)); //physicsRigidBody->setActivationState(DISABLE_DEACTIVATION); BulletManager::get().addRigidBody(physicsRigidBody); And updating Bullet Physics: dynamicsWorld->stepSimulation(timer.getDeltaTime_Seconds()); //dynamicsWorld->stepSimulation(timer.getDeltaTime_Seconds(), 10, 1.0 / 240);
  3. Thanks for the help!   It's being rendered as two triangles.  I've read that OpenGL uses the "Barycentric coordinate system" which might cause the issue as seen here.  But that individual was rendering in 2D, so he was able to bypass the problem by generating his texture coordinates from screen space (rather then interpolating them from the vertices).   Drawing two quads (one red and one green) that overlay and blend together to create a linear fade from red to green (as is seen in image B).  Somehow the interpolation of the color channel is non-linear, resulting in the background bleeding through as is seen in image A.  Code: // Draw the red quad glBegin(GL_TRIANGLES); glVertex3f(0, 1, 0); glColor4f(1, 0, 0, 0); glVertex3f(1, 1, 1); glColor4f(1, 0, 0, 0); glVertex3f(1, 1, 0); glColor4f(1, 0, 0, 1); glVertex3f(0, 1, 1); glColor4f(1, 0, 0, 1); glVertex3f(1, 1, 1); glColor4f(1, 0, 0, 0); glVertex3f(0, 1, 0); glColor4f(1, 0, 0, 0); glEnd(); // Draw the green quad glBegin(GL_TRIANGLES); glVertex3f(0, 1, 0); glColor4f(0, 1, 0, 1); glVertex3f(1, 1, 1); glColor4f(0, 1, 0, 1); glVertex3f(1, 1, 0); glColor4f(0, 1, 0, 0); glVertex3f(0, 1, 1); glColor4f(0, 1, 0, 0); glVertex3f(1, 1, 1); glColor4f(0, 1, 0, 1); glVertex3f(0, 1, 0); glColor4f(0, 1, 0, 1); glEnd(); See the above for vertex colors.  The blend mode is glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA). I am using sRGB. I am using Ogre3D so I can't verify that gamma correction isn't happening for sure.   I got Googling and added "fragColour.a = pow(outColour.a, 1.0 / 5.0);" to my shader rather then "fragColour.a = outColor.a;" and it seems to have done the trick!  Reading the OpenGL registry though says gamma correction shouldn't happen on alpha values for textures.  What about vertex colors?  That and a gamma factor of 5 is a lot bigger then the standard 2.2.
  4. I have a rather simple problem that I am positive has a simple solution.  I am rendering a quad twice as two layers, each with a color.  The first is green, the second is red.  I am using the alpha channel of the color component for the quad's vertices to blend the two colors together across the quads.   Attached bellow are two images.  Image A is how it looks when rendered with OpenGL, image B is how it should look.  The black color in image A is the background bleeding through.  If OpenGL interpolated the color values linearly there would be no bleeding, it would be a nice transition from red to green and no black would show.  But that's obviously not the case.   I've tried using a GLSL program and setting the color variable to noperspective but it makes no difference.  Is there a way to force OpenGL to do plain linear interpolation of my vertex colors, so that the red and green blend evenly across the quad like in image B?   Additional information: Red layer alpha values: 1.0 -------- 0.0 |             | |             | |             | 0.0 -------- 1.0 Green layer alpha values: 0.0 -------- 1.0 |             | |             | |             | 1.0 -------- 0.0 . Thanks!
  5. Even the most sound code can be broken when you throw scenarios at it that are specifically designed to break it.  My compiler doesn't mangle the class names nor do I use namespaces, hence neither is an issue.
  6.   tolua++ needs to know the class's typename or else its treated as a void* inside lua.  The "typeid(T).name + 6" skips the "class " prefix and only passes the classes unique type name ("class MyClass" -> "MyClass") which is what tolua++ expects.  luaPushArg() has specialized template instances for all non-class types (thus avoiding the issue of instantiating the template with, say, an int).  That way I can pass any class to lua without having to define a specialized instance of luaPushArg() for each class type.  With hundreds of classes exported to lua, this saves a lot of time and code.     Portability isn't an issue.  If it was fixing it would be a matter of a couple of #ifdefs.  Whoopdeedoo.     Its not possible to have two classes with the same typename.  Period. Try to compile this:   class A { }; class A { }; // error C2011: 'A' : 'class' type redefinition
  7. Consider the following:   class Vector3 { public: f64 x, y, z; }; // pass an unkown userdata type to lua template<typename T> inline void luaPushArg(lua_State * const LuaState, T arg) { tolua_pushusertype(LuaState, (void*)&arg, typeid(T).name() + 6); } void testFunction(const Vector3 &v) { luaPushArg(LuaState, v); luaCallFunction("TestFunction"); // CRASH (only sometimes though!) luaPop(); }     What went wrong here?  Can you spot the bug?  This one was a real pain in the tush.  luaPushArg() would work with all my specialized types (int, float, etc) that I was passing to Lua, but when I passed classes it would sometimes crash.  Turns out that luaPushArg() is taking a T arg instead of a T &arg.  This means that a new copy of 'v' is created inside testFunction() when it calls luaPushArg().  luaPushArg() then pushes the newly created object onto the Lua stack.  Upon luaPushArg()'s return, the pointer too the class object that was just pushed onto the lua stack is now invalidated.  Sometimes it would crash, sometimes it wouldn't.  This one was a real nightmare.     Hehehe .  I can't wait for C11 support in GCC, that way bugs like this can be avoided using type-generic expression macros.
  8. Thanks for the feedback guys, I appreciate it.
  9. Hi [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] I need to make payments to a freelancer who lives in Sweden. He has requested that we not use PayPal (eg "paypal is stealing my money!"). Ive looked into doing an International Wire Transfer but it would add a 15% overhead to my costs. I looked into Western Union and it didn't work out for many reasons (very poor customer support being one of them). Money Gram only supports physically going to an agent and picking it up but that's not an option because I would prefer to just do it electronically (minimal hassle on the client). The US post office doesn't do money orders to Sweden. I have no clue if I could send him a check (or a prepaid visa) and if it would work over there. Does anyone know what the best way would be to pay someone in Sweden? Maybe I will pay him in fruit-baskets from an online gift shop xD.
  10. [quote name='wolfscaptain' timestamp='1342012884' post='4958014'] Nodes are not necessarily bones. [/quote] Yah, I kinda put 2+2 together and figured that out (some nodes are linked to bones others are not, but all nodes can have channels. So what is the difference between a boneless node and a weightless bone, you may ask? Well, I would like to know the answer to that myself xD). I just wish the assimp team could put some half-decent documentation up, it would sure save a bunch of people a lot of time. Anyway, thanks for the help
  11. Hello! I have written a tool based off of [url="http://assimp.sourceforge.net/"]Assimp[/url] that converts collada/fbx models to a custom format. For some reason assimp is omitting some of the mesh's bones from the aiMesh::mBones list, but they still appear in the aiScene::mRootNode node tree. This causes my converter to mangle the bone tree structure, because some of the bone's parent bones don't appear in the aiMesh::mBones list! Here is an example. The "RiggedModel_Final_FootNull" gets omitted from the aiMesh::mBones list but its children are not. [u]Why does assimp do this and how would I fix it?[/u] It would be great if assimp would store all bones in the bone list. [CODE] <node name="RiggedModel_Final_FootNull" id="RiggedModel_Final_FootNull" sid="RiggedModel_Final_FootNull" type="JOINT"> <matrix sid="matrix">-0.059679 -0.519840 0.852176 6.103344 -0.147692 0.848900 0.507499 -0.000000 -0.987231 -0.095573 -0.127438 -0.000000 0.000000 0.000000 0.000000 1.000000</matrix> <extra> <technique profile="FCOLLADA"> <visibility>1.000000</visibility> </technique> </extra> <node name="RiggedModel_Final_Outtue_L" id="RiggedModel_Final_Outtue_L" sid="RiggedModel_Final_Outtue_L" type="JOINT"> <matrix sid="matrix">0.922692 0.327107 -0.204061 1.479940 -0.312313 0.944503 0.101859 0.000000 0.226055 -0.030253 0.973645 0.000000 0.000000 0.000000 0.000000 1.000000</matrix> <extra> <technique profile="FCOLLADA"> <visibility>1.000000</visibility> </technique> </extra> </node> [/CODE] I really appreciate any and all help! Thanks.
  12. Thanks all, I appreciate the help. Sounds like I need to buckle down and just write a exporter or converter myself. Thanks again!
  13. ... Someone please wake me . I have an artist who is providing me 3D content that I then need to import into my custom video game engine (screenshot bellow). The engine is writting in C, uses OpenGL and has all the bells and whistles modern games have. I went ahead and implemented support for the Doom 3 model format (*.md5mesh and *.md5anim) because I have had experience with it in the past. But, it seems to be a relatively dead format because no matter what I try there seems to be no way to get the models from Maya to the MD5 format my engine supports (short of writing my own converter, which takes time and money, both of which nobody has enough of ). I can't seem to find documentation, source code, or anything that would provide me with alternative formats, exporters, or model loading libraries that would solve this problem. (very) long story short, this is where you guys come in. [u]I am looking for some way to get a model from Maya into my game with minimal effort.[/u] Should I be using a different format? Is there a C library capable of loading common formats? If I could just plop in "X" library that loads/animates/etc a model format Maya can export too, I would be extatic. (keeping in mind it needs to support skeletal animation) I'd also go for a good code reference if someone can point me in the right direction. Regardless, I appreciate any help in the area! Thanks.
  14. I don't ever use the STL, period. Not even when time is tight and I just "need to get it done". But then again I am a die-hard [url="http://en.wikipedia.org/wiki/Common_Lisp"]Lisper[/url], so... take it for a grain of salt.
  15. Thanks Ashaman73 [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] @polycount: I know this one is hard to answer because there are so many variables that can have an effect. Hardware varies, shaders can drastically skew the performances, and the scene dynamically changes with more/less being rendered on a continual basis. I guess a better way to phrase the question is is there a optimal # of polygons you want to aim for in a scene? Say 50,000? Then from there you can calculate shader costs & individual polycounts? @hardware + implementation: The target platform is the average user's PC (as according to [url="http://store.steampowered.com/hwsurvey"]Steam's statistics[/url]). The engine uses octree scene culling and renders everything in batches organized by their type & render settings (it can't really be any more optimal, practically every fancy feature has been added in). It does utilize advanced shading & post processing effects (real-time lighting, bloom/HDR, light scattering, etc), but those can be disabled in a options menu. Thanks again!