Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

124 Neutral

About edenxiii

  • Rank
  1. edenxiii

    DXUT and high resolutions

    I found the cause, and I'm posting for future reference. DXUT running in DX9 will thow an assert about the viewport under WDDM if the window exceeds the maximum size supported by the device in width or height minus the title bar and window framing. The memory exception was just a product of this assert being thrown. So the short take-away is that if you're using DXUT, make sure to keep the window well within the bounds of the display for windowed mode while in debug; you can't get away with a window larger than your max desktop resolution like you could in WinXP with DX9. It doesn't hurt anything in release builds, but there's assert code in there that won't be denied no matter what you do.
  2. Hi all, I'm running into something I can't really explain so I thought I'd ask the community in case anyone else has seen it before. I'm building a C++ DX9 app on top of DXUT using the EmptyProject from the SDK as a starting point. I'm using Visual Studio Express 2008 on Win7 with the June 2010 SDK. My desktop resolution is 1366 x 768. If I set the window size to something small like 800 x 600 everything works as expected, but when I up the resolution to something more viewable like 1024 x 768 or 1280 x 1024, I get random errors that almost seem like heap corruption. It usually manifests as First-chance exception at 0x76f3b727 in SMPL.exe: Microsoft C++ exception: long at memory location 0x0027df88.. D3D9 Helper: IDirect3DDevice9::ValidateDevice failed: D3DERR_INVALIDCALL D3DX: ID3DXEffect::FindNextValidTechnique: No subsequent valid technique found in the debug window when I try to load an effect. This happens with any effect, regardless of complexity. Yet at resolutions like 800 x 600 and lower, it all works just fine. I've generated a map and have tracked that memory address to be something FindNextValidTechnique() generates internally. Another symptom I notice is Direct3D9: (ERROR) :Viewport outside the render target surface which makes no sense, as the viewport is set to the same values as my window size: // Camera Initialization // m_FullViewport.Width = uiScreenWidth; m_FullViewport.Height = uiScreenHeight; m_FullViewport.X = 0; m_FullViewport.Y = 0; m_FullViewport.MinZ = 0.1f; m_FullViewport.MaxZ = 1.0f; // ... // During the app startup // DXUTCreateDevice( D3D_FEATURE_LEVEL_9_3, m_ptLogic->GetIsWindowed(), m_ptLogic->GetScreenWidthInPixels(), m_ptLogic->GetScreenHeightInPixels() ); // ... I have nothing bound to the display resolution, no render targets or stencils. I respond to lost devices and device resets as they happen via registered callbacks with DXUT. At lower resolutions, I can alt+tab, minimize, and alt+enter with no issues. On Windows Vista and XP I have no issues, which leads me to think it may have something to do with the way DX9 is emulated in WDDM, but that's just guessing and I haven't been able to test it on another Win7 machine yet. PIX offers no help; I can see it load the effect and try to find something that will validate, but there's no information there telling me why it fails out, only that it did. Any ideas, besides throwing out DXUT and rolling my own in hopes that it makes the problem disappear?
  3. edenxiii

    nice grass, but how?

    I'm not sure what you're fishing for, but just implement textured quads grouped into pairs forming X shapes and scatter them across your terrain. Apply vertex distortion like in the ShaderX article, and you're good to go. If you look closely, you'll see that Oblivion does something similar
  4. I'm parsing animation keys from an xfile, but oddly enough I can't get the data out of the id3dxfiledata object. It's really strange because I can parse the object's children (which for an animation object is a reference to its associated frame), but when I Lock() it and try to grab the data, it returns 0 datasize and a null pointer. Anybody know under what conditions the id3dxfiledata->lock() function returns null? For that matter, anybody have a better explaination of its use than msdn and the docs? Thanks in advance.
  5. If I'm reading you right, you're trying to get a mesh to appear behind every other mesh while remaining ortogonal to the camera? Easiest way I know is to create a viewport with a min and max Z of 1.0, a orthogonal projection matrix, and an identity view matrix. Use those only when rendering the rectangle (render it before anything else) and you should be good.
  6. edenxiii

    Quaternions, Maya, and X files

    Still waiting to hear back from FilePlanet... In the meantime: Paulble, I wish I could figure out what exactly causes export problems with the newest exporter, but I can't find a pattern. The only consistent problem is with my desktop machine. When I try to gather the animation data, Maya pops up a messagebox about a "pure virtual function call" error, then crashes. I'm pretty sure that this is just an issue with that one workstation, though, as I haven't been able to reproduce this on any other machines.
  7. edenxiii

    Quaternions, Maya, and X files

    Funny what a good night's rest can do; I've solved the issue, and I think posting the answer here will help at least a couple people. As I said, DX has a problem with euler rotations, so before setting any animation keys you need to make sure Maya uses quaternions. You can set this by going to Window > Settings and Preferences > Preferences and click on Keys under the heading Settings. There's a drop down that allows you to change the math behind rotations: set this to "Synchronized Quaternion Curves." Another thing to be sure of is that there aren't an miscellaneous transformation nodes hanging around the scene. Open up the hypergraph by going to Window > Hypergraph and delete any transformation nodes you find. This might blarg your bones or geometry, but that shouldn't be too hard to fix. Basically, you're doing this so that everything in your scene inherits only the transform of its parent, which is what the DX expects. Its a good idea to keep everything as clean as you can anyway, since every .x exporter out there dumps the whole scene hierarchy out to file. Oh, and it seems that the recompiled October exporter is more reliable than the December and newer ones. Problem is, that file's really hard to find these days. Luckily I still have my orignal .rar, and I've already submitted it to Fileplanet. As soon as its up for download I'll post the link here. Hope this helps someone.
  8. I posted an issue I had with exporting from Maya a little while ago, and Gents gave me some pretty useful advice, but there's still one huge problem, and I don't think this one's so simple to fix. It turns out that when a model uses IK in Maya, the solver uses euler angles to resolve the bone's rotations. This becomes a problem because DX reads rotations as quaternions, which explains all the weird jittering, popping, and geometry twisting a lot of folks --myself included-- have been getting. So the question is: does anyone know a way around this? Is there a way to tell Maya to use quaternions for IK, or has someone recompiled an exporter that fixes this? What about conversion apps like PolyTrans or Deep Exploration? Will they help? Is there an open-source/free equivalent? Big ups to anyone that can help. Thanks in advance.
  9. I'm not 100% sure, but I think every frame has a transformation matrix. Try looking through the xfile (if text).
  10. edenxiii

    Isometric Camera Design

    I'd imagine you could just angle your camera to your liking, then from then on when you update the position of the camera (like scrolling around) you apply the same translation to your lookAt vector.
  11. edenxiii

    This snippet look right to you?

    Oh, right. Yeah, memcpy() works just fine. Thanks!
  12. CommitChanges() commits your changes :) Basically, whenever an effect changes a state on the device, that change gets tossed until you say "hey I'm serious about the changes I'm making." Its one of those DX things to keep you from murdering performance accidentally
  13. edenxiii

    2D in D3D9 Problem

    I'm not too sure where I read this, but I think a triangle fan would run faster on most cards...something about driver assumptions...
  14. Its late and I'm out of resources. I can't find anything to tell me one way or the other, but does this code snippet look right to you? //Grab the adjacency info DWORD* AdjacencyArray = (DWORD*)pAdjacencyBuffer->GetBufferPointer(); m_MeshContainer.pAdjacency = new DWORD[(pAdjacencyBuffer->GetBufferSize()/4)]; //Copy the adjacency info over for(DWORD i = 0; i < pAdjacencyBuffer->GetBufferSize()/4; i++) { m_MeshContainer.pAdjacency = AdjacencyArray; } //Release the adjacency buffer; we no longer need it pAdjacencyBuffer->Release(); Esentially, all I'm doing is grabbing the adjacency info out of the buffer returned by LoadSkinMesh and sticking it in the DWORD* for adjacency in MeshContainer. Is there a better way? Does this work? Thanks in advance.
  15. I know people have had problems galore with exporting x files from Maya, but I'm still trying. I've tried using the December 2004 exporter, and I'm getting the black mesh problem. I have a recompiled version of the Maya 4/5 exporter, which works great, except when it comes to animation. I can animate all day in Maya, but it won't export out. MeshView can see that there's an animation, and it'll try to play them, but the results are unpredictable (if I see any results at all). Has anyone else had this problem? Any suggestions?
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!