如何在papervision3d中制作双面Collada模型
我有一个信封模块的动画 collada,它现在有一个打开自身的动画
,可以查看信封的两面,我设置了
oneSide = false
为测试添加的 ColorMaterial。
但我想要的是外面有一种颜色,里面有另一种颜色
,我不知道如何做到这一点。
i have an animated collada of envelope module that have an animation of opening itself
now for seeing both sides of the envelope i set the
oneSide = false
i added for tests a ColorMaterial.
but what i want is to have 1 color in the outside faces and another color in the inside faces
and i can't figure it out how to this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现了一个非常伟大的人开发的一些课程!解决这个问题:
这是页面上最后一篇文章的下载链接:
http://papervision3d.758870.n4.nabble.com/How-to-get-DoubleSidedCompositeMaterial-working-w-Latest-PV3D-td781516.html#a781518
直接链接:
http://papervision3d.758870.n4.nabble.com/file/n781518 /customPV3D.zip
i found some class that a very great men develop!!! that solove this:
here is a link to download it it the last post on the page:
http://papervision3d.758870.n4.nabble.com/How-to-get-DoubleSidedCompositeMaterial-working-w-Latest-PV3D-td781516.html#a781518
direct link:
http://papervision3d.758870.n4.nabble.com/file/n781518/customPV3D.zip
一个快速技巧是克隆信封模型,使其在 Z 轴上与原始模型相距 1 个单位,并设置背面材料。
查看此示例。
另一种方法是检查信封的法线指向的位置或使用它的旋转来确定它是否面向前,然后更新材质或其位图。
有关如何确定飞机是否面向“相机”的更多想法,请查看 这篇文章。它不是 papervision 特定的,但这些原理也可以应用于 papervision。
A quick trick would be to clone the envelope model, have it at 1 unit apart on the Z axis from the original and set the back material.
Have a look at this example.
Anther way would be to check where the envelope's normal is pointing or use it's rotation to determine if it's facing forward or not, then update the material, or it's bitmap.
For more ideas on how to find out if a plane is facing the 'camera' or not have a look at this post. It's not papervision specific, but the principles can be applied with papervision as well.