javascript - How to modify the transparency of Node?
学习ing
学习ing 2017-07-05 11:03:28
0
1
1023

Is there a way to set the transparency of the component? For example, if you modify the component material or add a transparent material, let the Viewer render it.

学习ing
学习ing

reply all(1)
Peter_Zhu

According to my experience, when Forge Viewer loads a model, it will help the model establish its surrounding layer (BVH). At this time, there will be an internal parameter used to calculate the transparency of the geometry fragment (fragment), and this parameter is for Ensure the rendering order of semi-transparent and fully transparent components. Generally, fully transparent components will be rendered first.

When we modify the component material transparency, this order will not be updated. This is because the Viewer will not rebuild the BVH after we fix it, so we see some opaque components being hidden. And my debugging experience shows that there is no way to rebuild BVH in Viewer, so this problem cannot be solved at present.

But here are some examples of modifying materials and transparency for your reference:

Autodesk.ADN.Viewing.Extension.Material

Forge Viewer Custom Shaders - Part 1

Forge Viewer Custom Shaders - Part 2

Custom transparent meshes with View & Data API

Hope this helps you

Reference source: https://stackoverflow.com/que...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!