Help with ImageBrush
#3
I have successfully drawn a Model3DFactory.CreateCylinder using an imagebrush using the 'siteoforigin' method for sourcing the image file and it draws the cylinder painted with the image exactly as I expected.

However, when I use the exact same code with the Mesh3DFactory.CreateExtrudedMeshGeometry method, I no longer see my extruded geometry. My code:
Code:
private Model3D DrawSegment()
        {
            GeometryModel3D gm = new GeometryModel3D();
            ImageBrush colors_brush = new ImageBrush();
            colors_brush.ImageSource = new BitmapImage(new Uri("pack://siteoforigin:,,,/images/image.jpg", UriKind.RelativeOrAbsolute));
            DiffuseMaterial material = new DiffuseMaterial(colors_brush);
            gm.Material = material;
            gm.Geometry = Mesh3DFactory.CreateExtrudedMeshGeometry(_points, isSmooth, modelOffset, extrudeVector, shapeYVector);
            return gm;
        }

If I use a DiffuseMaterial with a solid color, everything draws correctly. Is it possible that ExtrudedMeshGeometry doesn't support an image brush or do I have a syntax error?
  


Messages In This Thread
Help with ImageBrush - by lloyd32552 - 05-03-2016, 12:47 AM
RE: Help with ImageBrush - by abenedik - 05-07-2016, 08:13 PM
RE: Help with ImageBrush - by lloyd32552 - 05-09-2016, 04:12 PM
RE: Help with ImageBrush - by abenedik - 05-23-2016, 07:10 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)