3D shadowed area - what's the best way?

Hello everyone,

I’m trying to create a file, which gives me a 3 dimensional shadow of buildings. Atm I don’t care if it’s a Point Cloud, mesh or brep. I want a geometry which representates 3D areas behind buildings which aren’t or are less exposed during the whole year.

Tried it with “Mesh Ray” combined with Ladybug and also tried it with “Bounce from Surface” from ladybug to cull exposed voxels. But neither I get a nice result and it’s very slow.

What workflow/method would you recommend? Somebody got experience or ideas?

Thanks and best regards,
Tim

Hi.
Is there any option you can choose from using “Mesh Shadow”?

Never thought about it. Tried it and got close I think. I just have one Problem.
It there a way to get the outlines which were projected?

Atm I just improvised and set an Amplitude for the Extrusion. But like this I get “shadowed” area also over the geometry.

It get’s quite close. Somebody got an idea to improve it?

3d shadow.gh (412.0 KB)

Thanks and best regards,
Tim

Here’s a scripted approach to creating a cast shadow pointcloud. I made it work for a point light source, but it can easily be adapted for a directional source as well. Mesh geometry only. I noticed that the mesh intersector treats quads potentially differently from the display, so you may want to triangulate your meshes before using them to get an agreement between the intersection points and the display.

It basically shoots N random rays at the boundingbox of the shadow caster geometry, then sees if that ray intersects both the casting geometry and the catching geometry, and if it does, whether it hits the caster first. If yes, the point where the ray intersects the catchers is added to the shadow-cloud.

shadow cloud.gh (14.3 KB)

2 Likes

Hello David,

thank you for your respond, this script is really awesome. But I think I didn’t explained it clearly what I want to achieve. Here are some pictures to clearify it hopefully.

Example with 2 sun vectors casting the shadow

That’s what I meant with 3d shadow.

And in the end, I want to area wich doesn’t get sunlight over the time (the intersection area). This would I do with point in breps like in my example, so I can choose for example to cull the Points by amout of intersections or color them (darker if they are in more breps and so on)

So what I need is the first Geometrie. The shadow or the shadow+casting geometry.

Thanks for the help :slight_smile:

I’m getting closer, somebody an idea how to remove the marked surfaces to create a closed brep?

3d shadow1.gh (418.4 KB)

nobody an idea?

Plenty … but there is some bad news around as well (C# code only, sorry). Notify if you want a demo (as simple as possible) . See a classic Waldram analysis on that matter using SOM’s big thing in Dubai. (A hint : you can use Trim (Breps VS a solidShadow). That retains portions of BrepFaces that are opposite the normals of the solidShadow object. In fact there’s some bugs around related with that Method [occasionally yields freaky results]… but anyway).

Thank you very much Peter, but still not what I’m looking for :see_no_evil: Or at least I think so, if I understand what you did there. If I get it wrong please excuse me.

Hope this clearifies it a bit.

If nobody has an idea, no problem, me too :smiley:

Sorry I don’t have anything to suggest, but are you looking for the region of shadow - the volume that will cast a shadow on anything inside? I think that’s the confusion.

Oh ok, yeah I want the volume which is casted by the shadow ( middle geometry in my last post)
So for example, in the end, I want to do this for one day. And than Analyse which 3d area gets least sunlight.

For example, this is done with 4 vectors creating the “3d shadow” and than it’s analysed how often the points are in the area. As brighter the red is, the more often they are shadowed. It’s like a simple shadow study over one day, just in 3d.

I made a slight adjustment to my original file to now output lines inside the shadow volume instead of points on the shadow surface. I don’t know if it’s going to be helpful to you, but it was an easy modification. Do note that I do not handle the case well where the catcher geometry is inside the caster geometry.

shadow volume.gh (18.7 KB)

Well, since I opened my mouth, I felt obliged to give it a try myself. I’m using a python component I had downloaded from the old site to split breps with a plane so I hope it makes it through safely.

Shadow volume.gh (18.4 KB)

This reminded me of a set of famous renderings by the architectural draftsman Hugh Ferris, who composed a series of studies demonstrating the envelopes of new structures created by New York’s 1916 zoning law. The law was intended to prevent skyscrapers from depriving the streets below of all light by mandating setbacks.

http://gvshp.org/blog/2016/08/16/hugh-ferriss/

Ok thank you both for your help. Both is working really good. Just the solid operation will take really long on many buildings over a long period of time.

Made with David’s solution. Lines are divided and than points colored by distance to it’s neighbours.

Made with Ethan’s solution:

Thank you for all the help :slight_smile:

Yeah his work is really nice. I didn’t thought about preventing, it’s more about recompression. Where are really bad sun exposed spots where you can build somthing that doesn’t require much light and threw that doesn’t shade the existing buildings to much.

Well, Waldram analysis has not in mind solid shadow volumes (so to speak)

But … I could add some lines of code more in order to get solid shadows exactly as you want … but since you are OK with points (BTW: To do what with these exactly?)… some other time.

I‘m fine Peter thanks. Even when I always wanted a script from you with some cool darth vader pictures and lines, you don‘t need to take time for that :smiley: atm it‘s just a 3d shadow analyse. Don‘t know exactly what to do with it, mabe the really dark ares as spawn location for some crazy stuff in the future, don‘t know yet :smiley:

:open_mouth:
We cannot let this topic die like this ^^
Shadow casting is a very interresting topic :slight_smile:

And that way David coded it is really fast indeed just few ms to raycast the point cloud.
I was trying to get a not randomized row of points to try to cast shadows like in that exemple
(But of course without GI) :
points_exemples

Maybe could be interresting to do so for the volume and the shadows on the ground.

And most important I think…better let Peter express himself or you know what could happen :yum:

File : shadow cloud_cast_TEST.gh (15.5 KB)

ok Peter, challange: Do it realistically like Ethan and with the speed of David :smiley: