# Sunlight Hours / Solar Radiation analysis on non-planar surface

**URL:** <https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614>\
**Category:** ladybug-legacy\
**Tags:** sunlighthours, radiation, solar-access\
**Created:** [May 5, 2020, 9:02pm UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614 "2020-05-05T21:02:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeshakhanna](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/e/ea666f/32.png) [@eeshakhanna](https://discourse.ladybug.tools/u/eeshakhanna)\
**Post date:** [May 5, 2020, 9:02pm UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/1 "2020-05-05T21:02:01Z")

</div>

Hi all,

I am trying to run a sunlight hours analysis on a non-planar surface (representing topography) but I am getting strange results with patches of black (= no sunlight hours) in random areas. Does anyone have tips for what the best way to input a non-planar analysis surface is? Thank you

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/2/7/2773e130e968b7d44b4cc0a3064409031aaf6c9f.png)

---

<div class="post-metadata">

**Author:** ![AbrahamYezioro](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/abrahamyezioro/32/3_2.png) [@AbrahamYezioro](https://discourse.ladybug.tools/u/AbrahamYezioro)\
**Post date:** [May 5, 2020, 9:29pm UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/2 "2020-05-05T21:29:03Z")

</div>

Are you sure the normal is pointing to the right direction?  
-A.

---

<div class="post-metadata">

**Author:** ![minggangyin](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/minggangyin/32/216_2.png) [@minggangyin](https://discourse.ladybug.tools/u/minggangyin)\
**Post date:** [May 6, 2020, 12:53am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/3 "2020-05-06T00:53:26Z")

</div>

@eeshakhanna Please the normal direction and the grid size of the surface.

---

<div class="post-metadata">

**Author:** ![amjacobson](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/amjacobson/32/11203_2.png) [@amjacobson](https://discourse.ladybug.tools/u/amjacobson)\
**Post date:** [May 8, 2020, 5:59am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/4 "2020-05-08T05:59:53Z")

</div>

As abraham mentions above, check the face direction to be sure the points are offset from the mesh in the correct direction.

Then! Try increasing the offset distance. I often receive similar errors when the offset distance is either 1. near the tolerance of the model, or 2. Smaller than the chord length of the mesh that is generated from 3D nurbs topo surfaces.

---

<div class="post-metadata">

**Author:** ![minggangyin](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/minggangyin/32/216_2.png) [@minggangyin](https://discourse.ladybug.tools/u/minggangyin)\
**Post date:** [May 8, 2020, 6:17am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/5 "2020-05-08T06:17:49Z")

</div>

Hi,@amjacobson Could you upload the rhino 3d model and the grasshopper file for further discussion.

---

<div class="post-metadata">

**Author:** ![amjacobson](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/amjacobson/32/11203_2.png) [@amjacobson](https://discourse.ladybug.tools/u/amjacobson)\
**Post date:** [May 8, 2020, 7:05am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/6 "2020-05-08T07:05:19Z")

</div>

@minggangyin, sure. See the attached files. The problem arises because there is an input nurbs surface that is more complex than the mesh which is actually being analyzed. Here is the input surface:

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/5/b/5b1d6f322913612be6d443dfc44093eaa96769b1.jpeg)

Here are a couple of screenshots to show it too. In the first case, the offset distance (\_disFromBase input) is too small.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/4/9/49af7565baa324ebba07c67a96a6c39e803de258.png)

In the second case, the offset distance is large enough so that all the points are actually above the surface:

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/9/6/96420976a89103bb8799113af8032bd3338c9ce8.png) [200508\_test.3dm](https://discourse.ladybug.tools/uploads/short-url/2pfpoJ22fkEuPLRmuyzGZnc92nH.3dm) (246.7 KB) [200508\_test.gh](https://discourse.ladybug.tools/uploads/short-url/xWZLQSjmeATtfG2GUmYdgZLqyBN.gh) (439.2 KB)

---

<div class="post-metadata">

**Author:** ![minggangyin](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/minggangyin/32/216_2.png) [@minggangyin](https://discourse.ladybug.tools/u/minggangyin)\
**Post date:** [May 8, 2020, 8:04am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/7 "2020-05-08T08:04:03Z")

</div>

Hi @amjacobson Here is the new result. I modified some setting of your grasshooper file. The direction of the surface is right. The reason of this wierd result is about that the grid is big and the perid is too short.  
Here is the right result and the fixed grasshopper file.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/f/1/f143e8fb5d5ef3e4742e736dbeb6f342f70aab99.png)  
[200508\_test-fix.gh](https://discourse.ladybug.tools/uploads/short-url/kBti1btuZtBlkocn6rcPhLNneI2.gh) (438.4 KB)

---

<div class="post-metadata">

**Author:** ![amjacobson](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/amjacobson/32/11203_2.png) [@amjacobson](https://discourse.ladybug.tools/u/amjacobson)\
**Post date:** [May 10, 2020, 8:34am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/8 "2020-05-10T08:34:07Z")

</div>

@minggangyin, Thanks, but I posted the file to help explain the problem to @eeshakhanna.

Hope @eeshakhanna found this all helpful though!

---

<div class="post-metadata">

**Author:** ![eeshakhanna](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/e/ea666f/32.png) [@eeshakhanna](https://discourse.ladybug.tools/u/eeshakhanna)\
**Post date:** [May 10, 2020, 2:20pm UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/9 "2020-05-10T14:20:05Z")

</div>

Thank you @amjacobson @minggangyin, that was very helpful.  
Increasing the distance from base fixed the results for me. My model is in Feet but I was using a distance from base value for meters, which is why it was too small.

---

<div class="post-metadata">

**Author:** ![Phil](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@Phil](https://discourse.ladybug.tools/u/Phil)\
**Post date:** [April 7, 2021, 9:31am UTC](https://discourse.ladybug.tools/t/sunlight-hours-solar-radiation-analysis-on-non-planar-surface/9614/10 "2021-04-07T09:31:30Z")

</div>

I have similar issue with the ladybug v1.1.0.  
I already checked the face direction and seems everything fine.  
I tried everything to rebuild the mesh as mesh or brep, to reduce it, to flip faces/surfaces.

Anyone knows how to fix that issue while keeping an regular analysis grid?

 ![grafik](https://discourse.ladybug.tools/uploads/default/original/3X/2/6/26dc0a886e3e4d3569d7034201685467f93fb67a.png)
