使3D模型透明 [英] Make a 3D model transparent

查看:78
本文介绍了使3D模型透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使特定的3D模型透明?就像更改模型材料的不透明度一样简单吗?

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

我尝试了以下操作:

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?

推荐答案

尝试

        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));

为我工作

这篇关于使3D模型透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆