# Undesired sunspot on model in space from sun

**URL:** <https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683>\
**Category:** CesiumJS\
**Created:** [May 21, 2020, 7:30pm UTC](https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683 "2020-05-21T19:30:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![beavelar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/beavelar/32/4308_2.png) [@beavelar](https://community.cesium.com/u/beavelar)\
**Post date:** [May 21, 2020, 7:30pm UTC](https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683/1 "2020-05-21T19:30:57Z")

</div>

Hello,

This issue is the same as #8738 on GitHub ([https://github.com/CesiumGS/cesium/issues/8738](https://github.com/CesiumGS/cesium/issues/8738))

After playing with the sand castle for a little bit it seems that models near the earth aren’t affected by this issue but once placed in space this sun spot issue occurs.

Attached will be an image depicted the issue using the Cesium sandcastle.

Thanks,  
Brian

 ![baloon](https://global.discourse-cdn.com/cesium/original/2X/a/a3217633413914efb5c00c50ccb6387c39913dee.jpeg)

---

<div class="post-metadata">

**Author:** ![devondespain](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/devondespain/32/1987_2.png) [@devondespain](https://community.cesium.com/u/devondespain)\
**Post date:** [May 21, 2020, 7:38pm UTC](https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683/2 "2020-05-21T19:38:23Z")

</div>

I have the same issue, using the latest Cesium.  
I think it has something to do with the reflectivity of a model. For instance my model is very reflective. You can see that it has the spot on the side the sun isn’t pointing from more so than the balloon. However on the balloon one it looks like it is only occuring on the inside of the balloon which could be more reflective. My other theory is that the sunlight is somehow reflecting off of the camera? Anybody have any ideas?

 ![sunspot](https://global.discourse-cdn.com/cesium/original/2X/4/4ad8ce0da520aac5a0509672ffa920e818494f86.jpeg)

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [May 22, 2020, 1:46am UTC](https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683/3 "2020-05-22T01:46:40Z")

</div>

What kind of material is on your glTF/how did you create this glTF?

This is where CesiumJS constructs its physically based material shader, you can see where it computes the sun direction here: [https://github.com/CesiumGS/cesium/blob/c9dd6f65a452048afa61085a2c3d334a0e50716a/Source/Scene/processPbrMaterials.js#L873-L886](https://github.com/CesiumGS/cesium/blob/c9dd6f65a452048afa61085a2c3d334a0e50716a/Source/Scene/processPbrMaterials.js#L873-L886)

This is where I’d start looking into to debug this.

---

<div class="post-metadata">

**Author:** ![beavelar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/beavelar/32/4308_2.png) [@beavelar](https://community.cesium.com/u/beavelar)\
**Post date:** [May 22, 2020, 2:23pm UTC](https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683/4 "2020-05-22T14:23:38Z")

</div>

Hey Omar,

Thanks for the reply. The Hot Air Balloon glTF is the glTF that came with the sand castle example ([https://sandcastle.cesium.com/index.html?src=Lighting.html](https://sandcastle.cesium.com/index.html?src=Lighting.html)).

I’ll look into the process and debug from there.

Thanks,  
Brian

---

<div class="post-metadata">

**Author:** ![devondespain](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/devondespain/32/1987_2.png) [@devondespain](https://community.cesium.com/u/devondespain)\
**Post date:** [May 22, 2020, 3:48pm UTC](https://community.cesium.com/t/undesired-sunspot-on-model-in-space-from-sun/9683/5 "2020-05-22T15:48:27Z")

</div>

Omar, I didn’t create this model which is apart of a bigger model through Maya and exported it as a glb. I have looked into the materials and this is what it looks like from a gltf view:  
“materials”: [

```
{

  "pbrMetallicRoughness": {

    "baseColorFactor": [

      1,

      1,

      1,

      1

    ],

    "baseColorTexture": {

      "index": 1,

      "texCoord": 0

    },

    "metallicFactor": 1,

    "roughnessFactor": 0.33,

    "metallicRoughnessTexture": {

      "index": 2,

      "texCoord": 0

    }

  },

  "normalTexture": {

    "index": 0,

    "texCoord": 0

  },

  "emissiveFactor": [

    0,

    0,

    0

  ],

  "alphaMode": "OPAQUE",

  "name": "ShdwTest_text"

}

```

],
