Jump to content
  • Advertisement

briantsim

Member
  • Content Count

    51
  • Joined

  • Last visited

Community Reputation

108 Neutral

About briantsim

  • Rank
    Member
  1. Hi All, I am learning point sprite. I tried search key words "point sprite" in Internet. But i can't fined good tutorial. Hope somebody can give good point sprite tutorial web site. Best Regrads,
  2. briantsim

    Degrees Question?

    Hi all, I has postion x1,y1 and x2,y2. How to calculate Degrees?
  3. briantsim

    3D coordinate to 2D coordinate

    Hi Endurion, i tired your suggestion. I can get vector3. How to change 2d coordinate? How to find depht? Below is my codeing. Vector3 nearsource = new Vector3( (float)mouseX, (float)mouseY, 0f ); Vector3 farsource = new Vector3( (float)mouseX, (float)mouseY, 1f ); Matrix world = Matrix.CreateTranslation( 0, 0, 0 ); Vector3 nearPoint = graphics.GraphicsDevice.Viewport.Unproject( nearsource, proj, view, world ); Vector3 farPoint = graphics.GraphicsDevice.Viewport.Unproject( farsource, proj, view, world ); [Edited by - briantsim on May 30, 2007 1:24:00 AM]
  4. briantsim

    3D coordinate to 2D coordinate

    Hi Supernat02, Thanks of the replys. I can change 3d coordinate to 2D. But i has new question. Hope somebody help. My question is how to 2d Mouse coordinate to 3d?
  5. briantsim

    3D coordinate to 2D coordinate

    Hi ET3D, Thanks for the replys, If I can get between -1 to 1. How to change to integer? Can you give me sample code?
  6. briantsim

    3D coordinate to 2D coordinate

    Hi ET3D, Thanks for the replys, If I can get between -1 to 1. How to change to integer?
  7. Hi all, I created a 3d model is my game. Model moving around. I want some 2d Sprtie follows the model. How can change the 3D coordinate to 2D coordinate. I fined some sample in internet. But i can't get 2d coordinate. Below is my codeing. Hope somebody help. =================================================================================== Vector3 position = new Vector3(0, 0, 0); Vector3 cameraPosition = new Vector3(0.0f,40.0f, 0.0f); int ScreenWidth = 1024; int ScreenHeight = 768; float aspectRatio = ScreenWidth / ScreenHeight; Matrix world = Matrix.CreateTranslation(0, 0, 0); Matrix view = Matrix.CreateLookAt(cameraPosition, new Vector3(0f, 40, 0f), Vector3.Up); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), aspectRatio, 5.0f, 3000.0f); Matrix worldViewProjection = world * view * projection; Vector2 Position = new Vector2(1024/2,768/2); Vector3 screenPoint = Vector3.Transform(Position, worldViewProjection); ========================================================================== screenPoint.X is 2D coordinate X. screenPoint.Y is 2D coordinate Y.
  8. Hi all, I created a 3d model is my game. Model moving around. I want some 2d Sprtie follows the model. How can change the 3D coordinate to 2D coordinate. I fined some sample in internet. But i can't get 2d coordinate. Below is my codeing. Hope somebody help. =================================================================================== Vector3 position = new Vector3(0, 0, 0); Vector3 cameraPosition = new Vector3(0.0f,40.0f, 0.0f); int ScreenWidth = 1024; int ScreenHeight = 768; float aspectRatio = ScreenWidth / ScreenHeight; Matrix world = Matrix.CreateTranslation(0, 0, 0); Matrix view = Matrix.CreateLookAt(cameraPosition, new Vector3(0f, 40, 0f), Vector3.Up); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), aspectRatio, 5.0f, 3000.0f); Matrix worldViewProjection = world * view * projection; Vector2 Position = new Vector2(1024/2,768/2); Vector3 screenPoint = Vector3.Transform(Position, worldViewProjection); ========================================================================== screenPoint.X is 2D coordinate X. screenPoint.Y is 2D coordinate Y.
  9. Hi all, I craete a .x file. The file include key frame animation. How to play animation with XNA. I tried search refer with internet. But the refer is very difficult, who can give me good easy example? Best Regards,
  10. Hi all, i tired to use HLSL move my texture uv with xna. But the texture move uv has some problem. Below is problem sceen-dump and HLSL code. Hope somebody help. Problem screen-dump: http://hk.geocities.com/brian_tsim/error.PNG HLSL Coding =============================================================== float4x4 worldViewProj : WorldViewProjection; float time; texture testTexture; sampler Sampler0 = sampler_state { Texture = (testTexture); MipFilter = LINEAR; MinFilter = LINEAR; MagFilter = LINEAR; }; struct VS_INPUT { float3 normal : NORMAL; float2 texture0 : TEXCOORD0; float4 position OSITION0; }; struct VS_OUTPUT { float4 position OSITION0; float2 texture0 :TEXCOORD0; }; struct PS_OUTPUT { float4 color : COLOR; }; //----------------------------------------------------------------------------- // Simple Vertex Shader //----------------------------------------------------------------------------- void vs(in VS_INPUT IN, out VS_OUTPUT OUT) { OUT.position= mul(IN.position , worldViewProj); OUT.texture0 = IN.texture0; } //----------------------------------------------------------------------------- // Simple Pixel Shader //----------------------------------------------------------------------------- void ps(in VS_OUTPUT IN, out PS_OUTPUT OUT ) { IN.texture0.x += time/10; float4 color = tex2D(Sampler0, IN.texture0); OUT.color = color ; } //----------------------------------------------------------------------------- // Simple Effect (1 technique with 1 pass) //----------------------------------------------------------------------------- technique Technique0 { pass Pass0 { VertexShader = compile vs_1_1 vs(); PixelShader = compile ps_2_0 ps(); } }
  11. hi All, I want to create installer with XNA. I tried useing "wise for windows installer" software create installer. The package can installer in any PC(installed .net framwork 2.0) and running in my develop PC,but the program can't run in other PC. i not very understand what is the problem. below is my installer link.Hope you can help me fix this problem. http://www.skbbq.com/test.MSI program will install to c:/program file/WindowsGame1.
  12. briantsim

    XNA create windows installer ?

    hi Moe, Thanks for your help. Yes i want to create installer with XNA. I tried useing wise for windows installer software create installer. The package can installer in any PC(installed .net framwork 2.0) and running in my develop PC,but the program can't run in other PC. i not very understand what is the problem. below is my installer link.Hope you can help me fix this problem. http://www.skbbq.com/test.MSI program will install to c:/program file/WindowsGame1. Best Regards,
  13. Hi all, I want to use "wise fo windows installer" create windows installer (*.msi). Who can tell me, how to use wise fo windows installer create windows installler? Best Regards,
  14. Hi all, I want to draw basic shadow in my game, i tired find some resources with internet(Key words: HLSL Shadow). But i can't find good shadow tutorial.Who can give me good show example? Best Regards,
  15. Hi all, My PC has two display cards. I want to control two display with one program. How to create two render with one program? Please give me good example. Best regards, [Edited by - briantsim on April 9, 2007 9:23:16 PM]
  • 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!