A better Illustrator file importer

   4823   7   3
User Avatar
Member
280 posts
Joined: 12月 2015
Offline
Hi everyone!

Since it seems to be a common dilemma among newbies (including me) to find out the proper workflow for importing illustrator files. I decided to take a look if I can make a proper asset to efficiently and reliably import .ai files into houdini.

So here is the solution I have so far and I was wondering if indeed this is the most efficient way (You can see the networks in the image file, the proper solution is in the network named “holeOnExtrude”).

1. Save illustrator files into version 08 (this is standard, it gets rid of any conflicting elements on modern files including compression)
2. Delete the Cd attributes from primitives (this gets rid of the black color in the primitive)
3. Apply a polyextrude but keep all parameters at defaults
4. Now use the hole SOP
5. Extrude the resulting geometry to get the final output.

I find that if you try to use the hole sop before applying a polyextrude a lot of the shapes come out wrong, you can see the comparison in the files attached. (I included the project files if anyone wants the actual source).

Attachments:
aiImporter.zip (562.6 KB)
aiImporter.PNG (74.4 KB)

https://www.imdb.com/name/nm8408875/ [www.imdb.com]
User Avatar
スタッフ
476 posts
Joined: 4月 2014
Offline
Hi, your .ai file imports polygons and bezier curves at the same time. The polyextrude SOP works best if you give it only polygons.

So on you graph on the right, the polyextrude SOP before the hole SOP converts the bezier curves to polygons.

You can get that behavior on your holeOnCurves graph by adding a Convert SOP just after your file SOP. Set the Convert SOP to convert to polygons and the extrude will work.

You can see the primitives on a SOP node by middle clicking and holding on it. Check the nodes individually to see how cooking the node affects the number/type of primitives.
User Avatar
Member
333 posts
Joined: 10月 2012
Offline
Guillaume is right. You will need to convert the geo to polys. use resample or something.

also for text its easier to do it with the font sop directly in houdini. You can build a procedural way to find the holes there and therefor add support lines with knife sop on the fly so you can at least fake bevels.

Otherwise if this is a hero element with close ups and you want nice control of your bevels when subdividing you will want to retopo the Font by hand. In general if you want to subdivice you will have to do manual cleaning. This will take some while.


Here is one:


Alltho it seems the edges are not correctly resolved. I added an image how sharp edges should be fenced.

Attachments:
Screenshot-91.png (52.0 KB)

User Avatar
Member
280 posts
Joined: 12月 2015
Offline
I see, thanks for the input guys,

Guillaume: I notice the import of bezier and polygons and used the first polyextrude on purpose to convert everything, but indeed the Convert Sop is a more appropiate tool (I just started but I kind of knew there was something deeply wrong about using the polyextrude that way, )

Doudini: I'm just using text because is the easiest way to get varied set of curves with holes and intersections, but my idea was to see what is the best workflow for a quick .ai import that allows some basic extrusion and bevel without to much manual work. Say for a quick logo to fly in, etc. But I agree with you, for a more elegant element manual work is unavoidable.

But as a side note: Do you guys know how will I go about if want for example delete all geometry except curves? If I use the Blast node and delete by attribute, is there an attribute for Curves?
https://www.imdb.com/name/nm8408875/ [www.imdb.com]
User Avatar
スタッフ
138 posts
Joined: 12月 2010
Offline
to eliminate all but the beziers:
use a Delete Sop,
Geometry Type > Bezier Curves
Operation > Delete Non Selected
Pattern > * or blank or selection
john mariella
Senior Technical Director
SideFX
www.sidefx.com
User Avatar
Member
280 posts
Joined: 12月 2015
Offline
Thank you guys for the help.
I made two tools, one to clean the Ai files as it comes from the file node, and another one to extrude it with a few beveling options. But since this will fall more in the realm of WIP I started the post here:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=43388&highlight= [sidefx.com]
https://www.imdb.com/name/nm8408875/ [www.imdb.com]
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
I also recommend using the extrude SOP instead of polyExtrude for imported .ai files, as it is more geared towards building extrusions out of those (i.e. it has an auto hole mechanism that is sensitive to the extrusion, thickness offset, and bridges so that you do not have to use a hole SOP)

Also, the second spine input does insetting, which in general would be more of the results you would want from extruding and beveling those shapes
-G
User Avatar
Member
280 posts
Joined: 12月 2015
Offline
grayOlorin
I also recommend using the extrude SOP instead of polyExtrude for imported .ai files, as it is more geared towards building extrusions out of those (i.e. it has an auto hole mechanism that is sensitive to the extrusion, thickness offset, and bridges so that you do not have to use a hole SOP)

Also, the second spine input does insetting, which in general would be more of the results you would want from extruding and beveling those shapes

Well, yes. But as I mention in my post in the WIP forum. My objective is to create a multi-functional extrude tool, the type you will find in C4D, to have a variety of extrude with bevel presets. I actually made the first version of these tools, see the post link above. And in the ExtrudeNH asset I use the extrude Sop with a second input to achieve curved insets in bevels.

When cleaning the .ai file in the AICleanerNH I convert everything to polygons. True, this is really not required but the Illustrator importer brings both Polygons and Curves. Maybe I could give an option in the AiCleanerNH asset to output curves instead of polygons. And Then use the Extrude SOP for every kind of beveling.

I will probably test this later.

But this is a discussion that will probably be better suited in the WIP post.
https://www.imdb.com/name/nm8408875/ [www.imdb.com]
  • Quick Links