Texture Can't be seen after loading

Jan 23, 2013 at 2:31 PM
Edited Jan 23, 2013 at 2:35 PM


I have successfully displayed a 3ds file in my WPF scene. But, the material color is just black and no texture is applied on it. 


<h:FileModelVisual3D x:Name="model3D" >
                        <ScaleTransform3D ScaleY="5.0" ScaleX="3.0" ScaleZ="2.0"/>
                        <TranslateTransform3D OffsetX="0" OffsetY="3" OffsetZ="0"/>
How can I load the texture as well automatically? Thanks in a million.
Jan 23, 2013 at 7:21 PM

is the texture in .tga format? .tga is not supported. Change the images to .png, and the importer will replace .tga with .png in the file names when loading the textures...

Jan 25, 2013 at 6:53 AM

The texture format is jpg. So you're saying I just need to convert the image format into png?

Feb 4, 2013 at 2:15 PM
No, JPEG should be supported. Then I think the error is somewhere else. Can you debug the code? Check if the image is loaded correctly. Set a breakpoint on line 527 in StudioReader.cs
Jun 2, 2013 at 7:29 PM
I say sorry if i'm replying to a post a little bit old, ma my issue is nearly similar to this one.

My problem:
I'm reading all the .3ds and .obj file in the execution folder and loading them in a list where i can choose the one i want and show it in an HelixViewPort3D. All this part goes really well, the problem is with the texture. I don't see them at all :(
the way i'm loading the models:
FileModelVisual3D MyModel = new FileModelVisual3D();
MyModel.Source = MODELS[i];   //where MODELS[i] is a string containing the path of a model (i.e. .../.../ship.3ds)
this.view1.Children.Add(MyModel);   //where view1 is my HelixViewPort3D
I also read in this forum that i can use the StudioReader. Well, i tried, but i cannot figure out on how convert the Model3D from the reader into something Visual that i can then add as a children to my viewport.
I also tried to use a ModelVisual3D in the .xaml file, like in this sample http://helixtoolkit.codeplex.com/discussions/354077, binding its content to MyModel, but it doesn't work for me, for two reasons: first of all it does not load the .obj file; second one, when it loads a .3ds, in the viewport i cannot see nothing :(

pls help! :(

i just want to show or attach the texture to my model! :)

thanks so much for the library!
Jun 8, 2013 at 5:24 AM
Do you have lights in your scene?
I recommend setting a breakpoint on line 527 in StudioReader.cs, then you can check if the texture is loaded correctly!