# PBR Shader Web SDK

**URL:** <https://forum.deepar.ai/t/pbr-shader-web-sdk/71>\
**Category:** Help & Questions\
**Tags:** effect-help\
**Created:** [September 6, 2022, 1:59pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71 "2022-09-06T13:59:09Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 6, 2022, 1:59pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/1 "2022-09-06T13:59:09Z")

</div>

Hi,  
Does anyone have a problem with the PBR Shader and the web SDK, I am trying to use the shoe try-on template and imported my own 3D Model with PBR shader and textures but it seems like there is a problem with the light or something, it’s always dark

> **[WhatsApp Image 2022-09-06 at 15.00.59.jpeg](https://drive.google.com/file/d/1Wa-7plBo0gH2d0FNp9KcYf6B5BiBJ-tE/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 6, 2022, 2:10pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/2 "2022-09-06T14:10:55Z")

</div>

Hi @Ehab_Ayman could please you share the project folder so we can have a look at this issue?

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 6, 2022, 2:47pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/3 "2022-09-06T14:47:24Z")

</div>

Yes Sure,

> **[VivoShoesDeepARStudio.deeparproj.rar](https://drive.google.com/file/d/1OwgScuGapV4RD2CSnw-2C7B7xqdhqmOw/view?usp=sharing)**
>
> Google Drive file.

You will find 2 materials the PBR which is placed now and gives weird lighting effect and the unlit one which is working fine  
Thanks,

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 6, 2022, 3:32pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/4 "2022-09-06T15:32:00Z")

</div>

Thank you we are looking into it. We’ll let you know here when we know more.

---

<div class="post-metadata">

**Author:** ![antonio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/antonio/32/57_2.png) [@antonio](https://forum.deepar.ai/u/antonio)\
**Post date:** [September 7, 2022, 8:24am UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/5 "2022-09-07T08:24:48Z")

</div>

Hi @Ehab_Ayman, can you please make sure that you import the shoe model with `Calculate Tangent Space` option enabled, since you’re using normal mapping.

 ![calculate_tangent_space](https://europe1.discourse-cdn.com/flex017/uploads/deepar/original/1X/580957e59d26ce93c019ba1965d1f9356dfafce6.png)

The reason we have this disabled by default is that it inflates the vertex count and the standard models (such as face, lips, eyes…) would not be recognized as such. In the future versions, we will address this issue and this option would be enabled by default when the user imports non-standard models. But for now, you should enable it manually.

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 7, 2022, 2:03pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/6 "2022-09-07T14:03:59Z")

</div>

Hi @antonio and @jelena ,  
Thanks for help, I think that solved most of the issues but still with the pbr shader there is a strange behaviour that the lighting on the shoes glitches when only one foot is there and gets fixed when you place the 2 feet anyways I’ve switched to standard shader and it’s great now but I will upload for you a version vith the pbr for the issue to look at.

Many Thanks,

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 7, 2022, 2:14pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/7 "2022-09-07T14:14:13Z")

</div>

@Ehab_Ayman please do send us the updated project when you can.  
We have also noticed that your ambient occlusion map is rather dark in most places, so you could also check if this is the behaviour you want by trying a different, or even completely white ambient occlusion map.

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 7, 2022, 2:38pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/8 "2022-09-07T14:38:13Z")

</div>

@jelena Great, I can’t upload the project to the forum now it gives me an error that new users can’t upload and that I’m flagged as violating the forum 😅

I’ve changed all black textures with empty white ones, but there is still a glitch that happens when only one foot is there and gets fixed when both feet are there.

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 7, 2022, 2:39pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/9 "2022-09-07T14:39:08Z")

</div>

Sorry about that, the forum is a bit new, we’ll sort that out in a moment

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 7, 2022, 2:45pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/10 "2022-09-07T14:45:34Z")

</div>

@jelena Great, Can you send me your email so we can communicate there  
 ![34](https://europe1.discourse-cdn.com/flex017/uploads/deepar/original/1X/a7bafa5080afae0b2b7af4cb7d1ab64dda6f40a6.png)

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 7, 2022, 2:46pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/11 "2022-09-07T14:46:33Z")

</div>

![3](https://europe1.discourse-cdn.com/flex017/uploads/deepar/original/1X/35fc728ab18e0745a38e9613946fc6ee32691346.png)

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 7, 2022, 2:50pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/12 "2022-09-07T14:50:52Z")

</div>

Can you try posting the drive link again please?

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 7, 2022, 2:53pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/13 "2022-09-07T14:53:31Z")

</div>

Yes Sure,

> **[VivoShoesDeepARStudio\_7\_9\_22.zip](https://drive.google.com/file/d/10G8CnJokVi5tAOm7a_S_y2indCW_IEH0/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 7, 2022, 2:56pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/14 "2022-09-07T14:56:06Z")

</div>

Thank you. Our apologies, the auto moderation was a bit overzealous 😅

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 7, 2022, 3:00pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/15 "2022-09-07T15:00:25Z")

</div>

No worries yeah, it’s a bit harsh auto-moderated 😂 😂

---

<div class="post-metadata">

**Author:** ![antonio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/antonio/32/57_2.png) [@antonio](https://forum.deepar.ai/u/antonio)\
**Post date:** [September 12, 2022, 1:59pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/16 "2022-09-12T13:59:39Z")

</div>

Hi @Ehab_Ayman, thank you for reporting, this indeed is a bug. It will be fixed within the next DeepAR SDK release. As a temporary workaround could you try to duplicate the material used on the other shoe to make sure that the shoes use different materials from each-other.

Reason why this bug happens is because the DeepAR SDK caches model normal matrices per material basis instead of per node basis. This is easily fixable and we will get right on it.

Thank you so much for helping us make DeepAR SDK and Studio better.

---

<div class="post-metadata">

**Author:** ![Ehab\_Ayman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/ehab_ayman/32/118_2.png) [@Ehab\_Ayman](https://forum.deepar.ai/u/Ehab_Ayman)\
**Post date:** [September 12, 2022, 2:50pm UTC](https://forum.deepar.ai/t/pbr-shader-web-sdk/71/17 "2022-09-12T14:50:40Z")

</div>

Hi @antonio, You’re welcome 🙂 and thanks for the workaround! can’t wait for the next release 🙏
