AB4D Forum

Full Version: Textures are Not Applying
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

When I am applying texture to specific Model3D from Model3d Group, its not displaying in the viewport. This is happening to very specific parts of the the models, whereas it working fine on other parts.

We have commercial license of Reader3ds, please let us know the issue.
Maybe some of your models have two sided materials - try to set the BackMaterial also (NOTE: This answer is based on some additional information that I got from users email)
We are still facing an issue, When we try to apply DiffuseMaterial with ImageBrush, its not applying on every, where as if we use SolidColorBrush its working. We tested using one image file, and apply the same image on all the Model3d, but some parts are showing the texture, some parts are not visibile after that. Below is the code to show the error.
'Reading Code[VB.NET]
Dim Ab4dReader As New Ab3d.Reader3ds
modelGroup = Ab4dReader.ReadFile(xFileStream)
Dim ModelVisual3d As New ModelVisual3D

'Applying ImageTexture to Specific Model3d
Dim imgSource As New ImageSource
imgSource = New BitmapImage(New Uri(TexturePath, UriKind.Relative))
xDiffuse.Brush = New ImageBrush(imgSource)

xModel3d.Material = xDiffuse
'Add Model3d to ModelVisual3d and show in viewport

Please find the attached Image, http://postimg.org/image/aj1xhsoiv/full/
First part shows, when we apply DiffuseMaterial.Brush=SolidColorBrush
Second part shows, when the same model is applied using DiffuseMaterial.Brush=ImageBrush
After additional conversation with user and checking the 3ds file, I have seen that the issue is caused by the fact that some of the objects do not have TextureCoordinates set - they are required to show a texture.