Sign in to follow this  
allenm

DirectX9 Help

Recommended Posts

allenm    122
I am using .Net 1.1 with C# and DirectX9 SDK August 2005. I have a few basic questions. I have already looked at Coding4Fun, and the examples on the SDK but I had a few basic questions. First, I wanted to make a character stand on a terrain. I can generate the terrain and a simple mesh representing the character, but I can't seem to combine the two. Second, I wanted to add animation of my characters to my game but Im not sure how to go about doing it. I tried looking at the SDK code, but I couldn't sort through it all or understand it. Third, I wanted to make an advanced mesh (a really detailed mesh object) object and apply textures. I noticed some meshes that had textures with different pieces in one picture file. How would I accomplish this, along with creating an advanced mesh. Any books, websites, or any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Armadon    1091
Quote:
First, I wanted to make a character stand on a terrain. I can generate the terrain and a simple mesh representing the character, but I can't seem to combine the two.


With generation of terrain from heightmaps you generally have a height lookup table to work with after you have read the .raw file. If you want to place your character/mesh on a certain part of the terrain you just acquire the height of the specific location and then build the world matrix for that character.

Quote:
Second, I wanted to add animation of my characters to my game but Im not sure how to go about doing it. I tried looking at the SDK code, but I couldn't sort through it all or understand it.


Tell me about it. It's a bit daunting at first.
You could take a look at Dustin Franklin's DirectMesh package that handles animation and other related mesh features.

Quote:
Third, I wanted to make an advanced mesh (a really detailed mesh object) object and apply textures. I noticed some meshes that had textures with different pieces in one picture file. How would I accomplish this, along with creating an advanced mesh.


With 3D Modelling packages you can create a UV map texture. This generates texture coordinates on a large texture and then when you load the mesh. The needed texture coordinates are there from this image to texture the mesh.

Something like Ultimate Unwrap 3D would help if you are unsure of how it works.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
allenm    122
That unwrapping 3D looks like what I want. Thanks a lot! I'll take a look at the other website. Basically, I'm not sure how animation is done in directX. I tried running the debug mode over and over again with the example code, but I didn't see where like a method called AnimateNow() was placed.

Also, would it be more beneficial to use the camera class provided with the SDK or write my own? Either way, I'm not sure how to make the mesh object stay on the camera if I'm traveling across the X and Z axis. Also, I wanted the character to adjust to the terrain (for example instead of walking through a moutain, walking over it).

Thanks for all of the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this