Advertisement Jump to content
  • Advertisement

My_Mind_Is_Going

Member
  • Content Count

    174
  • Joined

  • Last visited

Community Reputation

132 Neutral

About My_Mind_Is_Going

  • Rank
    Member
  1. For a test scene, the Sponza Atrium is nice: http://www.crytek.com/cryengine/cryengine3/downloads
  2. My_Mind_Is_Going

    Software implementation of OpenGL 4.0?

    Quote:Original post by swiftcoder In that case OpenGL 4.0 development is more than a little pointless Which is why he's interested in a software implementation...
  3. My_Mind_Is_Going

    Software implementation of OpenGL 4.0?

    Quote:Original post by RobTheBloke To be honest though, with a low spec ATI HD5450 costing around £35, why don't you just buy one of those and be done with it? Maybe he's using a laptop?
  4. My_Mind_Is_Going

    [FBX SDK] How I get the keyframes times?

    It's been a while since I worked with the FBX SDK, but I think given a KFCurve, you can get the time for a particular keyframe with the KeyGetTime method (passing in the index of the frame). Another way to go at it would be to choose your own keyframe times and use KFbxNode::GetGlobalFromCurrentTake to give you a transform at each time. This is the way I do it. I guess you're not getting the true original keyframes this way but it seems to work well enough. EDIT: Didn't read your post carefully enough the first time. As with the second approach I mentioned, I would try just generating some times spaced out over the duration of the animation and ask for the global transform at each time. It will give you an interpolated value that should work.
  5. I'm building Luabind as a static lib with Visual Studio 2008, and the lib it's producing is 12MB in release mode. Is Luabind really this huge, or could there be some #defines/compiler settings I'm missing that are used by the official build process (Boost Jam I guess)?
  6. I'm trying to use the VMR9 in renderless mode to render to an XNA texture. After approaching it a billion different ways this is what seems to almost be working: 1. In my IVMRSurfaceAllocator9::InitializeDevice method, create a Texture2D with the requested size and format. 2. Use reflection to grab the "pComPtr" field from the texture, use this to construct an MDX texture so I can call GetSurfaceLevel to get the surface pointer. This is the pointer I give to VMR9 to render to. This almost seems to work, my PresentImage method gets hit every frame as expected, except when I try to draw the texture to the screen (with SpriteBatch) I get this error from D3D: "Direct3D9: (ERROR) :Cannot render when currently set textures are locked" Followed by: "A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll Additional information: An unexpected error has occurred." And the app dies. Since DirectShow is running on a separate thread I can see how there could be synchronization issues... the moment that my Game.Draw happens to execute may be when the VMR9 is in the middle of rendering a new frame. What I can't figure out though is how I would be able to synchronize this since there's no way to force the VMR9 to use any critical section I might create in the application. I notice that the SDK "vmr9allocator" sample creates its device with the D3DCREATE_MULTITHREADED flag, I'm not sure if this is intended to avoid this type of problem. When I modify that sample and remove this flag it still runs fine, and there are a bunch of warnings like this in the output: "Direct3D9: (WARN) :Device that was created without D3DCREATE_MULTITHREADED is being used by a thread other than the creation thread." Which I don't see in my XNA app, so maybe XNA is already setting this flag? Anyway, I'm pretty stumped as to how to proceed. I've seen some posts online that suggest other people have gotten this working (VMR9 + XNA) but there are no implementation details to be found.
  7. My_Mind_Is_Going

    C++ passing pointers to class objects into functions

    I'm assuming the second block of code is your chemical.h header? It looks like you've got the implementations of all the Chemical class functions in there. You want to put those in chemical.cpp, and just leave the class definition in the header file. In other words, put stuff like this: CHEMICAL::CHEMICAL () {} CHEMICAL::~CHEMICAL () {} double CHEMICAL::fCp(double _T){ Cp = a + _T*bE2*1e-2 + pow(_T,2)*cE5*1e-5 + pow(_T,3)*dE9*1e-9; return Cp; } In your cpp file. When they're in the header file and you include that in both main.cpp and chemical.cpp you're defining a body for each of those functions twice.
  8. My_Mind_Is_Going

    Noticed this and had a question.

    I find it useful in cases like this, where you have a member variable and a function parameter with the same name: void MyClass::SetFoo(int foo) { this->foo = foo; }
  9. My_Mind_Is_Going

    Depth Buffer and deferred rendering

    If you add a depth attachment to the render target where you do your final lighting pass, you can copy the depth buffer from your gbuffer over to it with glBlitFramebuffer and then enable GL_DEPTH_TEST like you want. As far as I can tell though you can't use glBlitFramebuffer to blit depth to the back buffer, so I do it to an intermediate render target and then blit the color from that to the screen at the end.
  10. My_Mind_Is_Going

    What are those lights doing ?

    If you're sure you're using a view-space light position in your lighting shader, are you sure your geometry is really in view space? And you calculating the attenuation of the point light based on the difference of these two view space positions? Can you post some of the code?
  11. My_Mind_Is_Going

    help ! my point light is following the camera

    Are you sure you're actually translating the light position, multiplying the view matrix by a vector with w=1?
  12. My_Mind_Is_Going

    What's wrong with this picture? (shadow mapping problem)

    Hmmm... I put the light in a fixed position, so it doesn't move with the camera and it seems to be casting proper shadows now. I just tried walking around, pointing a flashlight from eye-level and it is pretty difficult to get anything to cast a shadow... I guess you learn something new about the world every day :)
  13. My_Mind_Is_Going

    What's wrong with this picture? (shadow mapping problem)

    I'm not sure I understand... the light is supposed to be right in front of the camera, facing in the look direction, sort of like a flashlight. If I remove that x-flip in the texture coordinates that I mentioned, then the shadows shown in the screen shot disappear because they're behind the objects, which is correct. But the question is why aren't any pixels farther back, such as on the wall, in the shadow? I'm using deferred rendering for this (and the original XNA code was not) and drawing the lights as full screen quads, would that be introducing some complication I'm not aware of?
  14. My_Mind_Is_Going

    What's wrong with this picture? (shadow mapping problem)

    I tried that already actually, then I can't see any shadows at all. If I invert both x and y coordinates then I get the following result. The shadows are offset incorrectly in the x-direction now, and silhouettes are standing right next to the objects casting them. It looks like something is wrong with the light projection matrix or something, like the depths are inverted?
  15. I'm porting an existing (very basic) shadow map implementation from an XNA project over to one based on OpenGL and I'm getting the following, wrong result. Can anyone venture a guess as to what's going wrong? Something with the projected texture coordinates I suppose, but I can't figure out what. There's supposed to be a single spotlight casting the shadow, located just in front of the camera and pointing in the view direction.
  • 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!