Exporting Image trace from Illustrator (AI CC) to Rhinoceros 5

Hello,

I am trying to import vectors and hatches into Rhino, they were created using the ‘image trace’ function in illustrator.

On Illustrator after tracing, the image looks as it should, (Top Image) but when importing I loose multiple areas of hatch (Bottom Image). The curves/vectors are all imported, although I have unticked ‘show curves’ to better see the colors.

In this case I’m using the grey-scale setting, although I have played with the settings resulting in similar results. I am using the High Fidelity setting but I have similar issues with the 16 colour settings.

67%25%20(RGB_Preview)%20%2029_07_2019%2014_41_55%20(2)

If any one has experienced this and knows of a fix that would be great.

The imported files are .dxf’s

I realize this could be considered an Illustrator Issue rather than a rhino one, but I thought I’d ask here first before posting on the Adobe forum.

Thank you,
Jed

i am using a mac so the results may be a bit different, since in rhino 5 i had not option to import hatches at all only as boundary curves. in the version 6 which is maybe now on par with your windows 5 version in regards of hatches i can import almost all hatches and that might also be the bug you are experiencing, that colors which are very similar to your background color in rhino get strangely avoided. if so you could try to tweak the colors, or even try a different background color before importing :slight_smile:

it might not make much difference if dxf or ai file, but i did not test it i used ai.

edit: hmm maybe using a different background color does actually not help… sorry might have been just a coincidence.

but, the remaing non hatched curves can be shown with SelCrv, since only the empty curves will be selected it might be a quick fix… sorry if this does not help much.

Thanks for your reply,

Unfortunately, changing background color had no effect,

I can see all the curves, and I could select and re-hatch them individually, but as I need the original colors from the AI image trace it would take a very long time…

Thanks anyway

Can you post the exported .dxf from Illustrator? My feeling is that some of the areas may not be closed or have other validity problems in Rhino, thus the hatches are not created. Hatches can only be created from closed, valid curves.

that would apply also to what i have tested, having a closer look i found selfintersecting garbage coming from the trace tool in illustrator at exactly those which did not work.

Hi Helvetosaur,

You are right, there are tiny loops in many of the curves…I’m sure if I zoomed in enough I would find them in all the curves without hatch.

Any suggestions as to how I can get a better image trace, or different method/program to get the same result?

The DXF was too large, so here is a section from the rhino file

AI to Rhino Image Trace.3dm (19.3 MB)

Thank you,
Jed

Yeah, that looks a mess… There are some ways to fix the curves, but in the end you won’t know what color/gray level the hatches should be from the missing ones anyway…

What is your end goal exactly? There might be a better way to do this than Illustrator trace.

For example, you could use the image directly in Rhino to create a heightfield (3d) surface, then slice the surface with the Contour command at the desired intervals (like a topo map). With some smoothing you could have some good curves which you could hatch in different grays according to height. That will however probably not produce exactly the same effect as the gray level “posterization” you see in your first image.

For this type of operation, the quality of the original image will also greatly influence the result. The better/smoother it is, the better the output will be.

The end goal is effectively a heightfield/ topographical map, but the rhino heightfield is not accurate enough. I had played with the heightfield tool for a long time before giving up and looking for other ways. But maybe I don’t understand it fully.

What I really want is the image grouped into separate colors that I can move as a group, to produced an ‘exploded diagram.’

In the image below I have partially achieved this using image trace, but i can’t get it accurate enough.

Is there a way to explode into pixels and group the pixels? Then create curves around the grouped pixels (Dupborder) I would still need to reduce the colors to a manageable numbers of grays, but I’d rather it was more accurate to the image even if it takes longer to do.

Thanks,
Jed

Well, you could reference the image in the image component in Grasshopper and map a Z height to each pixel according to value (or other criteria, there are lots of options) - then create a mesh with the Z heights. That would be a one data point per pixel representation of your image - you can’t get any more accurate than that.

You could also apply some image processing like adjusting the Z heights so that they fall into a set of discreet levels or something similar. Then you could produce curves from the mesh or the points using a variety of methods. Someone from the grasshopper group may already have done something similar.

OK Thanks,

That sounds like a good idea, I will try it now and check the grasshopper group,
I have minimal experience of grasshopper, it looks like now is the time to learn!