Is it possible to Vector Texture in Houdini?

   8100   4   3
User Avatar
Member
8 posts
Joined: Nov. 2012
Offline
I am doing a research for my Personal Inquiry on the use of Scalable Vector Graphics (.svg) as texture maps in Houdini. I came across Valve's paper on “Improved Alpha-Tested Magnification for Vector Textures and Special Effects” and was wondering if there was a way to replicate this in Houdini?

Here is a link to the paper: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf [valvesoftware.com]

For the Inquiry, I plan to produce 2 scenes of a graffitied wall, one using normal texturing methods with .tif files and the other svg (or similar), with an animated camera moving towards the wall and comparing render times and output quality. I am relatively new to Houdini so forgive my lack of knowledge. I also plan to look into Ptex, so if there are any pointers or advice on those as well, I would be extremely grateful.
User Avatar
Member
8050 posts
Joined: July 2005
Offline
This is just creating a fog volume and then using the 0.5 density values as an alpha threshold, except done in 2D instead of 3D. I think the hardest part will be how to import the .svg into Houdini as polygons. If you have polygons, then computing this is trivial (see attached file).

Although if you go with their exact approach, then you do a high-resolution render of the .svg to a .png, load the .png onto a grid of points via the tex() expression function, then run a VOP SOP that computes the density via point cloud lookup of the neighbourhood.

Attachments:
planarSDF.hip (63.1 KB)

User Avatar
Member
8 posts
Joined: Nov. 2012
Offline
Thanks Edward, this gives me a good starting point. I'll give both methods a go and see how well I can pull it off. I heard getting .svg files into Houdini would be a problem, but seems like an interesting thing to try, the .png route may end up being the best solution for me, but I shall see. Thank you for the help.
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
Is it not possible to import an AI file, and then use it in a COMP via Geometry-Node. Then assign the output to a texture via “opimg/comp/geometry_node”.

With this it should be possible to get simple vector-shapes as textures.
Control the texture resolution via image size in the COMP, and/or assign there additonal filters.

Attachments:
testrender.png (251.1 KB)
Archive.zip (288.1 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
1807 posts
Joined: Oct. 2010
Offline
We actually ended up writing (wiring?) our own SVG importer at my work. with a little bit of python, you can make a general xml importer, then use it to bring in all the SVG XML metadata in as attributes in a point cloud (which then, ultimately, you can use it to generate vector art in Houdini). This approach will do most of your heavy work (with maybe a little more python for bringing in paths and fonts) It is actually more trivial that it sounds if you look up documentation on the svg syntax (check out www.w3schools.com/svg)

I would for sure recommend making your own svg importer over using AI files as, since the data is in easily readable xml, you can pick up literally EVERYTHING from your vector art, such as colors, layer names, layer orders, layer groups, strokes, etc, and regenerate them as geometry

On that note, I would HIGHLY recommend SESI making a generic SVG Importer SOP and COP to come stock with Houdini. I really feel that, with the increased used of svg in the web, this would be a huge advantage in houdini over many other packages (since we implemented our own, we have made some amazing digital assets that leverage vector art, such as 3D logo generators, vector texturers, etc.) The fact that so much of the vector attributes are so easily readable, makes for very elegant and simple tools (i.e. in our logo tools, all the logo colors came right from illustrator, and we could extrude based on layer names)

The syntax for svg is actually quite simple… it took us about 2 people for 3 weeks to get it done using a bit of python and sop nodes (and, at the time, that was 2 un-experienced people )
-G
  • Quick Links