Jump to content
  • Advertisement

Karl G

  • Content Count

  • Joined

  • Last visited

Community Reputation

170 Neutral

About Karl G

  • Rank

Personal Information

  1. Hi everyone! My friends and I are really excited about the Oculus Rift VR device, so we set up a developer community to talk about it and get a head start on making applications using this amazing new technology: OculusHub. Come check it out! It's already getting active, but could always benefit from new perspectives, whether you're experienced or just getting started! See ya around, Karl http://www.oculushub.com P.S. I set up OpenID on the forums so you don't even have to make up and remember yet another password
  2. Karl G

    Oculus Rift: Kickstarter

    My friends and I jumped on this the morning the Oculus came available...and there were already hundreds before us Still, we can't wait until December to get started, so we set up a community to talk about Oculus development and brainstorm what we're building. We're getting some great discussion going, and have engaged at least one guy who helped Palmer Luckey get started back in '09. Come check it out! http://www.oculushub.com/
  3. Hi everyone, My name is Karl Gluck, and I have spent the last 10 years learning to program video games--and I owe a lot to GameDev.Net for providing great articles from which to learn along the way. It's my turn to give back: I have decided to release the 120,000 lines of source code and almost 400 MB of content that drive this project for free under the GPL. Additionally, my brother Erich has also written a great tutorial on how he made all of the different 3d models (especially character models) you see in Evidyon. In-Game Video: Website ======= http://unseenstudios.com/making-evidyon/?page_id=9 SourceForge Page ================ https://sourceforge.net/projects/evidyon/ Credits ======= Programmer: Karl Gluck 3D Modeling/Textures: Erich Gluck Design: Joe Muller Sounds: Stephen Guinn Dig in! I hope you find this useful.
  4. Quote:Why do you think "const" makes a difference here? The caller has to communicate information to the callee, and wether he treats that information as const or not doesn't really change anything for the caller, does it? If you specify a variable as "const", nothing can be assigned to that memory location (well, that's not entirely true, but let's assume that's the case for the sake of argument). Normally, when a compiler generates assembler code for calling a function, it will generate code to push local variables onto the stack before the function, then pop them back off afterward to make sure that the underlying function calls don't overwrite whatever important stuff was going on in that method. This creates an overhead for every single function call of 4 bytes of memory and 2 extra assembler commands. If "const" in the function declaration were to cue the compiler that "hey, you don't need to push/pop this memory location because it'll be the same when this function returns", that's overhead that would apply every single time the function is called that instead goes *poof* Quote:Ask your compiler. You can usually get your compiler to tell you what kind of assembly it is generating by using the right command line options. gcc will do it with -S and MSVC with the /FA family of switches. The reason I ask is that this optimization seems to make a huge amount of sense (to me at least) but I've never heard it mentioned anywhere, and only recently stumbled upon some code (in this forum) with "const" on a primitive type parameter. It's the first time I've seen it in any code, anywhere in about 8 years of C++ programming.
  5. void do_something(const double variable) { ... } void call_do_something() { double dummy; do_something(dummy); } Does specifying "const" cause the compiler to avoid the normal assembler push/pop of 'dummy' that happens when invoking do_something? It probably depends on the calling convention used...
  6. Ah! PIX, of course! I ran a very simple test scene through PIX, and thanks to your help I think I'm getting closer to an answer. There are 21 bone matrices in this mesh. Splitting up the draw calls into sets of 16 polygons, I traced backward through the index buffer and found that all of the vertices rendered with bones 19, 20 and 21 produce the artifacts. There are no problems with any bone lower than 19. 20 and 21 are both children of 19, so I'm assuming that's where the problem is. Now here's the kicker: a different mesh with more bones and more vertices renders just fine. Both of these meshes render correctly in both the MultiAnimation D3D demo and both old and new versions of MeshView (all with lighting enabled). Normally, this would make me think that the mesh has a problem--except for some very strange PIX output. The mesh transformation on each draw call works perfectly: under the "Mesh" tab, the Pre-Vertex Shader, Post-Vertex Shader and Viewport all look exactly correct for every single render call--including a DIP for the whole mesh. However, flipping over to the "Render" view, as soon as bone 19 is drawn, the artifacts are there. It seems that during the actual texturing/rasterization, D3D chokes on something. All D3D calls (including SetTransform for all matrices, SetRenderState, EndScene and Present) return S_OK. Any other things to try would be very helpful--this problem is driving me nuts.
  7. Thank you for your replies. As I said, there is nothing unusual being output from the debug runtime; just the usual occasional warning that a state change is being ignored because it is already set. Thanks for the tip J-Fox; however, I tried splitting up the DrawIndexedPrimitive calls further and got the same results. Unfortunately, D3D is VERY sparse on its documentation of indexed blended animation with the FF shader. When you split up your calls, did you also split up the buffers? I am wondering if it could it be a buffer-size issue (i.e. the vertex buffers are too large to be handled by the pipeline?) If you have any more insight, I'd really appreciate it.
  8. I would consider this an advanced topic. It might be a long shot, but I'd like to see if anyone else has encountered this bug. I am using the FF pipeline because I want this code to run on old hardware. I am using indexed blended vertex animation to animate a bipedal skinned mesh. I split the mesh into vertex groups, since not all vertices are are weighted with the same number of bones, or if there are too many bone matrices to fit on the hardware simultaneously. Everything works fine when D3DRS_LIGHTING is FALSE, and Direct3D outputs no errors or warnings. As soon as I toggle this flag, some of the vertices look as if they are being transformed by the null matrix (stretching out from wherever they are attached on the model to the origin). Direct3D still outputs nothing unusual. Change the lighting flag back, and the error goes away. This error occurs on one specific mesh. This happens to be the mesh with the most number of bones, but the number of bone influences doesn't seem to be the problem (it happens for 1, 2 or 3 influences). Now here's the really weird part: this only happens in hardware mode. Software mode works perfectly. I am running a 100% D3D9-compatible graphics card. This has been bugging me for a while, but I've chosen to ignore it for now since I don't have any ideas. Does this sound familiar to anyone?
  9. Ah! You found the one line of code I had to change to update to VC2005 (it was complaining that strncpy was deprecated). Your listing is what I originally had :) If you have any problems or need anything explained, let me know and I'll be happy to help. Karl
  10. Download the Source (6 MB) View the Documentation Hello fellow developers! It's been quite a while since I have posted here, but I still check the boards often and finally believe I might have something you would be interested in. This is a bit of a cross-forum project, but I figured I would post it here as DirectX makes up the bulk of the complex code. I dug up some old source code that I had created almost a year ago now, and tweaked it a bit so all of you who want to have a look at a real, working networked 3d application can do so. This project contains:Fully-functional client Fully-functional server (yes, it works over the internet) Support for up to 16 players simultaneously (although this is only limited by a #define statement) OPTIMIZED, ANIMATED .X MESHES! DirectInput keyboard and mouse recognition Camera control Only ~3500 lines of code Simple, funtion-oriented design Complete online documentation (also included in download) Precompiled demos in the /Bin/ directory Licensing under the GPLNow, for the disclaimer. This source doesn't have any kind of chat capability, items, weapons, terrain (other than a flat sheet of grass), etc. Essentially, it has no content--but the core of the application is there for you to tinker with, and add on to. Also, you might find that the server code isn't too well documented. Most of the documentation for this code can be found in the source files itself--I have yet to go through and add comments to all of the function declarations in the headers. Enjoy! I'd love to hear from anyone who finds this useful :D Karl
  11. Karl G

    Destructible terrain

    Look up the function D3DXIntersectSubset
  12. Karl G

    Single-Pass Multitexturing

    Name, you are amazing!!! It worked perfectly--thank you SO MUCH!! Karl
  13. Hey guys. I know this topic has been addressed before, but the search is being dumb (sql timeout after blah blah seconds...etc) and I can't find any resources on it. Story is, I'm doing multitexturing in C++ using Direct3D 9.0c and I can't figure out all of the texture stage state settings. I'm trying to blend two textures over a single triangle in one pass, using the alpha value on each vertex to change how much each texture is applied, and mix the textures with the diffuse color of that vertex. This is what I've got right now, but the alpha blending doesn't affect the amount of each texture--they're just blended evenly. myD3DDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, 0 ); myD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); myD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE ); myD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); myD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); myD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_LERP ); myD3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 0 ); myD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); myD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE|D3DTA_COMPLEMENT ); myD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE ); myD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_CURRENT ); myD3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_LERP ); myD3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); Edit: fixed a typo
  14. Simple answer, no it won't work. There aren't any exporters I know of that export biped animations correctly to .X format; you just need to rig and use FK the character normally.
  15. Karl G

    storing character data in a (M)MORPG

    Graveyard-- I don't think anyone mentioned this befure, but I wanted to let you know that using a MySQL database in your game either requires the entire game to be open source, or for you to purchase a license.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!