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'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: res\environments.But viewer can't use my file.I opened the defaulet files under the path: res\environments,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