# I still don't understand how reflection probes could help reflecting all the scene

**URL:** <https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032>\
**Category:** Questions\
**Created:** [May 7, 2019, 2:47pm UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032 "2019-05-07T14:47:14Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![christopheC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/christophec/32/19780_2.png) [@christopheC](https://forum.babylonjs.com/u/christopheC)\
**Post date:** [December 14, 2021, 9:10am UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/21 "2021-12-14T09:10:19Z")

</div>

Hi @carolhmj,

thanks for checking on me 🙂 I unfortunately got sidetracked by other parts of my projects and didn’t get a chance to look at this thoroughly but to be honest I don’t really know where to start from so I would absolutely love some help!

Is this something you’ve done before? any pointers would be very welcome.

Thanks again.

Chris

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [December 14, 2021, 2:41pm UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/22 "2021-12-14T14:41:09Z")

</div>

Haven’t done it before (well, only reflections in ray tracing which is easier) but there’s always a first time! 🤣 I’m trying to tinker with @Vinc3r 's idea of cloning the texture, but instead of using .`clone()`, trying to copy the texture pixels so we don’t get the framebuffer loop:

[Testing reflection probes | Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#K030U0#25)

It’s not working yet, I think instead of just calling `scene.render()` just once like I’m doing, this process will need to be repeated on each frame, or we need some other way to guarantee the reflection probe will only run when the rest of the scene is ready.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [December 14, 2021, 2:57pm UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/23 "2021-12-14T14:57:42Z")

</div>

Ooop ooop that wasn’t it! I just set `generateMipmaps` to false on the probe and it worked! 😮

[Testing reflection probes | Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#K030U0#27)

EDIT: oh shoot, still the feedback loop message ☹

EDIT2: Third try! I feel this one is cheaty but… It doesn’t result in a loop and might be better performance wise if there are fewer reflective objects? I created a copy of the object we want to apply the probe on and also render, but with the reflection texture not applied to it. So the probe renders the non reflective version, and I apply the probe to the reflective one:  
[Testing reflection probes | Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#K030U0#31)

First I was “hiding” the non reflective version from the final scene by making it a bit smaller than the reflective, so that it was hidden inside, but layer masks also seem to work!

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/7/77992a1932d4cc7587f086f2b1b80e8ba80405d0.png)

If you pay attention you can see it isn’t the same reflection, but it’s an ok approximation if you don’t need anything very detailed.

---

<div class="post-metadata">

**Author:** ![christopheC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/christophec/32/19780_2.png) [@christopheC](https://forum.babylonjs.com/u/christopheC)\
**Post date:** [December 15, 2021, 11:50am UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/24 "2021-12-15T11:50:46Z")

</div>

Thanks so much for spending time on this @carolhmj! This could work really well for me!

Correct me if I’m wrong but it does mean that I have to double up any object and materials that will use that reflection probe, right?

Chris

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [December 15, 2021, 2:08pm UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/25 "2021-12-15T14:08:18Z")

</div>

> [@christopheC](#):
>
> Correct me if I’m wrong but it does mean that I have to double up any object and materials that will use that reflection probe, right?

That’s correct! I was tinkering with a way to optimize it (I’m finding this really fun 🤣 ), and one option could be to use a simplified version of the mesh for the reflection. I built this veeery ugly one from spheres and cubes:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/3/f32d68d2e4c88432eac1def06d59bdafcfd8c583.png)  
Placed it along our proper Suzanne:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/b/bb978ffffa7722eceffa1d1d5584144dc3281cdd.png)  
Aaaand ran the reflection probe again:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/2/729983dcda58a8da285ce760bd17dc227ab68614.png)

At that distance, it’s pretty hard to distinguish the reflections with the original and simplified meshes, and even more if the reflective material has a bit of bump/roughness, which would distort/blur the reflection:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/d/cdf26cc7e79bd220b2b2999c3e3e5af567adda81.jpeg)

Updated version with these experiments: [Testing reflection probes | Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#K030U0#32) 😃

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [December 15, 2021, 3:58pm UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/26 "2021-12-15T15:58:32Z")

</div>

I’m playing to Mafia 3 these days, and I’ve noticed it seems they’re disabling a lot of render properties for the rear-view mirror. Maybe they’re doing a kind of trick like you do: using a ghost scene for this mirror plane. (I, until now, don’t payed attention about details in the cubemaps used for the car body, 'will check next time I’ll launch the game)

![a](https://i.imgur.com/ec4ShLU.jpg)

---

<div class="post-metadata">

**Author:** ![jelster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jelster/32/25881_2.png) [@jelster](https://forum.babylonjs.com/u/jelster)\
**Post date:** [December 15, 2021, 4:03pm UTC](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032/27 "2021-12-15T16:03:37Z")

</div>

Maybe they’re using a lower LOD for the meshes rendered in the Rear view mirror there? Would obviate need for a ghost scene I’d think…

[Previous page](https://forum.babylonjs.com/t/i-still-dont-understand-how-reflection-probes-could-help-reflecting-all-the-scene/3032.md?page=1)
