Human

Welcome to Human for Grasshopper!

Because humans are animals too!

Any similarity to my own name is, of course, a pure coincidence.

What does it do?

There are two sets of components with different functions:

Human.gha

Extends Grasshopper's ability to create and reference geometry including lights, blocks, and text objects. Also enables access to information about the active Rhino document, pertaining to materials, layers, linetypes, and other settings. 

Includes the following components:

(Those in bold are new components with this release.)

  • Object Creation
    • Bake Geometry with Attributes
    • Create Hatches
    • Create Justified 3d Text
    • Create Lights
    • Define Block
    • Place Blocks
    • Create Object Attributes
  • Display
    • Custom Display with Variable Lineweights
    • Custom Display with Bitmap Textures
    • Render Text to Screen
    • Render Mesh to Screen
    • Render Curve to Screen
    • Render Point to Screen
    • Screen-Oriented Text
    • Screen-Oriented Mesh
  • Document Information
    • Font Table
    • Material Table
    • Layer Table
    • Hatch Pattern Table
    • Linetype Table
  • Document Modifications
    • Create/Modify Layers
    • Create/Modify Materials
  • Miscellaneous
    • Document Units
    • Directory Contents
    • Delete Objects on Layer
    • Dynamic Item Selector
  • ​Reference
    • Dynamic Geometry Pipeline
    • Explode Hatches
    • Explode Blocks
    • Explode Blocks Recursively
    • Get Object Attributes
    • Light Properties
    • Sort Objects by Type
    • Text Object Info
    • Get Objects by Selection
    • Get Objects by Layer
  • Texture Mapping
    • Planar Mapping
    • Box Mapping
    • Spherical Mapping
    • Surface Mapping
    • Cylindrical Mapping
    • Custom Texture Mapping

TreeFrog.gha

This add-on includes a set of components to aid in the advanced manipulation of data tree structures.

Includes the following components:

  • Assign Paths 
  • Graft by Data
  • Match Paths (this is pretty much the same as GH's native "Unflatten" - but it came first so I'm leaving it in :D )
  • Path Description
See the images and reference files for a detailed explanation of the function of these components. 

I'd also like to acknowledge the creators of Horster Reference, the first Grasshopper add-on to expose advanced reference functionality. These components definitely build on the work they have done, although they take a slightly different approach.

To install:

  • In Grasshopper, choose File > Special Folders > Components folder. Make sure you delete all earlier versions of HDTReference.gha, TreeFrog.gha, and Human.gha if there are any. Save the gha file to that directory.
  • Right-click the file > Properties > make sure there is no "blocked" text
  • Restart Rhino and Grasshopper

 

Load Previous Comments
  • 郑松旺

    不知道怎么下啊

  • m.omalley

    Great plug-in, thanks for sharing it! I've just discovered a strange bug when I try to use the Custom Preview Materials component in a definition where I've clustered other components. If I try to add a bitmap to the diffuse or transparency channels, the maps fail (meaning the object previews as a solid, white material). In some cases it will accept a map smaller than 512x512 pixels. Without clustering, the component works fine with any size image. The component isn't part of the cluster or receiving data directly from the cluster. Just wanted to call it to attention. Thanks again!

  • Tim Halvorson

    Hey Andrew! Great work on this plugin. While working with the Item Selector component I noticed that the layer order doesn't match the layer structure in my Rhino file. Instead, everything is sorted in order by which they are created.. From a workflow standpoint this starts to get very confusing when my projects will regularly grow to A LOT of layers. Is it possible to have the selector match the structure from Rhino?

  • Andrew Heumann

    Hi Tim - this one-line c# script should get you a "sort index" property for all layers that you can use to sort the output of the layerTable component.

        A = RhinoDocument.Layers.Select(L => L.SortIndex);

    I don't do this naturally - I use the layer index by default so that as new layers are added/rearranged, the entire order of the set doesn't change in unpredictable ways. The SortIndex changes every time you click one of the headers (Sort by color, linetype, visibility, name, etc).

  • Tim Halvorson

    Thanks for the response Andrew. So I have used the script to gather the layer indexes and sort them but I'm not sure how to apply your suggested sorting techniques. (By Material, Color, etc..) My thought or question is this: Can there be a unique identity number tagged to each layer as it is created? This way, no matter how I choose to organize my layer hierarchy in Rhino, Grasshopper can track along and not break the connection. In the example image, this simplified Rhino file is focusing on the facade development. I typically have separate top-level layers for each major component of the project similar in scale to Revit Worksets. It would be ideal to keep the flexible layer control from Rhino and have Grasshopper responding. 

    - The other thought was a selective sort. So, for example, my top level layers are organized by a number (03-Facade, 04-Interiors, 05-Lobby, etc..) but then keeping the nested layers in their current organization inside.

    - Final thought. Maybe I am simply overthinking this and I need to adjust my layer naming strategy from the beginning to be more methodical. What do you think?

  • Andrew Heumann

    Hey Tim - first of all, to sort the layers by the sort index, you'll have to feed one of the outputs from the layer table (like the layer name or full path) into the "A" input of your sort component - this is how you sort one list by another.

    Secondly, if you replace "SortIndex" with "Id" in that script, you'll get each layer's unique ID, which should persist.

    At the end of the day though I think you're interested in a persistent sorting that respects layer nesting structure. What about just a text sort on the layer full path, using 04_ style prefixes on parent layers as you describe?
  • Tim Halvorson

    2015-0925-Capture%2004.PNG

    2015-0925-Capture%2003.PNG

    Hi Andrew- I got it working. You can see in the image that I was able to extract the naming preface. The example added to brand new layers to my Rhino model tagged with "04-" and you can see how they are used to sort the data. I wasn't aware until now there was a separate text sorting component. The result in the 2 panels on the bottom right is a sorted list either by full name or layer name. This little move should really help stay organized moving forward. Thanks for helping to clear this up for me!

  • Tim Halvorson

    As I've been working and adding new layers with GH iterations, the layer will shuffle and get screwed up. How were you thinking to use the persistent layer ID to match? When the C# code gathers up the data, it was giving me an error because there were more IDs than layers to match.

  • Jonathan Russell

    Hi Andrew - loving these tools! I've been working on a definition to let me animate and render a point light along a curve, but have come across a roadblock: the CreateLight component doesn't allow access to all of a light's properties. Specifically, I'm looking to change the Decay option and to radically increase the light's intensity (giving CreateLight a maxed-out intensity of 1.0 in GH results in a light intensity of only 10% of what I need in Rhino).
    Am I missing some way to alter these properties? I tried using LightProperties to grab the attributes of an existing reference light, but the intensity just went back to 1.0). Any thoughts?
    Thanks,

  • Dan Weissman

    Hey Andrew -

    is there a way to move already existing layers with geometry in them into sublayers?  i'm working up a definition that turns off a bunch of layers when importing geometry from Revit, but i'd also like to move those layers to an 'off' layer automatically. 

  • Andrew Heumann

    Hi Dan - 

    Try the attached script. It will move an existing layer to be the child of another existing layer. MakeChildLayer.gh

  • Dan Weissman

    You are a beautiful human.

  • Mehrad Mahnia

    Hey all;

    I have a problem, I used the "Render Tet to Screen" Component, the problem is that it goes behind the scene's objects when I'm rotating the view ... is there any way to solve the problem?

  • Bomin Kim

    I have a excel number set that i'd like help assigning relative line thickness to at different directions. For example, at 10 north would be thicker than 5 East, 3 South, 7 West, etc. I took the spreadsheet reader to extrapolate the data, then sort and partitioned to make a relative range of data. From there, I was looking to assign line thickness and typology and a direction, but I'm a little stuck. Any help would be appreciated. 

    test.gh

  • Andrew Heumann

    Hi Bomin Kim - 
    without your excel document or the plug-in you used to read excel, the document you've attached doesn't help me help you very much. However, there are two basic ways to think about lineweights using Human:

    1. Line thickness in Grasshopper Display. For this, use the "Custom Preview Lineweights" component, and supply the lineweights you want and the curves/lines you want to display. It has two modes - Relative (the default) where the supplied number is a pixel width, regardless of zoom, and Absolute, where the supplied number is provided in the units of your document, so that a line will always display as "20 cm" thick and scale with your zoom.

    2. Line thickness in Rhino object Attributes. For this, use "Create Attributes" and supply your desired lineweight to the "plot width" input - then feed both these created attributes and your geometry to a "Bake" component. This will bake your geometry to the Rhino doc with the proper plotweight - which will show when you print, or if you enable "PrintDisplay" in the rhino command line.

    Hope this helps - if not please supply a little more information so I can get closer to the problem at hand.

  • Martin J

    I am really pleased to see the new version! It is great to see you have included the Viewport properties. I have two comments:
    1. The "modify viewport" is missing a camera up setting.
    2. When the viewport is switched to parallel(orthographic) view, the CPlane and Camera position will drift in the background. When you then switch back to projection view, the camera will be far from the target. It also seem to drift more if the updating is more rapid. Is it a Rhino bug? I do not think it's specific to the Human plugin. Video: https://www.dropbox.com/s/buns398xf59de6u/Grasshopper_Viewport_Drif...

    Is there anything to do with this?

  • Andrew Heumann

    Hi Martin - 

    You're correct that Modify Viewport lacks "Camera Up." Personally I've never seen the use of this setting, but I'd be open to adding it to the viewport components if it would be of use to you.

    The distance hop you notice is a Rhino thing, definitely. No idea why it does that... Strangely, if you use a different mechanism to switch between perspective and parallel, it doesn't happen. I have an alias set up to the following command: 

    '_-ViewportProperties _Projection _Toggle _Enter

    This will let you quickly switch between perspective and parallel without any "hopping." Hope that helps.

  • Andrew Heumann

    Hey Martin - added camera up to viewport properties and modify viewport components. See if this works for you! 

    Human.gha

  • Martin J

    Hi Andrew,

    That is great! Thank you very much. I have done some quick testing, seems to be working fine.

    About the drifting problem, this is slightly annoying, but can try the toggle command.

    Many thanks!

  • Stefano Corciolani

    Hi Andrew! First of all thanks for your work, it is exactly what I needed! Great job!

    My problem was to change line display thickness in rhino viewport. I enabled "PrintDisplay" and I wrote a tiny VB script component referencing the object and changing its linewidth but, of course, I got it changed directly in the Rhino model, not in an output copy from GH.

    I know that it is a newbie question, but may I ask you what is your approach in this case?

    Thanks!

  • Andrew Heumann

    Hi Stefano - 

    Grasshopper curves do not have an intrinsic "line width" property. When I draw lines with my custom preview component, I am overriding the DrawViewportWires method and calling args.Display.DrawCurve with the optional thickness argument. 

    Hopefully the above script will get you started. 

  • Stefano Corciolani

    Thanks Andrew! I was following a completely wrong path.

    I will practice more just to understand, but your components work like a charm!

    Cheers!

  • jayant khanuja

    Hi Andrew.

    Great plugin.

    I am working on an animation and using create light component, but once it gets baked the intensity of baked light in rhino does not change.

    Any suggestion will be really helpful.

    Thanks

  • Andrew Heumann

    Hi Jayant. What render plug-in are you using? V-ray ignores the intensity of rhino lights in favor of its own intensity value, which my components do not currently control. You should however see a difference in the Rhino Rendered viewport. 

    Also, make sure your intensity is between 0.0-1.0. 

  • jayant khanuja

    Hi Andrew.

    Thanks for the reply. I am using v-ray render.

    I understand now why it isn't happening. I will try to find a way around it.

    Thanks.

  • Martin Siegrist

    Hi Andrew, I downloaded Rhino 6 WIP and started to play around a bit. The Human Layer Table and Object Attributes components are red.

    This is the error:

    1. Solution exception:This object cannot be modified because it is controlled by a document.

  • Andrew Heumann

    Hi Martin - This appears to be a bug with the new RhinoCommon shipping with Rhino 6 WIP. I am following up with the rhino developers here: https://discourse.mcneel.com/t/sdk-change-linetype-table-access/360...

    In the meantime the attached update to Human should eliminate the error. Human.gha

  • Steve TZ

    Hi Andrew.  It seems that there is also an issue with the CreateHatch component in Rhino WIP.  There are no error messages but it is not outputting any hatch geometry.  I only tested this after loading the update that you posted for Martin.  

  • Andrew Heumann

    Hi Steve - make sure you have added some hatches in the rhino document - it won't pick them up before that has happened.
  • Steve TZ

    Is that only for Rhino WIP?  In Rhino 5 I am just inputting closed curves generated by grasshopper and then the CreateHatch component is generating hatch geometry. 

  • Andrew Heumann

    Hi Steve - I've had the same problem with rhino 5 sometimes - it's not always predictable.
  • Steve TZ

    That's strange I have never experienced that in Rhino 5. So just to be clear you are saying in order for it to work, I just have to insert several random hatches into the rhino document or do they have to be specific to what I am generating in Grasshopper? I tried to add some rectangular hatches to the rhino document but that did not seem to make a difference. Maybe I am misunderstanding what you meant.
  • Andrew Heumann

    You have to add some hatches to the document first - of the particular hatch patterns you wish to use when baking. I believe this to be a RhinoCommon bug - I complained about it a long time ago on the Rhino forum. The problem is that hatch patterns do not exist in the document's "Hatch Table" until they have been added once to the document - I believe the reason for the inconsistent behavior may have to do with document templates - some may have the hatches already included while others do not. 

    As a test, try creating a rectangle, hatching it with "Hatch1" or whatever, and then creating the same hatch in GH/Human. I can confirm that as long as I do this, I am able to create hatches with the Human component in the current Rhino WIP. If this doesn't solve the problem for you we'll have to look more closely. 

  • Steve TZ

    Andrew - I tried your suggestion and I am able to bake the hatch into the Rhino document but the hatch geometry output is still not generating any results.  I'm basically just trying to run that output into a custom preview component so that I can see the hatch pattern and assigned colors before baking them. 

  • Samuel Wilson

    I'm having an issue with accessing object attributes after using the Move component - after a set of curves is moved by a set of vectors, attaching the resulting geometry to the ObjAtts component results in an error "1. Solution exception:Object reference not set to an instance of an object." . Flattening/grafting/etc the geometry does not resolve the issue. See attached image 2016-10-24_17-21-53.png

  • Andrew Heumann

    Hi Samuel - this is expected behavior. Only objects in Rhino have attributes - once you move your curves you're actually making a new copy that only exists in grasshopper, and thus has no attributes. Is there a reason you cannot use the attributes from the original geometry reference?
  • Samuel Wilson

    Andrew - thank you. I should be able to figure something out now.

  • Olivier Suire

    Hi !

    I noticed that I could not retrieve the "Material name" attribute from blocks.

  • AJ

    sorry for noob question. how do you use wildcards. i saw some Regix stuff going on but.. 

    thnx

  • Andrew M

    Hi, I am wondering if there is a way to generate full layer paths (create the layers+sublayers in the Rhino doc) from within the "CreateModifyLayers" function through ghypythonlib. At the moment I can only get it to generate parent layers, even using the proper syntax (parent_layer::sublayer). Using the Grasshopper component itself presents no problems, but I see no keyword argument or input that would allow me to do this in python. Thanks for any help. 

  • Denton Fredrickson

    Hi Andrew,

    First of all, thank-you for your incredibly useful plugin.

    I have been mapping images (.tif with alpha masks) to surface geometry using your custom preview materials object (connected to DB).  In the previous Rhino WIP (June 2017, I believe), the alpha channel was working quite well.  With the new WIP (2017-07-25) the alpha channels aren't being recognized.  Do you know why this might be?

    Thanks for your time.

  • Andrew Heumann

    Hi Denton - I have no idea. I was unaware Tifs with alpha channels had ever worked with my components - this is not by design, just a product of Rhino's own handling of simple materials, I guess. The component is designed to be used with a separate file representing the alpha channel (the transparency bitmap input) and I have found Jpegs work the most consistently.
  • Denton Fredrickson

    Ah, okay.  I have separated the Tif into two Jpegs (one for the DB and one for the TB) and it is working well for what I need.  

    Thank-you for the quick response!  

  • AJ

    Screenshot_296.jpg

    Andrew. how can i use the mapped mesh color in order to play with the height . visually it is being presented but i cant use the values. 

    thnx

  • Christian Schmidts

    Could the SaveView component also have an absolute input for pixel width and height? I understand the approach with the scaling of the current viewport but sometimes you want to have uniform aspect ratio from several files. 

  • Leo Pedersen

    Has any testing been done of Human components in Grasshopper1.0 in the Rhino6 Beta releases?

    I've been working on a very large definition in Grasshopper1 which was very unstable and crashed frequently until I removed the Human: Directory Contents and Human: Item Selector components. I'm guessing there may be stability issues with either of those two components in GH1.

  • Christian Schmidts

    I also witnessed a some performance decrease in Rhino6, with files that worked fine in Rhino5 I think in my case it was due to the texture mapping components in human but I'm not entirely sure..   

  • Lucy Stephenson

    Hi! Sorry for the potentially stupid post - you mention in the video included on the download page an examples file download - where can that be found? I want to use Human for continuous baking but can't quite figure it out (new to grasshopper!)

    Thanks!

  • Andrew Heumann

    Hi Lucy - http://food4rhino.com/app/human is the best place to download the latest versions. And for future, since this forum is mostly dead, I've set up https://discourse.mcneel.com/c/grasshopper/human for discussion about this plug in :) 

  • Rémy Maurcot

    Andrew, it's possible to retrieve a Bloc ID with Explodes blocks compoment ?