Jump to content
  • Advertisement

Karl G

Member
  • Content Count

    183
  • Joined

  • Last visited

Posts posted by Karl G


  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. For those interested in VR head mounted displays, you might want to check this out -- a new company, backed by industry names like John Carmack, is selling prototype dev-kit versions of a VR HMD for $300 on kickstarter.

    http://www.kickstart...p-into-the-game

    I'm a complete sucker for good crowd-funded projects, and I love my TrackIR5 + triple-monitor gaming, so I've jumped straight on the bandwagon. Looking forward to adding Oculus Rift support to my engine in ~December ;)

    Thoughts?


    My friends and I jumped on this the morning the Oculus came available...and there were already hundreds before us tongue.png

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

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

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

  8. 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 GPL
    Now, 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

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

  10. To answer your question as it is phrased, there isn't a way NOT to. All aniumation controllers HAVE to share their frame hierarchy.

    To answer what I think you're trying to ask (how to get multiple animations to affect a single body), there is. Look up the track functions in ID3DXAnimationController and play with them. Look in the MultiAnimation sample for some good stuff on using them.

  11. Hey all, We're having a tough time deciding which model shows more promise, and should therefore be worked on, between these two. One of them is anatomically correct, and the other is stylized. It's a bit of a heated debate so if you could help us sort this out that'd be neat. Here's the first set: And this is the second set: [edit] Which female human set do you think could turn out to be the better model once it is textured and clothed? This is the original post on our forums if you want to take a look: http://www.unseenstudios.com/forums/viewtopic.php?t=1635 [/edit]

  12. I remember reading somewhere that the basic Winsock 2 functions (not those Microsoft WSA-whatevers) are not thread safe. This doesn't make sense though, because Winsock 2 is a DLL file, and to be able to be accessed by multiple programs it must be able to support simultaneous calls to the library functions. Is this true or am I missing something?

  13. Quote:
    Original post by circlesoft
    Unless you are as experienced with pure ASM as the Intel programmers are, I seriously doubt that this is true. The math D3DX functions have been extensivly optimized by Intel, Microsoft, and the IHV's. This includes all the matrix, quaternion, and vector operations.


    He's right. If you ever look at a profile of all functions in practically any D3D program, the D3DX functions are way down at the bottom of the list. Hundreds of calls to D3DXMatrixMultiply, for example, take less time than a single sprintf() function.

  14. That REEAAALY sounds like either (a) you haven't set your matrices correctly, or (b) your vertices' positions are really high values, like 4.4421321e56. This is caused by you not setting all of the vertex values you think you are (make sure you increment your variables in FOR loops!) or referencing a vertex that is out of the range of the buffer. Usually D3D will scream at you if you do this, but if you don't have debugging turned up and/or you aren't checking the DIP/DP/DS return codes, it could slip by.

  15. Neat demo, but it needs work. The camera and car shook even when I was standing still, and it seems that I couldn't go over the slightest bump without being rolled over...and over...and over. When that was happening, the camera would reset and jump around every once in a while. I passed straight through the land quite a bit, and it seems like I was driving on ice. Also, are the brakes in the front of the car? When I pushed backwards to slow down with even the slightest angle, I spun and would drive backwards for a bit. Very nice job on the terrain multitexturing though :)

  16. I suggest that you keep on plodding, even if you don't end up using any of it directly. The best thing to do is to know that the information is available (and where it can be found) when eventually you DO need it.

    As for that code, are you sure you posted it correctly?? It doesn't make much sense to me. Something like this would be more appropriate..

    #define _RGB16BIT555(r,g,b) (((r&5)<<10) + ((g&5)<<5) + ((b&5)<<0))

  17. Are you using MSVC to debug?

    If so, you'll have to press enter then shift+f5 to break out of the debug process if a function fails at window startup...it'll lock the computer and there's no way to terminate a process that's being debugged.

    I remember having the same problem when I was running 98 a few years ago. Although I don't remember solving it, I don't have that problem anymore (even though it's the same machine).
  • 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!