decrypt Posted February 7, 2006 Posted February 7, 2006 I want to be able to load a mesh into vs.net without having to define the textures at all, but use the texture information in the .x file. I am using the code at http://www.xtremedotnettalk.com/showthread.php?t=95349 . How would I be able to load a mesh file into vs.net by using the texture information in the .x file? Answer in either c# or vb.net Thanks a lot in advance, decrypt Quote
decrypt Posted February 12, 2006 Author Posted February 12, 2006 Ok, I've had enough of searching around on the internet for how to do that. How would I be able to texture the following .x file of mario? I want to use three colors to do itmario_stand.txt Quote
Nate Bross Posted February 12, 2006 Posted February 12, 2006 I don't mean to be unhelpful; but I have only ever done it through the modeling software, Maya, Max, Lightwave, etc. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
decrypt Posted February 12, 2006 Author Posted February 12, 2006 I created the file in blender with the textures on it (that are just colours). I import it and I get a white mesh that isn't textured. How could I texture it from the information in the file? Quote
Nate Bross Posted February 12, 2006 Posted February 12, 2006 I'm not sure, when you use 'color' materials in a 3D model, I believe that will only be noticable in that 3D Modeling Software's interface, you would need to use a bitmap texture of that color. To save space you could make three small, 32x32, bitmaps of all the color you wish, when you export that to .X it should also output the texture (bmp) files in the same directory. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
decrypt Posted February 13, 2006 Author Posted February 13, 2006 (edited) Oh, that seems to make sense. I'll try that. One more question though, is that when I load the mesh will it load those textures, do I have to somehow get the path of the bitmaps from the .x file and load them in? Edit: btw, when I view it in the directx view it views to colour. Edited February 13, 2006 by decrypt Quote
Nate Bross Posted February 13, 2006 Posted February 13, 2006 That's interesting, if the .X viewer shows the colors, there must be something that I didn't impliment in my clsMesh code. But, the clsMesh that you are using will automatically load the associated textures if they are in the same directory as the .X file. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
decrypt Posted February 14, 2006 Author Posted February 14, 2006 hmm... do you think there is anyway to load the materials colour instead of loading in the texture from the file? Quote
Nate Bross Posted February 14, 2006 Posted February 14, 2006 I'm sure there is a way, but I don't know how. I will keep my eye out and post back here if I find anything. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.