# Circle/Ring Around Mouse Pointer using Custom Material on PBR Material (?)

**URL:** <https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102>\
**Category:** Questions\
**Tags:** blender, material\
**Created:** [April 18, 2021, 4:15pm UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102 "2021-04-18T16:15:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![VtuberFan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vtuberfan/32/11322_2.png) [@VtuberFan](https://forum.babylonjs.com/u/VtuberFan)\
**Post date:** [April 18, 2021, 4:15pm UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102/1 "2021-04-18T16:15:32Z")

</div>

Hi, I am currently trying to follow the steps of doing a circle around the mouse pointer.

I tried following the steps of this playground coming from a previous post. [https://playground.babylonjs.com/#8ZQVW1#4](https://playground.babylonjs.com/#8ZQVW1#4)

Now I just realized that my current mesh uses a PBR material (But the approach uses a standard material). What should I do to include the current material set with the circle around the mouse pointer? How can I translate a PBR material to StandardMaterial? I’ve also noticed that there is a PBRCustomMaterial, will it also be possible to use it to create the circle over mouse pointer?

Any help is greatly appreciated,  
Thank you

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 18, 2021, 6:52pm UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102/2 "2021-04-18T18:52:22Z")

</div>

Yes, you can use `PBRCustomMaterial` instead of `CustomMaterial`. The only thing to change in the shader is `color => finalColor`:

[https://playground.babylonjs.com/#8ZQVW1#10](https://playground.babylonjs.com/#8ZQVW1#10)

---

<div class="post-metadata">

**Author:** ![VtuberFan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vtuberfan/32/11322_2.png) [@VtuberFan](https://forum.babylonjs.com/u/VtuberFan)\
**Post date:** [April 19, 2021, 6:30am UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102/3 "2021-04-19T06:30:09Z")

</div>

> [@Evgeni\_Popov](#):
>
> finalColor

If I have a current pbr material, is it possible to send the values to the custom pbr material as well?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 19, 2021, 8:12am UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102/4 "2021-04-19T08:12:39Z")

</div>

What do you mean? The material can either be a `PBRMaterial` or a `CustomPBRMaterial` but not both at the same time.

---

<div class="post-metadata">

**Author:** ![VtuberFan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vtuberfan/32/11322_2.png) [@VtuberFan](https://forum.babylonjs.com/u/VtuberFan)\
**Post date:** [April 19, 2021, 12:06pm UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102/5 "2021-04-19T12:06:04Z")

</div>

To get the look and feel of the `PBRMaterial ` that has defined textures or settings already and send everything to the `CustomPBRMaterial `.

The `PBRMaterial` is coming from a .glb file and I’m using the `CustomPBRMaterial` to have the cursor but I want to copy the PBR Material and look like it wasn’t replaced with a new material

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 19, 2021, 1:29pm UTC](https://forum.babylonjs.com/t/circle-ring-around-mouse-pointer-using-custom-material-on-pbr-material/20102/6 "2021-04-19T13:29:48Z")

</div>

You will need to recreate the material as a `PBRCustomMaterial`.

You can do it like this in a generic way:

[https://playground.babylonjs.com#SAFX6T#7](https://playground.babylonjs.com#SAFX6T#7)
