algorithmic modeling for Rhino
I have created a series of windroses from ladybug, and baked them into rhino. I am trying to figure out the process for getting them into illustrator, while maintaining their colors. (surface/fill colors, outline colors work fine).
The best I could do was to create outlines of the faces and then color them based on the vertex color and bake them, (used human plugin to bake with colors). Then I exported from rhino as DXF, (using 2004 settings), and made sure to uncheck "explode polylines".
This got the line work into illustrator with colors, but still no fill. I ended up individually selecting each outline path and shift+X swaps the stroke and fill color. It only seemed to work with one path selected..
Is there any preferred workflow for getting analysis mesh output from rhino to Illustrator?
Any suggestions would be welcome.
Tags:
Replies are closed for this discussion.
I usually use Rhino Render and render it and just use the jpg.... and lay linework over it as needed... not sure if that helps
For anyone that is interested, I ended up doing some post processing of the analysis mesh/es in illustrator. Thanks to my friend Chris Landau for pointing me in the direction of this illustrator script. This was a reasonably effective workflow for the purposes of solving the initial problem. (in reviewing this post, it seems a bit lengthy, but hopefully it's of use to others).
Link to Illustrator Script example:
https://forums.adobe.com/thread/508138
Portion I used: This applies to entire illustrator document. I am using Illustrator CC 64 bit and this worked okay. Tested a few times and it failed once, but a restart of Illustrator fixed it.
var v_selection = app.activeDocument.pathItems;
SwapFillStroke(v_selection);
function SwapFillStroke(objSel) {
for(k = 0; k < objSel.length; k++){
var subSel = objSel[k];
var c_fill = subSel.fillColor;
var c_stroke = subSel.strokeColor;
subSel.fillColor = c_stroke;
if(!subSel.stroked)
subSel.stroked = true;
subSel.strokeColor = c_fill;
}
}
redraw();
My goal was to export colored geometry, (analysis meshes for example), from Rhino and get it into illustrator with solid fills.
If you want to know how meshes are colored in rhino...there are many explanations here on the forum, a quick search will get you more detailed information.
Short version: export your lines from rhino to illustrator and run the script listed above to make the stroke color the fill color. (in illustrator, shift+X will swap the fill and stroke colors on individual objects, but does not work on multiple objects..hence the need for the script).
Detailed Version:
In my case, I had 2 case studies I was working with.
1 - wind rose meshes generated from Ladybug/honeybee
2 - A mesh terrain that was colored by pre-set slope values.
NOTE: There are a few plugins to bake objects with color. I used Human tools, (Bake Geometry and JustifiedText3D).
http://www.grasshopper3d.com/group/human (lots of other great stuff in there too!)
I had two types of geometry. (2 different definitions)
1- An analysis mesh, (HoneyBee/LadyBug),
2 - Lines generated from mesh faces. (mesh terrain/slope values).
Export results as a DXF, and choose "do not explode". (these were my settings)
DXF seemed to produce the most consistent results.
(you could export/save as an AI file and just open them in illustrator, but that seemed to give inconsistent results with the script).
Open DXF in Illustrator:
Apply Script in illustrator:
In the terrain example, there are only 5 colors, so selection in illustrator, by color, is very easy. In the results from honeybee/ladybug, (or any analysis process I imagine), the default colors are created with a much wider range of values. I presume the legend is then created by an average of those values within a range. My point is that, with the analysis results, selecting objects by color in Illustrator is probably not a very effective workflow.
I only tested this on my instance of rhino and Illustrator. mileage may vary.
In summation, at this point, it seems that the best way to get colored mesh faces, into illustrator, is to export the meshes, (which really ends up being the mesh face edges...curves), and bringing them into illustrator and running a quick script to swap the colors. Once that is complete, you can then select ALL the objects, and change the stroke color/weight at once.
Glad Human was of use to you in this workflow! I think there might even be an easier way. If you export solid hatches from rhino to illustrator, they will come in as already-filled objects. That's the workflow I typically use. Human lets you create hatches from grasshopper and assign them attributes (just like the bake workflow).
That is fantastic! Thanks Andrew! So, now I have learned something new.
Which...if I bothered to check the help file, I would have found out that key piece of info!
"Hatches export into AI as closed paths with standard solid fills."
Excellent addition to a workflow. With that said, I don't think I would request any modification to Ladybug/Honeybee's analysis mesh output. The hatch creation is a great post-processing workflow, if you need to output to Illustrator for further development.
If you don't ask you don't know ... so here i go.
This tread is great but i'm missing something. As much as i try (and probably i'm doing something wrong) any of this is working for me. I don't get the baked curves colored, just one color for all. Also the hatched surfaces are all one colored.
Any other hints (or working example) will be much appreciated.
Thanks,
-A.
You want to make sure that you associate the correct colors with the correct geometry when baking.
In the example below, baking the output directly from the ladybug windrose component will generate colored meshes. (For some reason I have noticed that my windrose meshes always need to be flipped once they are baked).
You could go the long way, (as I droned on about in my previous post), and continue working with the meshes....or you could take Andrew's advice and do one or two more steps and bake them as colored hatches. That way you can export the results directly to an AI file.
(the attached definition requires ladybug/honeybee, human tools, and I think UTO mesh edit tools...not sure if the explode and deconstruct mesh components are native or not). I've attached the weather file I used.
Steps after the windrose component are as follows: (i'm sure there are other ways as well);
1- explode mesh (prepping data structure of color selection)
2a - decompose mesh faces to extract vertex colors (each face will have a number of vertices, in this case 4, that will all have the same color).
2b - get the outlines/curves of each mesh face
3 - use the SET component to "clean" the color values. (each face has 4 vertices, meshes are "colored" by vertices, so each faces vertices will be the same color. we only need one.)
4 - use Human tools to create color attributes from the cleaned, (with data structure in tact).
5- use Human tools create hatch using mesh face curves and color attributes. Bake into rhino, export as AI file.
Excellent Chris!!
Thanks a lot. I took the Human road :-)
-A.
After going through all of this exploration, I will be taking the Human road next time as well!
(granted, that is IF I absolutely needed to get the output into illustrator as editable vector work, I would venture to guess that for a majority of the time, the initial suggestions of using a rhino render/jpg output would do the job.) Either way, I appreciate the input of everyone on this topic and I have certainly learned a few things!
Hi Chris,
Thanks a lot for sharing all these. I used the method you have explained but I'm not able to generate any colors! The view is also set to render display but still I'm not able to see not export any color to illustrator.
I would appreciate if you could have a look at my file.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by