Feb 24, 2011 at 5:55 PM
Edited Feb 24, 2011 at 6:27 PM
Disclaimer: First time user of Helix and complete 3D nubcake.
I am trying to load and display 3d models from a game called League of Legends. The models are stored as .skn files and the materials as .dds files. I found two tools that help me conver these to a .obj and a .jpg file.
After converting I can add them to a Expression Bled project and drop the .obj file in my workspace. I can then alter the create DiffuseMaterial to use a ImageBrush and get this result:
Now I am trying to do the same using Helix using this simple method which loads and parses the .obj file and changes the Diffusematerial to use an ImageBrush with the .jpg file:
private Model3D LoadFile(string objPath, string jpgPath)
BitmapImage bmp = new BitmapImage();
bmp.UriSource = new Uri(jpgPath, UriKind.Relative);
Model3DGroup group = ModelImporter.Load(objPath);
GeometryModel3D model = group.Children as GeometryModel3D;
MaterialGroup materialGroup = model.Material as MaterialGroup;
DiffuseMaterial material = materialGroup.Children as DiffuseMaterial;
material.Brush = new ImageBrush(bmp);
However, this produces this result (face-sword?):
What do I need to do to fix this?
Here are my source files (copyright League of Legends blah blah!)