Darius
November 23, 2023, 8:14am
1
Hello everyone,
I’ve imported a glass material from blender. I can see the skybox and the ground material through the glass;
But the sprites are not showing through that glass.
Anyone got a solution for me? Thanks for your help.
(I can’t import my custom glass into the playground, so here is 2 images)
Looking through the glass:
Looking from outside the glass:
Cedric
November 23, 2023, 8:46am
2
I guess sprite are rendered after the glass rendering group and discarded.
Is it possible to fix it with rendering group @Evgeni_Popov ?
Darius
November 23, 2023, 9:10am
3
I tried to render sprites after importing the mesh (no result).
Then tried to render imported mesh before rendering sprites (no result too).
I think you are using the glTF transmission extension?
We don’t generate sprites in the refraction RTT. You can enable the generation like this:
See lines 31-33.
Sprites not enabled:
Sprites enabled:
I will create a PR shortly to enable it automatically.
2 Likes
Darius
November 23, 2023, 1:21pm
5
Thank you very much, it works.
But:
It drops my FPS by 16 (I was at 48 even when everything is displayed, now I’m at 32).
Undertand why?
Darius
November 23, 2023, 1:25pm
6
And for those who face same thing, call lines 31-33 of Evgeni_Popov playground after rendering GLTF file, or your scene wont have “_transmissionHelper” defined.
Now the sprites are rendered in the texture, so it seems you have quite a number if the fps dropped so much!
Try to look at the stats in the inspector, with and without the fix, to see where the time is spent.
The PR is ready:
BabylonJS:master
← Popov72:fix-gltf-transmission-sprites
opened 02:18PM - 23 Nov 23 UTC
See https://forum.babylonjs.com/t/sprite-not-showing-behind-a-glass-material/458… 74/4
2 Likes
Darius
November 23, 2023, 2:41pm
8
I see what is dropping my fps, it’s the Sprites. I’ll try to some solutions.
Thanks for your help.