• Content count

  • Joined

  • Last visited

Community Reputation

124 Neutral

About TheSkyline13

  • Rank
  1. Gamespy

    I was wondering if there is somewhere I can download the open gamespy sdk. They seem to have discontinued it a while ago and the gamespy servers are being shutdown soon as well... Though I still need it but can't seem to find it anywhere.
  2. I'm not too familiar with how to do animations and there doesn't seem to be very many samples out there for what I am trying to do. Basically I'm trying to create an animation from raw data rather then from a .x file. I have the vertex/indice buffers with the rig and all the nodes and their information. There just doesn't seem to be a way for me to put all this information into the types needed. Such as the "AnimationRootFrame". I created the Frames and the hierarchy but there is no way to set the "FrameHierarchy" variable as well the construction of AnimationRootFrame takes no arguments. The only way it seems it to create it by the Mesh.LoadHierarchyFromFile() method, but I'm not creating it from a file.
  3. [Solved] Moving Object With Mouse - C# Directx

    Thanks for the help, that makes a lot more sense to me that way then the way I was trying to get it to work.
  4. I have some code that partially works but once it goes a certain distance it stops moving. The distance is calculated using sin rule, the angles of the last and current direction dot the direction of X (1,0,0). float distance = (float)(Math.Sin(Math.Acos(Vector3.Dot(Direction, new Vector3(1, 0, 0)))) * ((Camera.Position - MoveTool.Position).Length() / Math.Sin(Math.Acos(Vector3.Dot(d, new Vector3(1, 0, 0)))))); MoveTool.Position.X += (d - Direction).X * distance; Direction = d; Direction and d are just unit vectors based on the mouses current position in 3d space. Which I get using this: Vector3 d = Vector3.Unproject(new Vector3(e.X, e.Y, 1f), Device.Viewport, Device.Transform.Projection, Camera.View, Matrix.Identity); d.Multiply(1 / d.Length()); d being the current position, and Direction being the previous direction of the mouse. distance is the length from the camera position to the new position MoveTool should be at. I multiply it by the difference between d and Direction, which should be the change of the x direction. Then add it to the position of the MoveTool. This is the result: The position of the mouse is off in that video, but it shows the general movement and how the position isn't changing with the mouse. [Edited by - TheSkyline13 on October 18, 2010 6:50:40 PM]
  5. [Solved] Alpha Blending 3 Textures - C# Directx

    color.rgb *= lerp(secondary.rgb, primary.rgb, color.a) Was exactly what you said, really quite easy now that I know what that function does. Thanks again for the help :).
  6. [Solved] Alpha Blending 3 Textures - C# Directx

    I just made a quick shader and set it up, worked exactly like I wanted. I guess I'll have have to look more into shaders, thanks for the hints.
  7. [Solved] Alpha Blending 3 Textures - C# Directx

    Well if it would be easier to do in hlsl, I've tried to grasp the concept of it but still don't know how it all comes together. Diffuse: Alpha: Pattern 1: Pattern 2: Product:
  8. I'm trying two blend two textures onto a base texture depending on the base textures alpha. So, Stage 1 would add to the diffuse of Stage 0, using Stage 0's. Stage 2 would then add Stage 0 as well but it would use the inverse of Stage 0's alpha. Essentially Stage 1 would render to the white part of Stage 0's alpha and Stage 2 would render to the black part of Stage 0's alpha. The code I have here is trying to just get the first part of to work where Stage 1 only blends onto Stage 0 using Stage 0's alpha. It still renders all of Stage 1 though. Device.SetTexture(0, texture[0]); Device.SetTexture(1, texture[1]); Device.RenderState.SourceBlend = Blend.SourceAlpha; Device.RenderState.DestinationBlend = Blend.InvSourceAlpha; Device.RenderState.AlphaBlendEnable = true; Device.TextureState[0].AlphaOperation = TextureOperation.Disable;//Disable blending for base texture Device.TextureState[1].ColorOperation = TextureOperation.Add; Device.TextureState[1].AlphaOperation = TextureOperation.BlendCurrentAlpha; Device.TextureState[1].AlphaArgument0 = TextureArgument.Diffuse; [Edited by - TheSkyline13 on October 16, 2010 10:22:20 PM]
  9. [Solved] Rendering Model On Top

    That's exactly what I was looking for thanks.
  10. [Solved] Rendering Model On Top

    I'm trying to render a model over top of every other model, in sense I'm trying to create a move tool. I draw out all my models using the DrawPrimitives method, then using the same method draw out the lines for the x,y and z. I'm trying to use SetRenderTarget to overlap the models, I'm not sure if this is the right method to use, I'm having difficulty finding anything related to this. Am I on the right track or just completely off, I've been messing around with this function with no luck so far. [Edited by - TheSkyline13 on October 11, 2010 12:13:52 PM]
  11. [solved] Back Triangles Rendering on Front

    It was the depth buffer, thanks guys :).
  12. I'm trying to get a model to render using the Directx libraries but I'm having troubles when it's rendering a model. All the triangles at the back that are facing the camera are being rendered on top of the closer triangles. I'm rendering the vertex buffer using DrawIndexedUserPrimitives and its a trianglestrip. I don't have any cullmode set, and even when I set it, no matter what it still shows up like that. [Edited by - TheSkyline13 on September 27, 2010 11:37:21 AM]
  13. Dim Desktop

    Thanks for the replies. It is not meant to be open for long so the transparent window will do.
  14. Dim Desktop

    All that seems to do is make a form transparent. Would changing the opacity be easier, or does this do something more?
  15. Dim Desktop

    I was wondering how I could dim the entire desktop. Something like UAC, when the message pops up, you have the window and then the rest is dimmed. I am using C# and I assume that this could be done in directx.