如何在 Autodesk forge 中为背景添加自定义环境贴图? [英] How to add custom environment map for background in autodesk forge?

查看:32
本文介绍了如何在 Autodesk forge 中为背景添加自定义环境贴图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为背景添加环境贴图,我尝试过 viewer.setLightPreset(value) ,但我不喜欢默认贴图.我需要为背景添加自定义环境贴图.我了解了 为视图添加自定义灯光和数据 API 查看器,并在我的查看器中添加了此代码

I want to add environment map for background,I have tried viewer.setLightPreset(value) ,but I don't like the default map.I need to add custom environment map for background.I learned about Add Custom Light for the View and Data API Viewer,and added this code in my viewer

 Autodesk.Viewing.Private.LightPresets.push({
      name: "selfEvn",
      path:"selfEvn",
      type:"logluv",
      tonemap:1,
      E_bias: -2.0,
      directLightColor: [0, 0.84, 0.67],
      ambientColor: [0.8, 0.9, 1],
      lightMultiplier: 0.1,
      bgColorGradient: [230, 230, 230, 150, 150, 150],
      darkerFade: !1
 });

 viewer3D.setLightPreset(Autodesk.Viewing.Private.LightPresets.length - 1);

Forge的文件是用dds后缀的文件.我把dds后缀的文件宽度做成NVIDIA Texture Tools for Adob​​e Photoshop,放在这个路径下:resenvironments.但是viewer不能使用我的文件.我打开了路径下的默认文件:resenvironments,它们看起来像这样默认文件.不知道是我的方法不对还是我的文件不对我的文件就像图片一样,但它们的后缀是DDS.我的模型是由 Revit 创建的

Forge's file is used with the dds suffix file.I made the dds suffix file width NVIDIA Texture Tools for Adobe Photoshop,and put it under this path: resenvironments.But viewer can't use my file.I opened the defaulet files under the path: resenvironments,they are just look like this Default files.I don't know if my method is wrong or my files are wrong My files are just like images,but their suffix is DDS. And my model was created by Revit

推荐答案

与开发团队核实后,没有可用于转换和设置来自 Revit 和 Model Derivative 的模型的用户拥有的背景图像(环境图)的 API目前翻译.自定义背景图像功能仅适用于 Autodesk Fusion 360 模型,但从 Fusion 模型转换图像存在一个已知问题,目前开发团队正在调查该问题.对于造成的任何不便,我们深表歉意.

After checking with the dev team, there is no API available for converting and setting user owned background image (Environment map) for models from the Revit and the Model Derivative translation currently. Custom background image feature is only available for models of the Autodesk Fusion 360, but there is a known issue for image translating from the Fusion model which is investigated by the dev team now. We apologize for any inconvenience caused.

此外,我们无法确保这些私有 API 的确定性和稳定性.私有 API 仅供 Froge Viewer 内部使用.因此,不建议像您这样的合作伙伴开发人员使用 Autodesk.Viewing.Private 命名空间下的这些 API.

In addition, we cannot ensure the certainties and the stabilities of those private APIs. Private APIs are only for the internal usage of the Froge Viewer. Therefore, it's not recommended to use those APIs under the Autodesk.Viewing.Private namespace to partner developers like you.

但是,我们可以将此请求记录在我们的内部系统中,以便开发团队分配时间进行调查.也许有一天它会实现,但我们不知道什么时候会实现.所以,没有任何承诺.希望你能理解.

However, we can log this request in our internal system for the dev team to allocate time to investigate. Maybe it will come true someday, but we have no idea when it will be. So, there is no any promise for it. Hope you will understand.

这篇关于如何在 Autodesk forge 中为背景添加自定义环境贴图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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