Double triangles after Version update

After updating greater than V0.128.0, I’ve got double amount of triangles and also performance issues.
The fps was halved. Actually I used the version 0.137.4.

I’ve comared the render information about my scene between the 0.128.0 vs 0.137.4 (It’s the same for all Versions greater than 0.128.0)

Test Model (Blender Information):
Verts, 40331, Faces 24.854, Trias: 24.854, Objects 140

ThreeJs (Render Info)

V0.128.0

  1. programs: Array(4)

  2. 0: WebGLProgram {name: ‘MeshDepthMaterial’, …

  3. 1: WebGLProgram {name: ‘MeshStandardMaterial’, …

  4. 2: WebGLProgram {name: ‘MeshStandardMaterial’, …

  5. 3: WebGLProgram {name: ‘MeshPhysicalMaterial’, …

  6. render:

  7. calls: 154

  8. frame: 404

  9. lines: 0

  10. points: 0

  11. triangles: 24854

V0.137.4

  1. programs: Array(6)

  2. 0: WebGLProgram {name: ‘MeshDepthMaterial’,…

  3. 1: WebGLProgram {name: ‘MeshStandardMaterial’,…

  4. 2: WebGLProgram {name: ‘MeshStandardMaterial’, …

  5. 3: WebGLProgram {name: ‘MeshStandardMaterial’, …

  6. 4: WebGLProgram {name: ‘MeshStandardMaterial’, …

  7. 5: WebGLProgram {name: ‘MeshPhysicalMaterial’, …

  8. render:

  9. calls: 307

  10. frame: 484

  11. lines: 0

  12. points: 0

  13. triangles: 49662

The triangles has almost doubled from 24854 to 49662.
The problem exist, if the model has a lot of single objects.

Does anyone have an idea?

model_info.pdf (600.1 KB)

Thanks a lot

Usually two draws is then side: doublesided and transparent:true;
Need codepen, fiddle, etc.

Since r130 transparent, double-sided materials are rendered with two draw calls for better rendering quality. However, this effectively increased the number of rendered triangles.

1 Like

Thank you for your fast answer.
I read the post “WebGLRenderer: Render transparent doublesided in two calls”
But I guess, actualy no solution is right there. No switch to turn off the behaviour.

on water or window glass or simple on planes this does not have any visual benefits, not sure how this could be solved, ideal solution would be detect plane geometry and disable two call render or maybe only on the GLTFLoader ?

There is though, see in the thread above - it still works for me.

1 Like

Thank you again.
The hack doesn’t work for me.
Now, what I’ve analyzed, the Problem occurs if the material is defined as MeshPhysicalMaterial and the propertie node.material.transmission is greater than 0.
If I set the value to 0 than I’ve no double triangles.

Rendering transmissive objects requires a separate render pass and is thus an expensive option of MeshPhysicalMaterial.

I see, but the doubleing effect of polygon count are since version r129. At version r128 it’s fine.
And altough, the MeshPhysicalMaterial is assigned only to a few polygons, it seems that all polygons of the whole model was doubled.

With r129, the transmission implementation of MeshPhysicalMaterial was reworked. The separate render pass was introduced with this release.

All opaque objects have to be rendered two times when using transmission. That should explain the higher number of rendered triangles.

1 Like