Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Trounce

  • Rank
  1. Trounce

    Mesh.Intersect help

    Daedalus, I really appreciate the time and effort you put in to that reply. I got similar results using your methods so I knew it had to be something else. It turns out my ray coordinates were reversed making the collision detection 100% wrong in every direction. Once I corrected that, I got correct collisions. And I'm much, much happier. :) Thanks again. You'll no doubt be hearing from me again when I try to implement something else above my level.
  2. Trounce

    Mesh.Intersect help

    Hi Etnu. Okay, I'm confused then. I assumed that a world transform just positioned the world in the right place to render the mesh. I didn't think that the mesh's data actually got transformed permantently. For example: You have a single terrain mesh. But you want to tile this mesh in world space. So you do this: device.Transform.World(Matrix.Translate(0, 0, 0)); Then you render your mesh (which puts it in the center of the world). To put the same mesh next to the first one, you call another Transform.World. This time putting it at 10, 0, 0). And again, render the same mesh object. I thought that with each transform, the mesh was translated from object space to world space. Not But does this actually change the mesh's coordinates? I thought it just moved/rotated/whatever the world and the mesh's intrinsic coordinates remained unchanged. Okay, if that's incorrect. How do I get transformed coordinates for my postion vector for the Mesh.Intersect. Right now I'm using: Mesh.Intersect(new Vector3(planeX, planeY, planeZ), new Vector3(0, -1, 0)); I'd need transformed coordinates for planeX, planeY, and planeZ.
  3. Hello, I'm using Mesh.Intersect to get the terrain height below my character. Basically, it creates a ray originating at the player, and casts down. The returning intersect information is used to determine a collision with the terrain. This is something I've been working on longer than I care to admit. I hate it. And I hate trying to figure it out day after day. So please, if you know the answer, speak up. :) First, sure, it appears my intersect is working. It gives an intersect distance. But -- it doesn't follow the terrain accurately. It's almost like my character (airplane in this case) and the originating ray are in different places and it's driving me up a wall. The Mesh.Intersect method requires 2 vector3s. One is the origin, one is the direction of the ray. Basically, I put my origin in untransformed coordinates (assuming Mesh.Intersect works in object space). But no matter what I try, I can't get this to work. If my plane is at X: 5000, Y: 300, Z: 1 (before transforming), wouldn't that coorespond to the same X,Y,Z in object space? How are meshes organized? Like this? [100.....-100] Z 100 [............] [............] [... 0 ...] [............] [............] [100.....-100] Z -100 I mean in order of coordinates. Is 0 the center? Thanks. Terribly frustrated and burned out.
  4. Trounce

    Seams in my skybox.

    Perfect. That fixed it. Thank you! I really appreciate it. :)
  5. Hi guys, I've created a skybox for a game I'm working on that uses a mesh cube shape. All my textures match up perfectly. To render the skybox I turn off z-buffering, turn off lights, and render. I thought that should remove any visible seams, but you can still see lines at the edges. It isn't due to any kind of lighting though because all the faces are fully lit. The textures match up exactly too. For some reason, the lines are visble anyway. Anyone have any idea? Is there an easy way to post a screenshot in these forums? Thank you.
  6. Hello, I'm trying to create a large terrain. The biggest problem I'm having is with texturing it. If my terrain is say, 4000 x 4000, I need a 4000 x 4000 texture (this is using terrain generation tools) so it doesn't look pixelated. Is it possible to use a smaller non-tiling texture on a larger object without it looking pixelated? Is it better to use small terrain 'tiles' and thus smaller textures? How do game companies do it? Thanks
  7. Forgot to mention in the above example, I'm using Matrix.LookAtLH for transform View.
  8. Hello, I'm a bit confused on how to use transform view and world. So could someone please clear up these few questions I have: 1] TransformWorld is used for the current mesh? So if I draw a mesh, then transformworld I'm transforming for the mesh I just drew? So to draw another mesh at a different location, I just draw it to the backbuffer, then transform world again? 2] TransformView takes 3 vectors. The camera position, the target, and which element equals up. So I figured if I kept the target at origin, that I could move the camera around it in a circle by increasing the X value of the camera position each frame. This works, but for some reason, it also moves the camera away from the target (even though I'm keeping the Z value static). If I were writing a FPS game, would I use TranslateView to move the character around the world? Or would I translate the entire scene using TranslateWorld? Thanks!
  9. Okay, I scoured the 'net and can't find a -single- example on using AlphaBlending with meshes and Managed DirectX (C#). Can any coding guru out there shed some light on this issue?
  10. Ah perfect. Now I can test for opacity no problem -- which was half the battle. :) ...but I just don't know what to do with it. There are a large amount of Alpha related functions, and I'm not sure which I need use. The parts of the mesh that I want to blend don't have textures applied. I'm not sure if that complicates things.
  11. Hello, I'm using Deep Exploration to export 3DS files to .X. My problem is that my program code (and the SDK example) ignore my material opacity. Where is the opacity stored in the .X file (or the Alpha -- whatever it's called), how can I test for it, and what do I need to add to my render function to display that material as partially opaque? Loading my newly exported .X file back in to Deep Exploration shows partially opaque materials correctly. So it must be a feature lacking in my (and the SDK example's) mesh loading routine? Thank you!
  12. Thanks for all the tips. Deep Exploration exported an .x file that included the textures and everything worked great (whew). One last question: None of my exports (using any exporter) seem to export material opacity. All my transparent materials show up as solids -- which looks a little ugly. What can I do to ensure my transparent polygons show up that way? Thanks again.
  13. I wasn't specifying a path, so it was looking for the textures in the same directory as the mesh. When I load it in my program, it doesn't have any errors, but the model is all black. In the DX Utilities Mesh viewer it's missing all its textures too. What version of 3DSMax are you using? 6? What if I sent you the .3ds file I'm trying to convert? Maybe you could shed some light on the problem?
  14. I have spent the last 5 hours trying to find a plugin that works with 3D Studio Max that can export .X files correctly and without errors. The Panda plugin works fine for geometry, but doesn't set up the textures right and nothing shows up as textured after it's been exported. Before you suggest Polytrans - I'm only learning DirectX. I can't rationalize dropping 400 dollars on a tool just so I can convert files to the .X format properly. I tried the demo and it worked fine, except for the fact that it deletes every 5th polygon, distorts all the textures, and won't export animations without registering first. So, am I going about this the wrong way? Is there another 3D program that can export .X files correctly? I tried Milkshape, but nothing it exported actually loaded without crashing. I figured a popular 3D program + a popular file format = easy success. But that is DEFINITELY not the case. Is there an easier way?
  15. Hi, I'm only new at network programming myself, but I believe DX8.1 has a packet object called NetworkPacket. Try creating a new NetworPpacket object. Then using: packet.Write(jpgorwhatever) The write command automatically converts the passed object into raw bytes which can then be reaquired on the other side with something like this (this is in C# but the concept should be the same): JpgObject jpg = (JpgObject) args.Message.ReceiveData.Read(typeof(JpgObject)); In DX8.1's recevie handler.
  • 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!