3ds Model'ss UVs Load Wrong

Mar 13, 2013 at 5:42 PM
Edited Mar 14, 2013 at 8:15 AM
Hi, I'm trying to load a 3ds model that I exported out of Blender and everything goes fine but the texture looks wrong. Each face should have its own colour.

This is the code I use to load the model and assign the texture:
 _currentModel = ModelImporter.Load("../../Models/planetCube.3ds");
 Model3DGroup modelGroup = (Model3DGroup)_currentModel;

GeometryModel3D model = (GeometryModel3D)modelGroup.Children[0];

var texture = new ImageBrush();
texture.ImageSource = new BitmapImage(new Uri(@"../../Textures/uvTest2.png", UriKind.Relative));
            model.Material = new DiffuseMaterial(texture);
Here are the files:
Mar 16, 2013 at 7:22 AM
Solved it thanks to this article on stackoverflow: Why does TextureCoordinates work as expected for a Viewport2DVisual3D, but not for a GeometryModel3D?

Just set ViewportUnits on the ImageBrush to Absolute! :)
Mar 17, 2013 at 8:50 PM
I had a quick look at your model files - it seems like there is no texture defined in the .3ds file?
The StudioReader class already sets the ViewportUnits to Absolute, so I don't think any change is necessary in this library.