Rhino 8 Mac Sun shadow as hatch

Hello,

Mac Version 8 (8.25.25294.11002, 2025-10-21)

I am looking at the Sun command and the shadows that it creates are good. At this stage, my interest is in the one day sun study, at a single point in time on the day. I have searched, but cannot see any way to create the shadow as a hatch object. I am guessing that it might be due to the fact that objects can both receive and cast shadows, and that a single shadow ‘patch’ can potentially be received over multiple objects and the ground plane. I have read various threads here and understand that it is a complicated matter, with some best fit techniques in play to accommodate resource limitations and data availability.

Capturing the screen image is about all I can see as a work around, but that is a bit clunky and not dynamic. Ideally I would like to create the shadows as hatches, so that they can be assigned to layers and included in layout details. I suspect that the answer will be in the negative, but is there any way to translate the shadows to hatches? For simplicity, the hatches could be limited to the parts of the shadows which are received on the ground plane, ignoring any shadows which are received on objects.

Regards, Garry.

Hi @coffsoft

There are a couple of plugins that can do this one is ladybug and the other is

Introducing Cyclops: Real-Time Raytracing for Sustainable Design :puzzle_piece: - Grasshopper - McNeel Forum

Ladybug has it’s own forum on discourse and works in Grasshopper.

RM

Thank you RM. I saw references to Ladybug yesterday. Cyclops appears to be Windoze only. Re Ladybug, I have not ventured into the Grasshopper world, and I am trying to maintain a Rhino UI solution without the usual compatibility issues that arise between the core software and plug ins. I hope that it is possible to achieve the objective within the core Rhino environment.

Regards, Garry.

Hi Garry,

Sorry I forgot that cyclops is windows only seemed like it would be a good fit.
Ladybug is intense but you could use it for what you are doing but I understand you want to maintain staying in Rhino.

This user posted a basic python script. I think there are other scripts on the forum perhaps Pascal wrote a vector shadows script. Try looking a Pascal’s scripts he posted or search this forum.

Vector Shadows Need Help With A Script - Rhino - McNeel Forum

RM

Thanks again RM. I have tried the script that you referenced, but it is not quite addressing my need.

I found this thread with a script by Pascal, which goes a long way towards my objective.

https://discourse.mcneel.com/t/export-shadows-as-linework/44297

It appears that the missing link is the use of the Sun dialog values as the light source and target. If someone could provide a head start on changes to the script to use these values, it would help immensely.

The relevant values from the Sun dialog are:

The angle from the Y axis to North.

The Date and Time.

The Daylight Saving setting.

The Latitude and Longitude.

My understanding is that if these values would have to be used to provide the light source and direction to the script.

Regards, Garry.

Hi Garry,

Glad you’re making some progress.

I don’t know where and if these sun methods are exposed in Rhino. Hopefully someone with more knowledge of scripting/programming will chime in.

RM

@nathanletwory Getting somewhere…

I found the documentation for the Sun methods.

https://mcneel.github.io/rhino3dm/python/api/Sun.html

This set me on the track…

https://github.com/mcneel/rhino-developer-samples/blob/8/rhino3dm/py/SampleSun.py

I thought that I might be able to modify Pascal’s script to use the Sun methods, although I expect that it might not be that simple.

This chased me down a rabbit hole of installing Python 3, then Pip, then CMake, then another module. Even after that, I still stumbled on the No module named ‘rhino3dm’ error when trying to execute a Python script in Rhino.

I then found this old thread…

https://discourse.mcneel.com/t/no-module-named-rhino3dm/154049

After reading this, I think that perhaps I should uninstall CMake and Python 3, as it seems that it is not required for Rhino.

I seem to be wandering near the answer, but not seeing the wood for the trees.

Regards, Garry.

Not sure how you ended up trying to use rhino3dm, but that is not the right approach.

You’ll want investigate using Python 3 or C# directly in Rhino. You can do that by running the Rhino command _ScriptEditor. That will give you access to RhinoCommon, the SDK inside Rhino.

Before you dive in deep, the is a mesh shadow outline component in Grasshopper. If you just need the shadow of one object on a plane then you can use something like this, I baked the hatches to SomeLayer.

@Nathan I want hatches or surfaces or curves to be created to represent the shadows on the ground plane from multiple buildings, each of which contain many polysurfaces, extrusaions, surfaces etc. The shadows are to be created from the Sun parameters, not a light source in the model space. If there is a GH solution to this, that would be better than a script.

Regards, Garry.

@Nathan I might be getting close. I have attached a test model and GH. I am new to GH, so there is a missing link in my understanding. I have set the model Sun as the light source, but I am not seeing any output after Baking the Pattern Hatch.

I found that the Latitude and Longitude in the Model Sun had no values, so I Baked them, but still no hatches.

Regards, Garry.

KDRSunShadow.3dm (7.5 MB)

KDRSunShadow.gh (14.3 KB)

Making progress. The model Sun had not received the Latitude and Longitude. I provided values, and it now produces curves. More work required, but I will update the GH file later.

Regards, Garry.

@nathanletwory Nearly there. It is working, with a couple of questions arising.

For the Sun dialog, Rhino wants the North angle adjustment specified as the angle from the X axis to the model North, moving counter clockwise. Grasshopper wants it specified as the angle from the Y axis to the model North, moving counter clockwise. I’m Rhino, I have it set as 351 degrees. In Grasshopper, I have to set it at 41 degrees to achieve the same shadow. There is no combination of 351 and 41 with 90 degree allowances for the X / Y reference differences that gets back to 360 degrees. Could this be due to Azimuth, Altitude or other factors? Those 2 do not appear in the Sun control in GH, so I cannot test their impact.

I have included a Model Location control in GH, but cannot get it to link to the model to obtain the model values.

The Time Zone is set to UTC + 10.00 in Rhino. To see the same shadow in GH, The Sun control has to be set to UTC + 11.00. Both have Daylight Saving turned on.

Thank you for the GH head start.

Regards, Garry.

KDRSunShadow.3dm (5.6 MB)

KDRSunShadow.gh (17.3 KB)

Lets ping @AndyPayne and @kike who have done the GH side of things. They’ll be able to tell what and how wrt Sun.

Hello,

I have updated the files. The Sun North angle adjustment is now set to 351.4° in Rhino and 40.7° in GH.

Regards, Garry.

KDRSunShadow.3dm (8.2 MB)

KDRSunShadow.gh (20.5 KB)

Hi @coffsoft,

Unfortunately Grasshopper is applying twice the North angle to the direction.

The fix will be available on Rhino 8.26.

@kike Thank you.

Does that also explain the different UTC setting requirements?

Do you have any advice regarding the empty Model Location component?

Regards, Garry.

SunShadow.gh (6.5 KB)

SunShadow.3dm (7.9 MB)

Yes, I’ve tested with your file.

Both are fixed now.

@kike Good news. What about the empty Model Location component? Any advice would be appreciated.

Regards, Garry.

By both I mean the Sun component and the Location component. :sweat_smile::folded_hands:

@kike Thank you. I read it as the angle and the UTC. Much appreciated.

Regards, Garry.