AB4D Forum
Textures are Not Applying - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Viewer3ds and Ab3d.Reader3ds (https://forum.ab4d.com/forumdisplay.php?fid=5)
+--- Thread: Textures are Not Applying (/showthread.php?tid=3906)



Textures are Not Applying - prashant1207 - 07-18-2013

Hi,

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.


RE: Textures are Not Applying - abenedik - 07-18-2013

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)


RE: Textures are Not Applying - prashant1207 - 07-23-2013

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
ModelVisual3d.content=modelGroup
viewport.children.add(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


RE: Textures are Not Applying - abenedik - 07-23-2013

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.