Hi folks !
Here is a small R&D project I've been working on: Gaia Scatter. It's a toolset made of few digital assets driven by a Python interface which helps you to scatter objects on a terrain.
It allows you to have the flexibility of painting combined with the power of procedural rules.
As it's asset-based you still have a full control on what's going on. No black box here.
As said, it's still WIP / R&D and I'll test more features soon such as LOD system according to the position of the camera, variation in shaders, dynamic object layers, etc... I'll post updates of the tool here.
In the meantime, you can find the first video on my vimeo account as well as the source code / digital assets on my github ( not very commented yet tho ... ).
Showing posts with label Houdini. Show all posts
Showing posts with label Houdini. Show all posts
Tuesday, March 7, 2017
Friday, December 30, 2016
Helpcard maker for Houdini
Help card maker for houdini from Cetras on Vimeo.
Changelog:
0.9.4:
- Fix folders and multiparms random order.
- Only one instance per multiparm is added to the parameters help grid.
- Added handles on the left side of widgets to reorder widgets.
This is the first version of "Helpcard maker" for Houdini 14 to houdini 15.5.
To install it follow these steps:
- Download the lastest zip archive of the tool on my github deposit:https://github.com/GJpy/HelpCardMaker/raw/master/HelpCardMaker.zip ( github => GJpy )
- Go to your HOME folder/houdiniXX.x and unzip the file in here, you should have now few new files and folders:
scripts/python/HelpCardMaker
Changelog:
0.9.4:
- Fix folders and multiparms random order.
- Only one instance per multiparm is added to the parameters help grid.
- Added handles on the left side of widgets to reorder widgets.
This is the first version of "Helpcard maker" for Houdini 14 to houdini 15.5.
To install it follow these steps:
- Download the lastest zip archive of the tool on my github deposit:https://github.com/GJpy/HelpCardMaker/raw/master/HelpCardMaker.zip ( github => GJpy )
- Go to your HOME folder/houdiniXX.x and unzip the file in here, you should have now few new files and folders:
scripts/python/HelpCardMaker
config/Icons/helpcardmaker.png
- Launch Houdini, you'll have the Helpcard maker pypanel available and should be able to directly add a help card maker tab.
Any issue or install troubles, feel free to drop an email: contact@guillaume-j.com.
This is the first release of the tool, a lot of new features will be added shortly such as link to other pages, vimeo video, new widgets and more !
python_panels/HelpcardMaker.pypanel
- Launch Houdini, you'll have the Helpcard maker pypanel available and should be able to directly add a help card maker tab.
Any issue or install troubles, feel free to drop an email: contact@guillaume-j.com.
This is the first release of the tool, a lot of new features will be added shortly such as link to other pages, vimeo video, new widgets and more !
Thursday, December 18, 2014
Demoreel update !
Hi folks,
Here is my latest updated demoreel where I show works I have done as Lighting / Comp TD or Pipeline TD, more update to come soon !
Here is my latest updated demoreel where I show works I have done as Lighting / Comp TD or Pipeline TD, more update to come soon !
Sunday, October 5, 2014
PyTake2 create take using python in Houdini
PyTake is now completely rewritten, new version is now fully object oriented. It allows the user to create and edit takes in houdini using python.
It works with all version of Houdini (Apprentice, Apprentice HD, escape, master or Indie.) Free for all usage ( comercial or not ).
To create a new take, just instance a new Take() object :
import PyTake2 as pt
# This will create a new take and add it to the take list
myTake = pt.Take('mytake')
#This will include the display flag of the node « /obj/grid/grid1 » to the take.
myTake.includeDisplayFlag('/obj/grid/grid1')
# You can also use a hou.Node() as parameter :
node = hou.node('/obj/sphere/sphere1')
myTake.includeDisplayFlag(node)
# To include all parms of a node to the take, use :
myTake.includeParms(node)
# To add only some parameters, use :
myTake.includeParms(node, parms_dict={'radx':None, 'rady':None, 'radz':None))
# To add only some parameters, and set node's parameters values use :
# This will set radx to 5, rady to 1 and radz to 2 in the take.
myTake.includeParms(node, parms_dict={'radx':5, 'rady':1, 'radz':2),set_parms_value=True)
#To exclude parms from the take, use :
myTake.includeParms(node, parms_dict={'radx':None, 'rady':None, 'radz':None},include=False)
# To copy a take
copy_take = myTake.copy()
# => this create a new take name_copy
# To remove a take :
myTake.remove()
It works with all version of Houdini (Apprentice, Apprentice HD, escape, master or Indie.) Free for all usage ( comercial or not ).
To create a new take, just instance a new Take() object :
import PyTake2 as pt
# This will create a new take and add it to the take list
myTake = pt.Take('mytake')
#This will include the display flag of the node « /obj/grid/grid1 » to the take.
myTake.includeDisplayFlag('/obj/grid/grid1')
# You can also use a hou.Node() as parameter :
node = hou.node('/obj/sphere/sphere1')
myTake.includeDisplayFlag(node)
# To include all parms of a node to the take, use :
myTake.includeParms(node)
# To add only some parameters, use :
myTake.includeParms(node, parms_dict={'radx':None, 'rady':None, 'radz':None))
# To add only some parameters, and set node's parameters values use :
# This will set radx to 5, rady to 1 and radz to 2 in the take.
myTake.includeParms(node, parms_dict={'radx':5, 'rady':1, 'radz':2),set_parms_value=True)
#To exclude parms from the take, use :
myTake.includeParms(node, parms_dict={'radx':None, 'rady':None, 'radz':None},include=False)
# To copy a take
copy_take = myTake.copy()
# => this create a new take name_copy
# To remove a take :
myTake.remove()
Sunday, September 21, 2014
Maya / Houdini Python live connection
I'm playing a bit with rpc module and python. Here is a little example of what I've tried so far, a live connection between Maya and Houdini.
Maya looks up for Houdini start up and then connects its python to Houdini's automatically. Thanks to that, in this video, I create a "live connected" camera and I can also send meshes directly from Maya to Houdini ( and vise versa ).
This needs the rpyc module for Python 2.7 ( it is also included with Houdini ), you can downloaded it at this adress : http://rpyc.readthedocs.org/en/latest/
Maya looks up for Houdini start up and then connects its python to Houdini's automatically. Thanks to that, in this video, I create a "live connected" camera and I can also send meshes directly from Maya to Houdini ( and vise versa ).
This needs the rpyc module for Python 2.7 ( it is also included with Houdini ), you can downloaded it at this adress : http://rpyc.readthedocs.org/en/latest/
Here is the source code for the connection Maya => Houdini. It must be saved in the scripts folder of maya and used as followed from a Python shelf tool:
import MayaModule
ui = MayaModule.MayaConnectionUI()
ui.show()
You can copy the icons green_light.png and red_light.png in a folder "icons" saved in the same place as the python file.
On the Houdini side, you must have a Python file called "123.py" (or hescape.py if you use Houdini Escape ) withthese two lines of code in it:
import hrpyc
server = hrpyc.start_server(port=18812)
Saturday, August 30, 2014
Alien Isolation Trailer
A it late, but finally here is the latest trailer I worked on at Axis animation, as lighintg / compositing artist and TD ! That was almost a year ago... Good to see it online !
Tuesday, August 5, 2014
Powerful method hou.hipFile
Just a quick arcticle to speak a bit about the not well known but powerful python class hou.hipFile.
It allows you to have access, open, edit, save, merge hip file from python. For instance, you could drive Houdini from an external python tool without opening Houdini at all.
You have access then to all python methode of the Houdini module. You can export geos, do mantra rendering, create / manipulate object and otls etc.
For instance the code bellow, we will open the hip file "houhipfile.hip" and export the geo which is in that file tanks to a rop_output node, (warning this does not work with houdini apprentice):
# Here we setup the path to the HIP file as well as where you want to export the bgeo file.
PATH = r"H:/houhipfile.hip"
OUTPUT_GEO = r"H:/teapot.bgeo"
# Here we load the hip file.
hou.hipFile.load(PATH)
# Then we fetch the rop output node
ropNode = hou.node("obj/outputGeo/rop_output")
# We change the Ouput path parameter
ropNode.parm("sopouput").set(OUTPUT_GEO)
# We do the render ( exporting the geo )
ropnode.render()
# And finally we clean the current houdini session
hou.hipFile.clear()
This could be launched from any python tool, with a nice UI in PyQt for instance.
Instead of opening a hip file, you could of course create nodes from scratch:
root = hou.node("/obj")
geo = root.createNode("geo")
and then you have access to the geo node's parms, etc.
More infos here => hou.hipFile class help
And you can download the hip file as example here
It allows you to have access, open, edit, save, merge hip file from python. For instance, you could drive Houdini from an external python tool without opening Houdini at all.
You have access then to all python methode of the Houdini module. You can export geos, do mantra rendering, create / manipulate object and otls etc.
For instance the code bellow, we will open the hip file "houhipfile.hip" and export the geo which is in that file tanks to a rop_output node, (warning this does not work with houdini apprentice):
# Here we setup the path to the HIP file as well as where you want to export the bgeo file.
PATH = r"H:/houhipfile.hip"
OUTPUT_GEO = r"H:/teapot.bgeo"
# Here we load the hip file.
hou.hipFile.load(PATH)
# Then we fetch the rop output node
ropNode = hou.node("obj/outputGeo/rop_output")
# We change the Ouput path parameter
ropNode.parm("sopouput").set(OUTPUT_GEO)
# We do the render ( exporting the geo )
ropnode.render()
# And finally we clean the current houdini session
hou.hipFile.clear()
This could be launched from any python tool, with a nice UI in PyQt for instance.
Instead of opening a hip file, you could of course create nodes from scratch:
root = hou.node("/obj")
geo = root.createNode("geo")
and then you have access to the geo node's parms, etc.
More infos here => hou.hipFile class help
And you can download the hip file as example here
Tuesday, May 6, 2014
Tutorial: Python sop in houdini [ENG/FR]
French Follows!
The idea of this article is to show how to use Python in Houdini for the creation of SOP node. In order to follow this short tutorial you should know basic of Python as well as Houdini ( SOP nodes, digital assets création ... ).
You can find a ready to go otl Here, and you can download the python source code Here.
We're going to create an otl via Python which will be able to return in a point attribute the value of the angle between each edges of a ordered curve.
I insiste on that point, the curve must be ordered ! that means points order must follow the direction of the curve. To order curve's points you have multiple possibilities like sort node, nurbs UV, pathfinding etc. This might be the subject of another article later on.
This tool could be created throught vex or with normal nodes of houdini, but the point of this tutorial is to show how python works in Houdini :)
There are multiple ways to use Python in Houdini, here, we'll create a SOP node by Python.
First, we'll create that node, which is actually nothing else than a digital asset. Use the menu "File => new operator type", then select type: "Python" and "Geometry node" ( it means "SOP node" actually ).
Don't forget to put a name an label just like an normal digital asset.
A window similar to digital asset création opens, the difference is that the tab "Code" is available. This is where we will write our code.
You can see that Houdini write for us a bit of starting code :)
# This code is called when instances of this SOP cook.
node = hou.pwd()
geo = node.geometry()
# Add code to modify the contents of geo.
Houdini write what is needed in order to fetch the geometry and the node you need.
node = hou.pwd() => creates a reference to the current node ( our otl )
geo = node.geometry() => creates a reference of the geometry of the current node, this is where you can modify the actual geometru ( points, vertex, prim etc. ).
We will create also 2 parameters:
One float called "threshold" with a range from 0 to 180 and a default value at 120.
One String called "groupname", with a default value "anglegroup".
You can download the source code here, we'll have a look on that line after line:
First of all, we import all the python modules needed. You can import you custom modules as well, as long as they are saved in a folder scanned by Houdini.
import math
import numpy
As seen, we create here a reference to the current node, as well as the current geometry
The line "points = geo.points()" returns a list of all points in the current geometry.
node = hou.pwd()
geo = node.geometry()
points = geo.points()
Here we save in a variable "_threshold" the value of the parameter "threshold" exposed in our UI.
_threshold = node.evalParm("threshold")
Then we create a point group, empty for the moment and which will have the name found in the parameter "groupname".
grp = geo.createPointGroup( node.evalParm("groupname"))
We create an attribute type point which will have as name "angle" and as default value -1.0. This will allow us to save, for each points, the value of the angle found. For points which won't have angle values the attribute value will be -1.0. ( We will see later on that it's in fact, extremities of the curve)
attr = geo.addAttrib(hou.attribType.Point, "angle", -1.0)
It's here that we start to compute the angle value for each edges. We have to compute the angle between each vector 0 => 1, 2 => 1, 1 => 2, 3 => 2 etc...
Let's do a bit of math ! We have 3 points p0, p1, p2, the vector v0->1 will be compute as followed:
vx = p0x - p1x
vy = p0y - p1y
vz = p0z - p1z
Where p0x is the position.x of the point 0 etc.
For each points of the curve, we will use the current point ( i ) and also the point before ( i-1 ) and the point after ( i+1 ) on the curve.
So we will start the loop at 1 in order to skip the first point ( which is the point[0] ) and ends it at (length of the list -1) in order to skip the last point:
for i in range(1, len(points)-1):p1 = points[i-1]
p0 = points[i]
p2 = points[i+1]
Using the method Hou.Point.attribValue(name) we can access to the position values of each points. As the attribute is a vector(x,y,z) we can fetch each values separately for each points:
p0x = p0.attribValue("P")[0]
p0y = p0.attribValue("P")[1]
p0z = p0.attribValue("P")[2]
p1x = p1.attribValue("P")[0]
p1y = p1.attribValue("P")[1]
p1z = p1.attribValue("P")[2]
p2x = p2.attribValue("P")[0]
p2y = p2.attribValue("P")[1]
p2z = p2.attribValue("P")[2]
Then we calculate the vector coordinates and put them in a numpy.array()
v1 = numpy.array([p0x - p1x, p0y - p1y, p0z - p1z])
v2 = numpy.array([p0x - p2x, p0y - p2y, p0z - p2z])
Some more math ! The angle between 2 vector in radian is found by:
acos( dot(normalize(v1), normalize(v2)))
In our case the line "v1 = v1/numpy.linalg.norm(v1)" normalize our vector v1.
and "numpy.dot(v1, v2)" returns the dot product of there 2 vectors.
then, "Math.acos(x)" will return the angle in radian where x is the dot product result.
finally math.degrees(x) will convert radian value to degres angle value.
out = math.acos(numpy.dot(v1/numpy.linalg.norm(v1), v2/numpy.linalg.norm(v2)))
out = math.degrees(out)
We save the angle value in the point attribute we created:
points[i].setAttribValue(attr, out)
And as bonus, if the angle found is smaller than the threshold value, we put the current point in the point group we created.
if out < _threshold:
grp.add(points[i])
Et voilà ! Our node is ready to be used ! We could've add some other options like change the threshold test via an option "greater than or smaller than", expose a string parameter for the name of the attribut angle etc.
The node is in the tab menu at SOP level only, ready to go :)
Any questions or comments: contact@guillaume-j.com !
-----------------------------------------------------------------------------------------------------------
L'idée de ce billet est de présenter un peu l'utilisation de Python dans houdini au niveau SOP object. Ce court tutorial part du principe que vous connaissez déjà les rudiments de Python ainsi qu'Houdini (Nodes SOP, création de digital assets etc.).
Vous pouvez trouver ici un digital asset pré-fait, ainsi que le code source python ici.
Nous allons créer un otl en python qui sera capable de retourner dans un point attribute la valeur de l'angle observé entre chaques edges d'une courbe ordonnée.
J’insiste sur ce point: la courbe doit être ordonnée, c'est a dire que les points de la courbe suivent le sens de la courbe elle-même. Pour ordonner une courbe de points qui aurait des points générés de façon aléatoire, plusieur solutions s'offrent à avous: sort node via attribut, nurbs UV, path finder etc. Ceci fera peu être l'objet d'un autre billet sur ce blog.
Cet outil pourrait être créé avec des nodes "normaux" d'houdini et / ou du vex sans aucuns doutes. Mais l'idée de ce billet est bien de voir comment fonctionne Python dans Houdini :)
Il existe plusieurs façons d'utiliser Python dans Houdini, nous allons voir comment créer ici un SOP node custom en python.
Tout d'abord, créer ce fameux node qui sera en faite un digital asset (otl), par le billet du menu File => new operator type.
Selectionnez le type "Python", et également le type "Geometry node" qui correspond au niveau SOP.
N'oubliez pas de mettre un label et un nom comme un digital asset normal et sauver le.
Une fenêtre comparable à la fenêtre de création de digital assez s'ouvre, la différence est que le tab "Code" est disponible, c'est ici qu'on va pouvoir écrire le code Python.
Vous pouvez d'ailleurs voir qu'on code par défaut a été écrit:
# This code is called when instances of this SOP cook.
node = hou.pwd()
geo = node.geometry()
# Add code to modify the contents of geo.
En effet, Houdini écrit pour nous les bases nécessaires à la création de notre node:
node = hou.pwd() => créer une référence au node courant ( notre otl ).
geo = node.geometry() => créer une référence à la géometry courante, c'est ici que sont fait toutes les manipulation sur la géometrie de notre input, au niveau vertex, points, primitives etc.
Nous allons également créer un paramètre "threshold" en float avec un range de 0 à 180, qui nous sera utile par la suite.
Créez également un paramètre string "groupname" avec en valeur par défault "anglegroup".
Vous pouvez télécharger le code source du node ici. Nous allons détaillé ce code ligne par ligne:
Tout d'abord on importe les modules nécessaires, math et numpy. Vous pouvez ici importer toutes sortes de module, interne à Pyhton ou écrites par vous même si elles sont placées dans un dossier scanné par houdini.
import math
import numpy
Comme vu plus haut, on créer des références au node courrant ainsi qu'à la géométrie courante.
La ligne "points = geo.points()" retourne une liste contenant tout les points de la géométrie.
node = hou.pwd()
geo = node.geometry()
points = geo.points()
Ici nous allons enregistrer dans une variable "_threshold" la valeur de notre paramètre threshold qui sera exposé dans l'interface de notre otl.
_threshold = node.evalParm("threshold")
Nous créer ensuite un group de points ( pour le moment vide ), et qui aura comme nom la valeur de notre paramètre "groupname"
grp = geo.createPointGroup( node.evalParm("groupname"))
A cette ligne nous créons un attribute de type point qui aura pour nom "angle" et comme valeur par défaut -1.0. Cela nous permettra de sauvegarder, pour chaque points, la valeur d'angle que l'ont va trouver dans cet attribute. Pour les points qui n'auront pas de valeur d'angle, l'angle restera à -1. ( Nous verrons plus loin qu'il s'agit en faite des extrémités de la courbe.
attr = geo.addAttrib(hou.attribType.Point, "angle", -1.0)
C'est ici que l'ont commence à calculer l'angle pour chaque edge. Il s'agit de calculer l'angle entre les vecteurs entre les points 0 et 1 et 2 et 1, 1 et 2 et 3 et 2 etc...
Un peu de math ! Nous avons 3 points p0, p1, p2, le vecteur v0->1 sera calculé de la sorte:
vx = p0x - p1x
vy = p0y - p1y
vz = p0z - p1z
Ou p0x est la position en x du point 0 etc...
Pour chaque point de la courbe nous allons traiter le point courant ( i ), mais également le point d'avant ( i-1 ) et le point d'après ( i+1 ) sur la courbe. Nous allons donc faire commencer la boucle à 1 pour ignorer le premier point ( qui aura donc une valeur par défaut d'angle de -1.0) et la finir à la longeur de la liste - 1 pour ignorer également le dernier point de la courbe.
for i in range(1, len(points)-1):
Ici nous mettons dans des variables px les points correspondants.
p1 = points[i-1]
p0 = points[i]
p2 = points[i+1]
Grâce à la méthode Hou.Point.attribValue(name) nous pouvons accéder aux valeur de position de chaque points, comme l'attribut en question est de type vector(x,y,z) nous pouvons récupérer les valeurs d'x, y et z séparéments pour chacun des trois points:
p0x = p0.attribValue("P")[0]
p0y = p0.attribValue("P")[1]
p0z = p0.attribValue("P")[2]
p1x = p1.attribValue("P")[0]
p1y = p1.attribValue("P")[1]
p1z = p1.attribValue("P")[2]
p2x = p2.attribValue("P")[0]
p2y = p2.attribValue("P")[1]
p2z = p2.attribValue("P")[2]
Nous calculons ensuite les coordonnées des vecteurs qui nous intéressent et les mettons dans une variable numpy.array().
v1 = numpy.array([p0x - p1x, p0y - p1y, p0z - p1z])
v2 = numpy.array([p0x - p2x, p0y - p2y, p0z - p2z])
Encore des math ! L'angle en radian entre deux vecteurs est calculé comme ceci:
acos( dot(normalize(v1), normalize(v2)))
Dans notre cas la ligne "v1 = v1/numpy.linalg.norm(v1)" normalise notre vecteur v1.
Puisqu'on utilise le module numpy, numpy.dot(v1, v2) retournera le dot product nécessaire.
Math.acos(x) retournera la valeur en radian en partant d'un valeur x ( généré par notre dot product précédent )
Pour finir, math.degrees(x) convertie une valeur x en radian en une valeur d'angle en degrés.
out = math.acos(numpy.dot(v1/numpy.linalg.norm(v1), v2/numpy.linalg.norm(v2)))
out = math.degrees(out)
Nous enregistrons la valeur trouvée d'angle dans l'attribut "angle" créé précédemment.
points[i].setAttribValue(attr, out)
Et en bonus, si l'angle trouvé est inférieur à l'angle indiqué dans le paramètre threshold, nous ajoutons le point courant dans le group créer au début du node.
if out < _threshold:
grp.add(points[i])
Et voilà notre node est prêt à être utilisé ! Nous aurions pu ajouter d'autres options comme changer le test du treshold via un paramètre ( greater than, or smaller than ), un paramètre exposé pour le nom de l'attribut angle etc.
Votre node se trouve maintenant dans le menu tab si vous êtes en SOP level ! :)
Des questions ou remarques: contact@guillaume-j.com !
Wednesday, April 9, 2014
Houdini OTLcheck python script
Here is a simple python script for Houdini, OTLCheck
This script allows the user to check which sub-otl(s) are used inside a selected otl.
It checks all sur subchildren nodes and will print a list of otls and path in the console or in the python shell.
If the otl uses a uncomplete asset definition the script will output a warning:
WARNING: node <node path>, is embedded.
The script skips all otls lib built-in shipped with Houdini.
This script allows the user to check which sub-otl(s) are used inside a selected otl.
It checks all sur subchildren nodes and will print a list of otls and path in the console or in the python shell.
If the otl uses a uncomplete asset definition the script will output a warning:
WARNING: node <node path>, is embedded.
The script skips all otls lib built-in shipped with Houdini.
Saturday, March 8, 2014
Houdini Engine test with Unity
Here is a work in progress tool in order to test the Houdini Engine with Unity.
This tool helps the
user to create different and procedural kind of "labyrinth-type"
level designs in Unity by using Houdini Digital asset ( .otl ).
Features:
- Create 3 type of labyrinth models with Straight modules ( full instancied models), Vegetal, or "random direction vegetal".
- Extra path inputs as houdini curves directly in Unity.
- Project Vegetal and "Random direction vegetal" model on custom terrain mesh.
- Create a player starting point randomly in the labyrinth.
- Override every models used as instance to built a new labyrinth model ( Labyrinth modules or trees models for Vegetal type ).
- Density, radius, etc. Options for vegetal labyrinth.
Video example:
Saturday, February 8, 2014
Houdini OTL: Layered Texture
Here is a new little asset, still work in progress, Layered Texture.
Allows the user to create a texture map made of multiple layers inside a material.
Parameters:
- 1 Main layer called "base map", UVs built switch with transforms for main layer
- Layers:
Layer 0 on top of main layer ( generated by default )
Add / remove / clear layers button to add layers.
Enable / Disable layer checkbox
Mode: Multiply, Substract, Mix and Add
UVs transformation for each layers
Layers are comped on top of each other: L2 on L1 (...) on L0 on MAIN.
Python source code available here
Allows the user to create a texture map made of multiple layers inside a material.
Parameters:
- 1 Main layer called "base map", UVs built switch with transforms for main layer
- Layers:
Layer 0 on top of main layer ( generated by default )
Add / remove / clear layers button to add layers.
Enable / Disable layer checkbox
Mode: Multiply, Substract, Mix and Add
UVs transformation for each layers
Layers are comped on top of each other: L2 on L1 (...) on L0 on MAIN.
Python source code available here
Wednesday, November 27, 2013
Python SOP node: Connectivity merge groups
Here is a custom python SOP node which merges groups together if they are not connected to each other.
Pattern: Groups used as input
Ouput Groups: Create new groups with merges groups
Keep Old: Keep old groups
If interested the python source code is availaibe here: Python Source Code
Download Connectivity Merge Groups
Parameters:Pattern: Groups used as input
Ouput Groups: Create new groups with merges groups
Keep Old: Keep old groups
If interested the python source code is availaibe here: Python Source Code
Saturday, November 16, 2013
WallGen - Voronoï - Houdini otl
Here is a new tool, derived from the fist WallGen otl. This one use Voronoï noise pattern in order to create 3D rough wall.
It takes as input either a closed geo, opened geo, or curve ( must be one primitive poly or nurbs curve ).
Options:
Input:
Edit mode: Hides the wall to have very fast feedback when you change input options ( for instance size of the mesh generated from the curve input ).
Input: Switch to different kind of inputs => closed geo, opened geo, or curve.
Inset (Opened geo only): Applies inset to the input polygons
Width(Curve only): The width value of the mesh generated by the curve.
Heigth(Curve only): The heigth value of the mesh generated by the curve.
UV scale (Curve only): The scale of the uvs applied to the mesh.
Wall Controls:
Density: Density of the noise pattern
Density Attribute: Point attribute used to drive the density
Density Noise: Create a density attribute according a noise pattern (new)
Density Noise Size: Size of the noise pattern (new)
Density Noise Density: Density of the noise pattern (new)
Bias: Bias of the density attribute higher value will increase the density where the density attribute value is the higher.
Bevel: Applies bevel on the pieces generated ( relative ).
Smooth: Applies mesh smooth on pieces generated.
Erode top: Erode top of the wall according to an angle value ( N.y ) (new)
Erode angle: Angle value of erode process (new)
UV Scale: Scale the UVs applied on each pieces.
Keep Input Geo: Keep the input geo underneath the wall pieces.
Peak Geo: Peak value applied to the input geo.
Scale Geo: Uniform scale applied to the input geo ( pivot at centroid ).
Holes: Create holes on the geometry (new)
Export:
Export Groups: Put every pieces generated into a different primitive group.
Path: Output path ( must end with ".obj" )
Export: Export the mesh.
Options:
Input:
Edit mode: Hides the wall to have very fast feedback when you change input options ( for instance size of the mesh generated from the curve input ).
Input: Switch to different kind of inputs => closed geo, opened geo, or curve.
Inset (Opened geo only): Applies inset to the input polygons
Width(Curve only): The width value of the mesh generated by the curve.
Heigth(Curve only): The heigth value of the mesh generated by the curve.
UV scale (Curve only): The scale of the uvs applied to the mesh.
Wall Controls:
Density: Density of the noise pattern
Density Attribute: Point attribute used to drive the density
Density Noise: Create a density attribute according a noise pattern (new)
Density Noise Size: Size of the noise pattern (new)
Density Noise Density: Density of the noise pattern (new)
Bias: Bias of the density attribute higher value will increase the density where the density attribute value is the higher.
Bevel: Applies bevel on the pieces generated ( relative ).
Smooth: Applies mesh smooth on pieces generated.
Erode top: Erode top of the wall according to an angle value ( N.y ) (new)
Erode angle: Angle value of erode process (new)
UV Scale: Scale the UVs applied on each pieces.
Keep Input Geo: Keep the input geo underneath the wall pieces.
Peak Geo: Peak value applied to the input geo.
Scale Geo: Uniform scale applied to the input geo ( pivot at centroid ).
Holes: Create holes on the geometry (new)
Export:
Export Groups: Put every pieces generated into a different primitive group.
Path: Output path ( must end with ".obj" )
Export: Export the mesh.
If need more help: contact@guillaume-j.com
Thursday, July 18, 2013
GJ Attribute Math ( Houdini )
Here is a new utility .otl: AttributeMath
Format: Houdini .otl (Digital asset)
Feature:
SOP node which allow the user to do math operation between 2 attributes.
Where A is an attribute and B is either an attribute or a constant, you can do:
- A - B
- A + B
- A * B
- A / B
- A % B (modulo)
- Remap A values according to a ramp
- Fit Range A values
Output values are stored in either attribute A or in a new attribute.
Feature:
SOP node which allow the user to do math operation between 2 attributes.
Where A is an attribute and B is either an attribute or a constant, you can do:
- A - B
- A + B
- A * B
- A / B
- A % B (modulo)
- Remap A values according to a ramp
- Fit Range A values
Output values are stored in either attribute A or in a new attribute.
Examples:
Add:
Multiply by a constant:
Remap values by a ramp:
Thursday, July 11, 2013
GJ Attribut Visu ( Houdini )
Here is a new simple utility otl, AttributVisu.
Simple SOP node which allows the user to visualize attributs ( point, vertex, primitives and details ) in 3D view via a ramp color.
Support any type of regular / custom attributs.
Simple SOP node which allows the user to visualize attributs ( point, vertex, primitives and details ) in 3D view via a ramp color.
Support any type of regular / custom attributs.
Sunday, July 7, 2013
GJ Isolate Selection ( Houdini )
Here is another utiliy: Isolate selection for Houdini
This python script allows the user to isolate an object ( by hiding all others ). Then to display back the objects when you exit the isolate mode.
The script keeps in memory which nodes were displayed or hidden before the isolate process. ( it uses a hou.session python module ).
Python Script for Houdini
How to use:
- Copy the .py file in "C:\Program Files\Side Effects Software\Houdini XX.X.xxx\python26\lib" or whatever python folder used by Houdini
- Create a new tool in a shelf: Right-clic -> new tool
- In tab "Script" write these two lines:
import IsolateSelection
reload(IsolateSelection)
Select an object to isolate that object by a clic on the tool just created, clic again on that tool to display back all other nodes.
This python script allows the user to isolate an object ( by hiding all others ). Then to display back the objects when you exit the isolate mode.
The script keeps in memory which nodes were displayed or hidden before the isolate process. ( it uses a hou.session python module ).
Python Script for Houdini
How to use:
- Copy the .py file in "C:\Program Files\Side Effects Software\Houdini XX.X.xxx\python26\lib" or whatever python folder used by Houdini
- Create a new tool in a shelf: Right-clic -> new tool
- In tab "Script" write these two lines:
import IsolateSelection
reload(IsolateSelection)
Select an object to isolate that object by a clic on the tool just created, clic again on that tool to display back all other nodes.
Wednesday, July 3, 2013
GJ Slope ( Houdini )
I'm starting a new collection of utilities otls for houdini, here is the first one, called GJ_Slope.
It's a simple node which create a custom attribut driven by the slope of a surface.
Feature:
- Custom attribut name
- Ramp multiplicator
- Display value to Color ( Cd )
- Mult / Add by constant
- Invert value
It's a simple node which create a custom attribut driven by the slope of a surface.
Feature:
- Custom attribut name
- Ramp multiplicator
- Display value to Color ( Cd )
- Mult / Add by constant
- Invert value
Monday, November 26, 2012
PyTakes for Houdini
Hi everybody,
As I don't really like the hscript command hou.hscript in order to drive takes creation in houdini, I decided to create my own python module for that.
So here is the really first version of the module, you can drive takes creation, remove, setup, etc. by python.
In the help .pdf you can find fonctions already implemented :
How to use:
Just copy the PyTakes.py file in "houdini_Install_Dir/houdini/python2.6libs" then in houdini juste import the module as normal python module with "import PyTakes".
Exemple to create a new take called "occlusion" and assign few parameters on this take:
#Import the PyTakes module
import PyTakes as pt
#Create a new take and change the current take to that new take
pt.createTake("occlusion", change=True)
#Include parameters "shading_quality" and "occlusion_shader" of object "groundGeo" to the current take.
pt.includeParm("obj/groundGeo", ["shading_quality","occlusion_shader"] )
#Include display flag to the current take and set it to "True"
pt.includeDisplayFlag("obj/groundGeo", autoSet=True, value=True)
The script allows list as input for object and parameters:
#Include parameters "shading_quality" and "occlusion_shader" of objects geo1 and geo2
#If an object or a parameters is not found, it will be skipped ( a warning promps if verbose=True )
pt.includeParm("[obj/geo1",obj/geo2"], ["shading_quality","occlusion_shader"] )
As I don't really like the hscript command hou.hscript in order to drive takes creation in houdini, I decided to create my own python module for that.
So here is the really first version of the module, you can drive takes creation, remove, setup, etc. by python.
In the help .pdf you can find fonctions already implemented :
How to use:
Just copy the PyTakes.py file in "houdini_Install_Dir/houdini/python2.6libs" then in houdini juste import the module as normal python module with "import PyTakes".
Exemple to create a new take called "occlusion" and assign few parameters on this take:
#Import the PyTakes module
import PyTakes as pt
#Create a new take and change the current take to that new take
pt.createTake("occlusion", change=True)
#Include parameters "shading_quality" and "occlusion_shader" of object "groundGeo" to the current take.
pt.includeParm("obj/groundGeo", ["shading_quality","occlusion_shader"] )
#Include display flag to the current take and set it to "True"
pt.includeDisplayFlag("obj/groundGeo", autoSet=True, value=True)
The script allows list as input for object and parameters:
#Include parameters "shading_quality" and "occlusion_shader" of objects geo1 and geo2
#If an object or a parameters is not found, it will be skipped ( a warning promps if verbose=True )
pt.includeParm("[obj/geo1",obj/geo2"], ["shading_quality","occlusion_shader"] )
Sunday, January 22, 2012
GJ cloud Houdini .otl
Here is a new .otl for houdini, to help the creation of volume effect such as clouds and fog !
Features :
- Noise based volume clouds
- i3d import for density
- 2 levels of noise
- "Fog mode" to create layered fog
- Realtime feedback in the viewport !
Features :
- Noise based volume clouds
- i3d import for density
- 2 levels of noise
- "Fog mode" to create layered fog
- Realtime feedback in the viewport !
Thursday, December 22, 2011
Subscribe to:
Posts (Atom)























