What does “DELETE PREFILTERED DATA” do,or is there any API corresponding

I find that before I click this button,my ground model’effect is different from after I clicked this button,I want to know what does “DELETE PREFILTERED DATA” do,or is there any API corresponding,please.

button is here:

Hi @fengyu

Generate/Delete prefiltered data prepares your skybox to be used for image based lighting in your scene. When you delete this data PBR lighting is disabled in your scene, hence the difference you scene.

Study this manual page for more information:


1 Like

One last question:
I do not want to use prefiltered data in my project with engin,because it makes it different with my other project with Editor,which dose not use it.so,if I want to delete prefiltered data,I do not know how to do,I have read manual,but I did not find a way, could you tell me,thank you.

Pressing the Delete Prefiltered Data button, as shown in your screengrab, will remove it from your cubemap.

Maybe I didn’t describe it clearly,I have generated prefiltered data in my old project named OldProject which is with Editor to use .dds files in my new project named NewProject which is without Editor.and my new project’skybox goes well.After I click button named PREFILTER CUBEMAP, my OldProject’s ground model and NewProject’s ground model are both different here it is:

before I click, it was normal,here it is and this is what I want:

If I click the button named DELETE PREFILTERED DATA,OldProject’ground is normal,so,what should I do in my NewProject(I know I should delete prefilter data,but I do not know how to code),could you help me,thank you.

I see, but I am confused, you say:

Your new project is using the engine directly, how do you press that button there since you aren’t with the editor?

Can’t you use the original image files you imported for the first time in your old project? Those image files don’t hold any prefilter information, so it should work as expected in your engine project only.

1 Like

You has this confused: how do I press that button there since you aren’t with the editor?
I pressed this button in my OldProject to generate the .dds files,then I use it in my NewProject(yes,my NewProject is using the engine directly)

The problem is happend on I pressed button in my OldProject,and this problem is also happend in my NewProject,so I know it is why ,but I do not know how to code it in my NewProject

When I click button named PREFILTER CUBEMAP,the problem is happend,but when I click the button named DELETE PREFILTERED DATA,the problem is gone

Your new project is using the engine exclusively? How do you load the cubemap and what files are you using for it?

Here is my code:

/****************                       天空盒                     *****************/
        var cubemapAsset = new pc.Asset('New Cubemap.dds', 'cubemap', {
            url: "../FYPlaycanvas/Cubemap/32569764/New Cubemap.dds"
        }, {
            // "minFilter": 5,
            // "magFilter": 1,
            // "anisotropy": 1,
            // "deletePrefilteredData": "New Cubemap.dds",
            "textures": [
                // left right top bottom front back
        cubemapAsset.on('load', function () {
            app.scene.ambientLight = (0.2, 0.2, 0.2);
            app.scene.skyboxIntensity = 0.18; // 0.18
            app.scene.exposure = 8; // 8
            app.scene.fog = pc.FOG_NONE;
            app.scene.lightmapSizeMultiplier = 16;
            app.scene.lightmapMode = pc.BAKE_COLORDIR;

            app.scene.gammaCorrection = pc.GAMMA_SRGB; // 这个加上天空盒就正常了
            app.scene.toneMapping = pc.TONEMAP_FILMIC;
            app.scene.skyboxMip = 0; // Set the skybox to the 128x128 cubemap mipmap level

            // Set the canvas to fill the window and automatically change resolution to be the same as the canvas size
            // app.setCanvasResolution(pc.RESOLUTION_AUTO,1280,720);

            // for (var i = 0; i < 7; i++) {
            //     if (i == 0) {
            //         cubemapAsset.resources[i].type = 'rgbm';
            //     } else {
            //         cubemapAsset.resources[i].type = 'default';
            // type:pc.TEXTURETYPE_RGBE
            // type: pc.TEXTURETYPE_DEFAULT,
            //     }
            // }
            // app.scene.skyboxPrefiltered = [null, null, null, null, null, null];
        cubemapAsset.loadFaces = true;

Thanks, there are some quirks right now with loading a cubemap using the engine only. I see you have in your code commented out the solution for setting the first asset type to rgbm only, from this post:

It seems you have the same issue, if you are unable to fix that in that way, try posting on that thread and submit an issue in the engine repo about it. Eventually we need a better way to handle this in engine.

1 Like

Thank you very much.you are so nice.