Jump to content
  • Advertisement
Sign in to follow this  
Dean1988

ID3DXMesh as a Terrain? Texturing it?

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, Basically, in my scene i have a .x file i exported from Max to use as a terrain.. It works great, however i'm sure this isn't the way to do it. Basically, i wanna texture it properly, atm i have a 256x256 grass texture, and it streches the texture over the entire surface of the mesh, making each blade of grass look very large indeed. Now i've been trying this
g_pD3DDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP );
g_pD3DDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP );
but it doesn't seem to do the trick! All i want to do is to tile my texture across the mesh, is this possible? Cheers, Dean.

Share this post


Link to post
Share on other sites
Advertisement
To tile a texture you need to use larger ranges of coordinates that 0 to 1. For example, 0 to 5 would tile the texture 5 times along whatever axis the coordinates are on.

Usually though you texture meshes in the same application you make them, and don't have to apply texture coordinates yourself later on. Why are you doing it this way?

Share this post


Link to post
Share on other sites
Well,

I made a box in max, made a few bumps in it, exported to .x and then textured it in Dx...

Is this not the right way?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!