07-23-2013, 08:06 AM
(This post was last modified: 07-23-2013, 08:08 AM by prashant1207.)
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
'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

