My Planet Postmoderna Team has struggled with this Direct X export for some time now. We have not been able to get the file to export with the textures. Someone on our team may have found the problem but we don’t know how to fix it.
Can someone with experience in Python Scripting take a look at this file. Is it possible that the reference to exporting the texture is in the wrong place (eg after the close tag)?
In the ideal, it would be nice if it could confirm the locations of the referenced texture images. This way if you upload a DirectX file to a render location that uses a different directory format, you can change the file reference. Does that make sense?
K, then there must be something wrong with they way we are mapping the models then exporting them. I see the code in your post does not reference the location of the textures. How does it know where to look? Sorry to sound so “noobish.” I am though in many ways.
In AW where we are testing the models, there is a model directory and a textures directory and they are separate from each other. When we export from Blender, the file has no mention of the texture name, just numbers. Would you Geoff, mind writing a simple “how to” tutorial for a simple crate with an image texture that we could follow step-by-step. We will credit you for your help in the Dev Forums for our project. We have all been beating our heads against the wall about this.
I am no expert on this either, just amateur Blender hacker Yes model done from scratch in Blender my me, skin by Nigel Dickenson.
With regard to your question about how does it know where the texture is ?
Correct the X file doesnt have path information to the dds texture. So it is dependent on the application you are using downstream to view the model. For example in Deep Explorer, if you drop the texture dds file into the folder the X file is in it will display model with texture. My screen shot is from a 2nd world war flightsim “BoB2”, that has its own specific method, you feed the X file and a bunch of other information into a builder tool that takes all that info and spits out a binary bin file containing all the assorted information and the geometry data. One of the bits of data you feed the builder is an instruction as to where to look to find the “planetexture.dds” file.
I suspect you are probably not doing much wrong in Blender, your problem probably lies downstream in whatever you are doing to the X file to import into game.
I would suggest you try this to keep things simple
Dont use any diffuse colours, just map your entire model as a single UV texture map to a single dds image file.
Export using Blender to an X file, drop the X file and the dds file into the same folder then view model using 3DE or Deep Explorer. If you can see the texture, your problem lies downstream in the game engine. If you cant see the texture you have done something wrong in Blender. If this is the case, post your Blend file, X file and DDS texture somewhere and I will see if I can tell you what is wrong
PS if you are looking for a tutorial on uv textures, here is a link to a ton of excellent ones from neil hirsig. there are 5 tutorials on uvmapping. Click on the link to videos
have 2 windows open 3dview and UV image editor. with the object selected go into edit mode and hit “A” to select all verts, then in uv window hit “A” to select all verts again. Now the important bit, hit the browse image (2 triangles icon) and select your filename. Now when you are in 3d window show texture mode you will see the texture appear This should now work when you export and view in Deep explorer.
I noticed you had assigned a material in your example, this isnt wrong but interestingly you dont even need to do that to make it work, so for my example I removed it.
Oh well at least one step nearer solving it. I have no idea what the workflow/tools are that take the X file as the input for your Active Worlds game engine. Is it a proprietary tool, or some conversion software you have written ?
Hey there. I wanted to let you know that the render issues had to do with the name of the rendered file texture. It was named *.JPG and need to be *.jpg. This is an issue with Linux file systems. Our files are stored on Linux.
I hope you are gearing up for a great New Year. I was wondering if you could answer this as well. Am I to assume that the only way to render textures in a Direct X file export from Blender is to build that model with UV textures only? In other words, I can’t generate them internally using Blender own materials and textures. So, I need to UV map images etc. only. Am I getting that right?
Yes, the X file format can only export simple diffuse and specular colour information (assuming you are not using uv texture maps). If you want to do something fancy in Blender e.g. a procedural cloud type texture, you wont be able to export it out to an X file.