QLib Windows installation instructions

QLib is a library of free and useful HDAs for Houdini. Installing it can be a bit tricky, if you don’t have any experience with Git or environment variables.

Here’s my step by step installation guide for Windows:
1. Get and install git:
https://desktop.github.com/

2. In your windows explorer, make a folder with a simple name path (no blanks and no signs, just letters and or numbers) on one of your local harddrives. A structure like: E:\qLib or C:\qLib is perfectly suitable.

The qLib files will be saved here. All your houdini installations can use the same qLib library. When qLib gets updated and or expanded you can update your local version via github and all your dependencies should still work.
When you make an HDA that uses qLib nodes you will have to provide the used qLib nodes with your HDA to make it work on other computers (unless those machines also have qLib installed). Note that it is possible to embed HDAs in each other.

3. Go to:
https://github.com/qLab/qLib

Click on: Clone or download

(That’s the big green button on the top right)

Click on: Open in Desktop

Your browser should suggest to open with GitHub – I tested this with Firefox. Accept.

And select the folder created in step 2. Accept.

GitHub will now download qLib.

3: You should close all your open Houdini programs.

4: In your explorer, go to your equivalent of:
C:\Users\[USERNAME]\Documents\houdini15.5

(Substitute [USERNAME] and Houdini version respectively.) And open houdini.env with a text editor.

5. At the bottom of the document add the following 2 lines:
QLIB=E:/qLib/qLib/otls
HOUDINI_OTLSCAN_PATH=@/otls;$QLIB/base;$QLIB/future;$QLIB/experimental

Note: Here the folder created in step 2 was:
E:\qLib

So for something like
C:\derp\aderp\

the first line would have to be
QLIB=C:/derp/aderp/qLib/otls

instead.

5. Start up Houdini. When you press TAB to put down a node, you should notice the qLib category. If you have issue with Houdini after installing qLib, you can remove qLib from Houdini by removing the lines created in step 4.

 

When qLib gets an update (you might want to become friends with them on facebook https://www.facebook.com/qLibHoudini/ to get the news) you can open GitHub, select qLib and press Sync on the top right. Note that you might get issues if you have modified your copies of qLib HDAs. Git should ask you whether you want to keep your changes or use the version of the HDA that is on the server. You might want to copy your changed HDAs to another folder before a sync, just in case.

 

 

Change shelf height in Maya!

To change the size of your shelf in Maya just use the following mel command:
1. layout -e -height XX ShelfLayout; //replace XX with desired height in pixels

For example, to double the size of the shelf in Maya I had to use:
layout -e -height 100 ShelfLayout;

To make sure the new setting is saved you can:

2. Rightclick on a shelf icon -> Edit,  click Shelves, click Save All Shelves

3. Restart Maya to see the actual result.

increase shelf size maya

After some searching I found the layout command on: http://oshanz.blogspot.nl/2012/08/maya-double-shelf-height-toggle.html , so credit goes there.

Quicktip: Use transparency with Stingray PBS shaders in Maya 2016 ext 2 (Maya 2016.5)

Stingray PBS are the implementation of Physically based real-time shaders in Maya. They are especially useful for previewing game art as it would appear in a modern Engine like Unreal Engine 4 or Unity 5.

To get them to work in a scene, create a new Stingray PBS shader in
Hypershade, or Right click -> Assign New Material
Note: Changing another Material to Stingray PBS via its attributes may cause the Stingray PBS shader to bug out and not initialize properly.

The Stinray PBS shader is fairly straight forward:
The sliders under Attributes change the basic preview values.
To use a texture, assign it under Textures and tick the corresponding box under Attributes. This will override the slider and make the shader use the texture.

If you need transparency:
In Maya 2016 ext2 you can click on the Preset Material drop-down and select preset/Standard_Transparent. This will add a Use Opacity Map tickbox. The shader will use the alpha channel of the color texture when activated.

In earlier versions of Maya, you don’t have this option. But you could add it, because the Stingray PBS shader is actually just a Shader FX network. You can open this network by clicking Open ShaderFX in the material attributes. Click on Make Unique so you don’t edit Maya’s preset, but a unique version of the shader.
Here’s the network for the transparent material:
Shader FX

Nice physically based shader for Houdini 15

Check out PhyShader for Mantra by Roman Saldygashev:

https://github.com/groundflyer/physhader-for-mantra
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=37247

Installation instruction for Windows 10:
Download the ZIP package from git. Unpack the vex, otls and gallery folders to your equivalent of:
C:\Users\[USER]\Documents\houdiniXX.X

The shader should be in your material palette.

Go check it out!

How to create tools that work based on selected points in Python for Houdini

When creating tools for the Houdini shelf you will usually want the tool to work on your selected nodes and or geometry. Here’s an example code on how you can achieve that:

import toolutils

# http://www.sidefx.com/docs/houdini15.0/hom/hou/GeometrySelection
selection = toolutils.sceneViewer().selectGeometry()
node = selection.nodes()[0]

# http://www.sidefx.com/docs/houdini15.0/hom/hou/GeometrySelection
selection = selection.selectionStrings()

#selection is a tupple
print selection
print type(selection)
selection = list(selection)
print selection[0]
print node

list_of_points = node.geometry().globPoints(selection[0])
print list_of_points

Instructions for testing: Create a python shelf tool with the above code, open a python shell and select some geometry. When you execute the shelf tool you should see the output fromt the print statements in the shell.

Modified from original script created by pelos on the advice of graham:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=30272&view=next&sid=c2213c434ff8da4160244efa54586266

Tiling sculpting in ZBrush

So you want to create current-gen quality tiling meshes (and not just textures)? I give a rundown of a few methods on how you can accomplish this.

Note: Several of these tutorials are used to create tiling textures (and I have a whole other topic on that https://dimitriscg.wordpress.com/2013/04/16/tiling-texture-in-zbrush-and-the-tilde-key/ ), but the methods presented here also create tiling meshes, which might be reduced (and tweaked) one way or another for in-game use. I recommend you read my other post first, if you do not know any methods to create tiling textures in ZBrush.

1.: http://www.philipk.net/tutorials/materials/stonerock/stonerock.html
by Philip Klevestav
This tutorial touches on some general tiling sculpting advice, so I recommend to read this first.
Summary:
– Make a plane
– Frame view and turn off perspecitve
– It may be beneficial to sculpt on a layer
– Active symmetry for left and right (probably X)
– Sculpt from the left and right edges inward
– Deactivate symmetry for left and right
– Activate symmetry for top and bottom (Y)
– Sculpt from the top and bottom edges inward
Pros:
– Relatively simple
Cons:
– Danger of visible symmetry in the final product
– Can cause geometry to deform at the edges (though that may be something you want)

2.: https://vimeo.com/2228433
by Nick Zuccarello
Very similar to method 1, but slightly more clever.
Summary:
– Make a standard ZBrush plane. In Maya (and similar) it must go from -1 to 1 in X and Y.
– Frame view and turn off perspective
– It may be beneficial to sculpt on a layer
– Activate wrap on every brush you are using (Brush->Curve->set WrapMode to 1 or higher)
– Sculpt as you please
Pros:
– Simple
– Fast
– Can be used to generate awesome “wallpapers” and patterns
Cons:
– Danger of very repetitive results
– Can cause geometry to deform at the edges (though that may be something you want)

3.: http://www.polycount.com/forum/showthread.php?t=126224
by I Fought A Bear’s Avatar
A sophisticated variation on method 2.
Summary:
– Get custom ZBrush scene from: https://www.dropbox.com/s/xwlypswv7k9sbh6/tilesculpt_template_divided.ZTL or follow
https://www.youtube.com/watch?feature=player_embedded&v=e04k4Cz8UBo to create it yourself
Summary:
– Work with wrap (like in method 2) on inner rectangle
– To get a tiling mesh out of this, you must get rid of the outer squares.
Pros:
– Simple
– Fast
– Can be used to generate awesome “wallpapers” and patterns
Cons:
– Slightly tedious to make the base setup and to cut off useless geometry at the end
– Danger of very repetitive results

4.: http://georgesokol.blogspot.nl/2014/06/tiled-sculpts-in-zbrush-using-offset.html
by George Sokol
Summary:
– Set Document size to 1024×1024 or 2048×2048 (or other square with power of 2 resolution)
– Create standard ZBrush plane (this is not optional, as it sets the frame for the rest of the work)
– Frame view and turn off perspective
– Append Subtool (for example, a Brick) and modify if necessary
– Move the Subtool over an edge of the plane with the Transpose Brush
– Open the Deformation tab in the Tool Panel, select the right axis and Offset by 100
Note: Don’t merge the duplicated subtools. In the end you could get rid of all the duplicates at the edges and you would have a perfectly tiling mesh.
– Continue adding subtools as described above till all edges are covered
– Add subtools to the free area inbetween
Pros:
– Truly 3D result
– Simple
Cons:
– Very tedious
– Danger of repetitive results around edges
NOTE: A similar process could be used in just about any other 3D application.

5.: http://www.polycount.com/forum/showthread.php?t=104372
by Nick Miller (nyx702)
This is more of a work-flow-help than a tiling sculpt creation tool. Consider it an inspiration on how to use ZBrush’s array tools.
Summary:
– Install a plug-in from https://gumroad.com/l/tilehelper and learn how to operate it based on http://youtu.be/NnQcWBRbB0M
(You add a Subtool. It gets repeated in X and Y according to your input. You can additionally let the plug-in rotate random subtools 90 and 180 degrees along the X axis. You can sculpt on the result.)
Pros:
– Fast
– Simple
– Danger of repetitive results mitigated through tiling preview
– Great for simple repetitive objects
Cons:
– Can lead to somewhat simple results
Note: Not really necessary. Similar results can be achieved with ZBrush’s array tools as well as standard tools in many 3D apps like Blender, Maya, 3DS Max, Houdini, etc.

6.: http://www.zbrushcentral.com/showthread.php?192878-NanoTile-Textures!-unofficial-Information-Installation
by Piggyson
This plug-in is intended for the creation of 3D tiling textures, but I am reasonably sure that it could be used to create tiling meshes.
Summary:
– Install a plug-in from http://www.zbrushcentral.com/showthread.php?192878-NanoTile-Textures!-unofficial-Information-Installation and learn how to operate it based on the forum posts
(When you place a subtool on an edge it will get automatically duplicated to the right spot like in method 4. The plug-in also comes with various filters for the the creation of tiling textures and the latest version of the plug-in also has an integration of method 2. )
Pros:
– Fast
– Simple
– Powerful and efficient
– Comes with awesome Filters for creating tiling textures. (Even if your final product is a complex tiling mesh, you could use the textures on planes for lower level of detail meshes.)
Cons:
– Getting an actual tiling mesh out of this requires some manual clean-up