• Advertisement
Sign in to follow this  

multiple uv coords in .x file?

This topic is 4298 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

hey guys I want to single-pass multitexture a .x mesh using a different set of uv coordinates than that mesh defines. the goal of this is to eliminate the illusion of tiling. how could i go about drawing my second texture this way? i don't see how =/ is there a better way to multitexture? -Sean

Share this post


Link to post
Share on other sites
Advertisement
I had the same problem when i was working with lightmaps...create another vertex definition that includes the secondary uv channel, something like this:

struct VERT
{
D3DVECTOR pos;
D3DVECTOR normal;
float u, v;
float u2, v2;
};

#define MESH_FVF (D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_TEX2 | D3DFVF_NORMAL)



then clone your mesh using this fvf and fill the texture coords :)

Share this post


Link to post
Share on other sites
omg that's a fantastic idea. i never tried cloning a mesh before, so i never considered it. thanks b3rs3rk!

Share this post


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

  • Advertisement