Grasshopper

algorithmic modeling for Rhino

Hi

I am trying to isolate any unobstructed surfaces within a certain distance from a given point. This is to represent a 500m visible radius from a standing viewpoint.

In cases where the surface is partially unobstructed, I would like to split these from the original surface at the points where they become obstructed, or rebuild only the unobstructed portion of them.

So far I have gotten to the point of getting unobstructed points on the obstacle surfaces, but am not sure how to separate them into lists per obstacle.

I am fairly new to grasshopper so I apologise for lack of technical term!  Any help is greatly appreciated.

Views: 5640

Attachments:

Replies to This Discussion

Yeah, I forgot to internalize, my bad! You do not actually need weaverbird, I just use it to increase the face count, you can just increase it with a higher integer in mesh sphere ex. In the end, you get the obstructing surfaces from the list item component -if you do not explode the boxes you get the obstructing breps. In the 2d example the ivray works exactly like the isovist component, I just put it there to set you in the mood for the 3d solution. :)

This looks clean to me; 3D Points By Obstacle/Surface.  I added a 'Skip Edges' group because points at the edges of surfaces were causing confusion by "appearing" on hidden surfaces.

Attachments:

This is amusing...  Instead of placing the buildings on a tilting disk for "3D" effect, I created a configurable "Two Hill Surface" and wired it so the surface itself is an obstacle too (but is treated differently than other obstacle surfaces).  And added a 'Choose Viewpoint' group to pick the center of any building as the "Viewpoint", eliminating that building from the obstacle list.  Seems to work as expected though haven't done much testing.

As noted in the code:

NOTE: Disable green group while adjusting
'Choose Viewpoint' and 'Two Hill Surface'

You could take this a step further by choosing any point on any surface as the "Viewpoint", like a window in any building, instead of using the volumetric center of the selected building.  But that's more complicated because the building itself must then block all views except from that "window"...

Attachments:
Hi Joseph, Is it possible to show also the points of the ground that there are also visible from the chosed viewpoint (like a viewshed http://www.grasshopper3d.com/m/discussion?id=2985220%3ATopic%3A1056786) ? I want to achieve a result similar to the one in this video https://vimeo.com/71553560 . Is this the right way to approach this kind of problem? I apologize for my poor english.

I didn't remember much about how this works but within a few minutes, I was able to divide the ground surface, use the resulting points as endpoints and pass the resulting "sampling rays" to a separate instance of 'IVRay'.  This isn't the only way by any means.  The video shows a headlight/flashlight approach and "sampling rays" could be done that way instead of dividing the surface as I did.  Fun stuff.  Play with it.  Enjoy.

Attachments:

I also wanted to try to regulate the view angle to perform the analysis just in a certain angle.

Here you go; a "flashlight" surface with adjustable beam (horizontal, vertical and pan angles).  This doesn't apply to the buildings, only the ground surface.  I don't have the time or patience to do any more at this time.

P.S.  As noted in the code:

Disable green group while adjusting 'Choose Viewpoint (POV slider)'

This disables the buildings but the flashlight still works on the ground surface - much faster.

Attachments:

OK, as often happens, take a little break and what seemed difficult is suddenly easy.  I just removed the code that divided the building surfaces into "sampling ray" end points and connected those surfaces to the same 'O (Obstacle)' input of the 'IVRay' component I used for the ground surface.  Simple!  The buildings now cast shadows on the ground.

Attachments:

One more refinement...  I added a "Resolution" slider that is used to compute an even distribution of horizontal and vertical points on the "flashlight" surface.  A low number on the slider increases the 'point count' (because the points are closer together), a high number reduces the point count.

  • Set to 15 generates 4020 points and takes 11.2 seconds on my machine.
  • Set to 10 generates 9045 points and takes 24.7 seconds.
  • Set to 5 generates 36582 points and takes 1.7 minutes.
  • Set to 2 generates 228362 points and takes 10.5 minutes. (not recommended)

It adapts to changes in the horizontal and vertical angles (width and height) of the "flashlight" beam, changing the point count appropriately.

Attachments:

Here is a slightly different method for getting the surface points more evenly distributed:

The flashlight/headlight approach would be fun but I'll leave that to you... (maybe)

Attachments:

I have no words to say how much I'm grateful for your help and for the time you spent over this definition!! You really saved my life :)!! The work you have done it's amazing! Do you think it should be possible to assign to the visible points a color gradient variable with the distance and the view angle? The point is that in my opinion the quality of the vision change with the distance and the angle. I think I see in a better way the points closer to me and with the increase of the distance the 'quality of the view' decreases. On the other hand I think I also see in a better way the points that are directly in front of me and that 'quality of the view' decreases with the increase of the angle.

Clearly, many things are possible and there are many different ways.  If you want to learn Grasshopper, you have to figure some things out for yourself.  Have fun.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service