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

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:

@PeterFotiadis Theeeere we are On the road again :rofl:
darthducati(1)

OK I’ll see what gives if I remove some sensitive parts of code and do Frankenstein stuff on that WA thingy.

That said the main millisecond issue is that this ugly Trim thingy doesn’t work (both ways i.e. with the trimming Brep either flipped or not, meaning that SDK says things that never happen) and thus one must take the long way home … and this costs some milliseconds (life sucks).

For instance (this is an abstract portion of WA - NOT for your case) imagine blue breps (buildings curvy or not) and (the wireframe) some freaky shadowVolume (don’t ask) .

This (very fast) is what happens if you Trim the blue things with the shadowVolume (not flipped) i.e. all the BrepFace portions that are outside the shadowVolume:

But for the inverse thing (inside) the Trim delivers the same result (no matter if the shadowVolume is flipped) and thus the long way home takes some time:

ok, back to point cloud than. Don’t know if that was what David did (can’t read this script :see_no_evil:), but how about that?

shadow_re.gh (13.7 KB)

I like it, but could be a faster.

Grasshopper nearly crashed
hum…Definetely not that fast ^^

[EDIT]
oops…

Really? O.o
Took about 1 sec at my computer… Maybe because I did it in Rhino 6?
Maybe someone can translate this into a fastet version :smiley:

I nice solution would be to use a 3D Minkowski Sum (they call it ‘Glide’ below):
https://doc.cgal.org/latest/Minkowski_sum_3/index.html
to extrude your shadow-casting geometry along the sun’s angle and then trim this new volume to the ground and other collecting geometry.
I haven’t seen an implementation of this in GH though…
Cheers,
Steven

Hi David,
Is it possible to write the same code but instead of getting a pointcloud, get outlines/surfaces/meshes?
The issue with Mesh shadow is the lack of “casters” input.
Thanks

1 Like