Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a 3D model transparent

How can I make a specific 3d model transparent? Is it as simple as changing the opacity of the model's material?

I tried the following:

SolidColorBrush br = (SolidColorBrush)matDif.Brush; //matDif = DiffuseMaterial
br.Opacity = 0.3;

When it tries setting the opacity it says that it is in a read-only state and cannot be changed?

like image 604
8 revs, 2 users 94% Avatar asked Oct 17 '25 10:10

8 revs, 2 users 94%


1 Answers

Try

        Color c = new Color();
        c.A = 128;
        c.R = Colors.PeachPuff.R;
        c.G = Colors.PeachPuff.G;
        c.B = Colors.PeachPuff.B;
        Material Material = new DiffuseMaterial(new SolidColorBrush(c));

works for me

like image 75
Paul Rivera Avatar answered Oct 19 '25 12:10

Paul Rivera