Plain Houdini tricks in Softimage style, Volume 00001

Forum for users who have migrated or are migrating to Houdini
User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 06 Feb 2015, 23:10

Hello :)

Just wanted to share some of small learning exercises, I've created in last few months. As some of us already knows, Houdini networks does not contains only nodes, and these nodes aren't actually nodes we know from Softimage ICE, Softimage Render Tree or Maya Bifrost, they are more like nodes from compositing app. Everything seems to be present in usual Houdini network. Expressions, code wrangling, scripting of all kind, parameters, what else not. More ever, Houdini community seems to be proud to show just every aspect of Houdini, even for simple tasks, in ICE usually solved by some stupid simple compound, able to download somewhere.
I've just tried to build a small tent, having some familiar things inside, somewhere in wonderful Houdini ... jungle. That's all.
By the way, just figured out, how all three examples are somehow.. "patterned", well no big deal to fit into this in H. Believe me, I also have some a bit randomized, too :)


1: Group, or Cluster

Image

Let's start with something familiar. Here's typical procedural modeling task - how to create a solid structure in fishnet style, from thick, planar polygons. First one of this kind I've created in Softimage XSI. Perhaps it's possible to do this in any poly modeling app, today. Network of Houdini SOP nodes looks similar to operators, someone will use in Softimage for this purpose. Divide edge, poly bevel on points for first rounding, inset the polygons to get first thickness, subdivide to smooth them all, poly extrude to get solid mesh.
Except one node: Group. By Houdini docs, Group 'generates groups of points, primitives, or edges according to various criteria'. It's comparable to cluster in SI, but in Houdini, "cluster" is, let's say, dynamic. It's really comprehensive operator, able to select by ID pattern, by custom attribute, by expression, by volume of another object, by open edges, so on. It can combine previously created groups, convert to another type, for example form point to polygons. And more, including ability to get the manual selection.
Later, group could be used to define the area affected by another SOP, it could be imported into VOP network, too. Some surface operators are able to create groups, like front, side or back group from Poly Extrude SOP, or hit points from Ray SOP. Ray SOP is similar to SI Shrinkwrap operator.

Here's group for isolating the polygons with more than four corners, for later use by Poly Extrude SOP. $NVTX expression means, number of vertices in polygon.

Image

Now I think there is time for short glossary on Houdini - Sotimage route.

Vertex = Polygon corner, polygon node. Usually used in SI for storing the vertex colors or UV sample points.
Point = Point.
Primitive = Unit of geometry above points: polygon face, subcurve, NURBS subsurface.
Detail = whole geometry. Yes exactly that...


2: Attribute, parameter, get set data, import and export

In Softimage ICE and Houdini, we are using node networks to manipulate the attributes. Definition from Houdini docs, "Attributes are named values stored on vertices, points, primitives, and objects" applies to Softimage ICE as well. However, the way how to create and manipulate the attribute, it's different. In ICE there is unified way, we have get - set data nodes, result is plugged into ICE root node. In Houdini, it's not that simple. Perhaps the most common method for creating attribute, is "Attribute Create" SOP node.
Anyway I'll try to suggest the ICE - like method, 'enough good to live with it' also in fashion of Houdini 14. As we already know, VOP SOP is hidden in v14. When trying to put the "Add Attribute" into suggested Attribute VOP, Houdini mentioned 'Bind Export" VOP as faster option. So, we will be around Attribute VOP and Bind Export.

Image

In image, there's new V14 feature, 'relax' feature of Scatter SOP. Scatter SOP is similar to ICE's "Generate Sample Set". "Relaxation" is one of methods to get the uniform, 'blue noise' distribution. In ICE, for some reason, more popular method to get blue noise is a 'dart throw'.

Image

Here is polygonal sphere for start. "Mountain" node in Houdini could be called "Push by Turbulence" in ICE."Attribvop_density" uses some turbulent noise to set the custom attribute called 'my_density'. Scatter SOP uses 'my_density" for variable distribution. Later, "attribvop_scale" gets the "my_density" to calculate the appropriate scale. "Copy" SOP creates copies of another sphere, on points created by Scatter SOP.
Behavior is somehow typical to Houdini: attribute created somewhere earlier in network, dictates the behavior of SOP node, applied later. SOP node won't tell you what forced it to behave differently. In other word, once you're in Houdini, I'd say, first do a search for attributes, do not looking into parameter view that much.
Same applies to simulation network. Frequently, parameters in DOP (dynamic) network are inherited from attributes set on 'static" geometry. Perhaps nothing new for ICE users, it reminds to set data in un - simulated ICE tree, for later use in simulated ICE tree. However in Houdini, sometimes, previously created attribute acts as multiplier, sometimes is sort of override.

So how to find what attributes are running around. Simplest way: MMB on node to get the node info.

Image

Between other info, node info tells about 'my_density' float (f is for float) attribute.

Take look into Attribute VOP. As it is noticeable, there is no equivalent of "ICE root" node. Some default inputs and outputs are there, but this is not everything.
There's 'parameter' node called 'turbulence_scale', this time used for controlling the turbulence scale. Parameter node in Houdini is able to act as ICE get data and ICE set data. Or, just as plain parameter (that is, not an attribute), living only 'on' VOP node. And here's another Houdini specific behavior: Parameter node, or Ramp parameter (Gradient or function Curve in ICE) displays their control 'on top' of VOP node. We have to close the VOP node, to be able to use them.

Image

We also see the "bind export" which acts as sort of "set data". By default, it's set to "Set Parameter Attributes", also it's set to export. 'Export' could be translated
as 'able to live out of VOP node', or "it sets an attribute".

Image

And 'get data' in later VOP called "attribvop_scale". Because parameter of "my_density" name already exists, this time operator references it and now has functionality of ICE's GET data.
Consequently, some nodes are able to "import" attribute data for use in VOP node. From another node or even geometry on hard disk. For example, if we want the effect of ICE 'ID to location' we'll use "Import point attribute" node.

Image

Short glossary of attribute names:
P = position
N = normal
v = velocity
Point Number = Point ID
Cd = color
Scale = particle or instance/copy scale
pscale = particle size

*note: I intentionally mentioned 'position' instead of 'point position'. That is, if Attribute VOP binds to primitives, exported P attribute is center of primitive, let's say center of polygon. If it binds to detail, P attribute is average of all points - similar to what we already know in ICE as "get set average" of all points.

Tips:
- One VOP node = one evaluation. Using many VOP nodes one after another, actually IS a good idea. It allows Houdini to optimize and do multi threading as he wants.
- Houdini is case sensitive. my_density and mY_density is not the same.
- There are no limits of ICE "switch context" in Houdini. No big deal to get the "polygon position" from another operator, and use it in VOP which binds to points.
If there is no polygon with called polygon number, Houdini just do nothing in this case.


3: Copy to polygons, Primitive Attribute or UV to location


One really frequent SOP node in Houdini is "Copy" node, which created copies on points of another geometry. Great, but how about copy to polygons. I think I found a dozen or two of methods. So here is yet another one, I'd believe a good example for "Primitive Attribute" as something *close* to ICE "UV to Location". Just close, anyway. In case of NURBS surface or curve it works in pretty much same way. But, "Primitive Attribute" works with polygons, too ( as it is mentioned, polygon face is a kind of "primitive". In case of polygons, UV means uv parametric location, not uv texture projection. That is, relative cord inside four corners of polygons. Node is able to work with triangles, pentagons and more, too. But just for now, I decided to stay with quads.

Image

I've used "point generate" SOP node to create "matching" of point count, to count of polygons in reference geometry. Of course there are another ways to do the same, but this method somehow reminds to "matching", we like to use in ICE: get number of polygons in mesh, build array of same size, use ID to align the position and everything else. Expression in 'Number of Points" in Point Generate node, means 'number of primitives in any name of node connected to first ( zero) input".

Image

So another utilization of "Copy" node is here, with pre defined attributes.

Image

Attribute VOP called "attribvop_set_attribs", contains several "Primitive Attribute" nodes, actually more than we need for plain copy and align to polygons. Some of them are for getting the effect of "one segment lattice deformation" so each copied geometry is sheared, if needed, in order to perfectly fits into polygon.
Last node, called "post transform" contains another interesting Houdini VEX nods, "Make Instance Transform". This is one is able to reconstruct the transform of instance /copy, so 'local transform" could be applied even after something is copied or instanced. Actually, entire network could be done in different and faster way, by using a "Duplicate" SOP, taking the all attributes by what we know as modulo trick in ICE. Anyway this is just an example.


Image

So that's it, this time. Get hiplc files, here.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

NNois
Posts: 706
Joined: 09 Jun 2009, 20:33

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by NNois » 07 Feb 2015, 10:47

thank you so much !

User avatar
Rork
Posts: 1297
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Rork » 07 Feb 2015, 22:13

\:D/ :-bd \m/ and so forth....

keep 'm coming, great to see these things rolling in :-)

rob
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ

User avatar
SamHowell
Posts: 364
Joined: 09 Jun 2009, 14:09
Location: Birmingham

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by SamHowell » 08 Feb 2015, 11:08

Holy sh1t Mathaeus!

Wow, so much here. Thankyou so much.

User avatar
Werner
Posts: 157
Joined: 09 Jun 2009, 13:30

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Werner » 18 Feb 2015, 10:14

Awesome Mathaeus! Thanks for the files, I'm digging through them now.

My findings are the same. In Houdini you don't look for a specific boxed-in way of doing things...you find multiple ways as you move along.

I like the copy to prims example. Lots of control.

Here is a quick and nasty way without all the power.
You do not have the required permissions to view the files attached to this post.

User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 18 Feb 2015, 23:54

Werner wrote: My findings are the same. In Houdini you don't look for a specific boxed-in way of doing things...you find multiple ways as you move along.
Well nice if you recognize it in this way. But, I really need to say,'multiple way of doing things', this was great for me, in times of XSI 4 and my naive addiction to this software. Today in 2015, 'multiple way of doing things', somehow too easy turns into 'four or five convoluted ways to do the same thing, but no one even close to quality and speed of this ot that Maya or Max plugin'. Especially in Houdini. Plus inevitable desperate 'flexibility' argument, usually about something completely irrelevant.

Anyway there are another aspects of my Houdini story, hopefully. Like upcoming connection to Cinema 4d, as an real 3d application, able to extend this little piece of Houdini magic, instead of so typical Houdini's long stories about everyday simple tasks, meaning two second procedures in everything else.

Finally, great timing of v14, for SI users who considers it as 'friendly to SI', for some unknown reason. I'd say, just in time before AD 2016 series, to get SI people disappointed and tired by H, enough to accept the truth how Maya is not that bad, a least not compared to H. This alone is great contribution. A bit brutal, but worked for me at least, to move on in proper direction, to Maya.

Back to business, next one should be about H equivalent of ICE's 'Get Closest location', goal is to create something like thing in pic bellow. Just one item this time, but a bit longer one. I hope I'll put it here, this or next weekend.

And, final one, about VDB in H - how it can be used for polygon modeling, not about clouds and smokes. Hope I'll put this, last one, before day of AD releases. After AD releases, of course I don't believe I'll have a significant time for H. So next iteration somewhere in summer, maybe - if there will be anything to say.

Image
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

NNois
Posts: 706
Joined: 09 Jun 2009, 20:33

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by NNois » 19 Feb 2015, 10:44

Mathaeus wrote:Finally, great timing of v14, for SI users who considers it as 'friendly to SI', for some unknown reason. I'd say, just in time before AD 2016 series, to get SI people disappointed and tired by H, enough to accept the truth how Maya is not that bad, a least not compared to H. This alone is great contribution. A bit brutal, but worked for me at least, to move on in proper direction, to Maya.
just to be OT one second, there is some info hidden in there or what ? do you think they will sort the big big gap who exist between maya and soft. I mean, a proper outliner, a proper visual pass system, a proper overriding system etc etc...

I mean, houdini is very close to that in the contrary to maya. Just by looking at files who Maya users and max users send to me tells me more about the flat messd software they use

User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 19 Feb 2015, 15:02

NNois wrote: just to be OT one second, there is some info hidden in there or what ? do you think they will sort the big big gap who exist between maya and soft. I mean, a proper outliner, a proper visual pass system, a proper overriding system etc etc...
I don't know. But, first of all, a bit of Houdini experience helped me to figure out, how every transition means only loosing, in start, or maybe forever. For small example from 'our home' first, recently mentioned POV-Ray on this forum, reminded me how I simply had to forget a feasible radiosity rendering in Softimage XSI 4, 5, 6... while the same feature was possible ( and perfectly feasible if I had a time to wait) in open source renderer of this time. But it, was motivation to learn something about transformations, rigging and so on.

Regrading 'hidden' info :) first unpleasant thing in H, was a fact, still present and well known, that H and Mantra is able to render the huge count of curved hairs, only as procedural, render time feature, which (still) means to hell unpleasant setup of about four instances and very precisely connected network of up to four shaders. Next one, the fact that, even Mantra is close to Renderman technology - it shows unbelievable long parsing time, when it comes to render time subdivision of even around 1mio poly ( almost minute just for parsing, in some cases).
But, why I should bother with both, when free 3delight for Maya performs both tasks in seconds - and perhaps two dozens of another renderers available for Maya, but not for Houdini.
Long story short, I think everyone who is not guided by irrational hate against Maya, will figure out how it's so much easier for SI individual user to put Maya "on the road", instead of Houdini.

After all, should we put the burden of all our irrational expectations on Houdini shoulders, or it's better to take Houdini - as Houdini, use it for what it does best, and do not expect impossible from him - to be "closer" to SI, with "ours", "only proper" ideas, how rendering should like.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

nodeway

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by nodeway » 19 Feb 2015, 16:37

Mathaeus wrote:
NNois wrote: After all, should we put the burden of all our irrational expectations on Houdini shoulders, or it's better to take Houdini - as Houdini, use it for what it does best, and do not expect impossible from him - to be "closer" to SI, with "ours", "only proper" ideas, how rendering should like.
Vray and Octane is coming to Houdini. Arnold is there. Just saying ;)

User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 19 Feb 2015, 21:33

mantragora wrote:
Vray and Octane is coming to Houdini. Arnold is there. Just saying ;)

Yeah I sow screenshot from Vlado's machine, hope this time it will go little bit faster than in Softimage case. For SI it took around five years from screenshot to usable version. Arnold somehow doesn't fit into my budget, Octane.... still no full featured, no volumes yet, I think.

I would really like to see improvements in Mantra, as it is really nice renderer (if former POV-Ray addict like me, considers some renderer as 'nice', then it really is nice and much more, simply as that :) )

However really bad surprise is, that 3d app who references everything on disk, simply has no built-in manager of all these references, nothing more than pre - flight thing. Hard to imagine using it on game level with hundreds of textures, which suddenly have to change from tif to png, or something like. In SI, action is a plain search and replace in External files manager.

Another bad surprise is lack of script log, as a proven 'starter' for scripting. SI, Maya, Max if you enable it, have it...

And, complete transformation system, don't know what to say.... Built in look at and path constrain are a sort of 'parent transformation' , local SRT stays at zero regardless of constraint. No way to weight them, and how to weight them if there is no counterpart. While CHOPs seems to work as local transform - so, if I apply the 'lag' CHOP on something in hierarchy, using motionFX, H admirably creates entire chain of compensations. Great act from his side, but what I can do with all these nodes, later.
Tried just for test, to build entire transformation system in Attribute VOP and just transfer SRTs through geometry chop, worked nice - but, just to re-construct the level I already have in SI (not the same thing of course, just functionality), task sounds like adventure, while I really don't see too much (euphemism..) of real implementations, even not some nice, unconventional, Houdini style method. Seeing the more or less classic rigs in totally unconventional Houdini, what a disappointment. While Maya is more or less a 'mirror' of SI - really not hard to put things where they are expected to be. Blender too, a kind of charming simplification of SI.

For end of long story, VOP - SOP - DOP part is nice, a bit harder than ICE in start, but wider and stronger. 'Approved' by my minority :) And this itself is enough of material for loooong time.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

nodeway

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by nodeway » 19 Feb 2015, 22:38

Mathaeus wrote: And, complete transformation system, don't know what to say.... Built in look at and path constrain are a sort of 'parent transformation' , local SRT stays at zero regardless of constraint. No way to weight them, and how to weight them if there is no counterpart. While CHOPs seems to work as local transform - so, if I apply the 'lag' CHOP on something in hierarchy, using motionFX, H admirably creates entire chain of compensations. Great act from his side, but what I can do with all these nodes, later.
Tried just for test, to build entire transformation system in Attribute VOP and just transfer SRTs through geometry chop, worked nice - but, just to re-construct the level I already have in SI (not the same thing of course, just functionality), task sounds like adventure, while I really don't see too much (euphemism..) of real implementations, even not some nice, unconventional, Houdini style method. Seeing the more or less classic rigs in totally unconventional Houdini, what a disappointment. While Maya is more or less a 'mirror' of SI - really not hard to put things where they are expected to be. Blender too, a kind of charming simplification of SI.
Maybe you should find some Houdini rigger to talk about your problems? We got one that worked on "The Wild", which was animated in Houdini. Search for Arctor on Odforce. He is a Houdini full time rigger.
There are couple other guys that rigged in Houdini, one that used Maya, Soft and couple others, and he was really impressed by Houdini rigging capabilities. Can't remember his name right now, but I'm sure that someone on Odforce remembers him.
Mathaeus wrote: However really bad surprise is, that 3d app who references everything on disk, simply has no built-in manager of all these references, nothing more than pre - flight thing. Hard to imagine using it on game level with hundreds of textures, which suddenly have to change from tif to png, or something like.
Last time I touched any Autodesk app was a long time ago, but I suppose you want something similar to 3dsmax Asset Tracker?

1. Well, expressions and channel referencing is something you should use very often in Houdini to solve things like those. Using variables is a norm too (both, system and in program ones). What's the problem with changing extensions based on some switch?
2. Have you checked Parameter Spreadsheet?
Mathaeus wrote: Another bad surprise is lack of script log, as a proven 'starter' for scripting. SI, Maya, Max if you enable it, have it...
This is topic for you => https://www.sidefx.com/index.php?option ... ic&t=31193

User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 19 Feb 2015, 23:25

mantragora wrote: Maybe you should find some Houdini rigger to talk about your problems?
Whatever it sounds, I'd say it directly. Houdini problem, not my problem. One day, I'm pretty sure they'll try to fix their SRT system. Every app has some movie, alone this is irrelevant.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

nodeway

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by nodeway » 20 Feb 2015, 01:53

Mathaeus wrote:
mantragora wrote: Maybe you should find some Houdini rigger to talk about your problems?
Whatever it sounds, I'd say it directly. Houdini problem, not my problem. One day, I'm pretty sure they'll try to fix their SRT system. Every app has some movie, alone this is irrelevant.
There is Houdini rigging course on 3DBuzz, and the guys that made it is a Maya/Houdini technical rigger. So he got plenty experience with both apps. I never heard him complaining that there is something wrong with SRT in Houdini.

This is not a Houdini problem. And you even proved this by not checking why Houdini doesn't have script editor like other viewport centric applications have. Houdini is not a viewport centric app and you just don't like this. One day, I'm pretty sure, you will understand that. ;)

User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 20 Feb 2015, 15:18

mantragora wrote: Houdini is not a viewport centric app and you just don't like this. One day, I'm pretty sure, you will understand that. ;)
well nobody knows what future holds. For now, I'm afraid all I can do is to temporarily close the 'education part' of this thread. Seeking for some place, free of Houdini witnesses, and great talent of this app and users to put into absurd, just everything they touch. Won't be easy to find this, by the way, regarding the experience here and some another forums. All I won't for now, it is to open Softimage and press 'freeze' button about hundred times over everything.
Anyway, thank you for releasing me of further efforts.

Where is that Maya 2016....
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

NNois
Posts: 706
Joined: 09 Jun 2009, 20:33

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by NNois » 20 Feb 2015, 17:10

Mathaeus wrote:All I won't for now, it is to open Softimage and press 'freeze' button about hundred times over everything.
Ouch i don't get you on this one (poor bad english french guy), freezing what for what ?

User avatar
Mathaeus
Posts: 1715
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 20 Feb 2015, 21:23

NNois wrote:
Mathaeus wrote:All I won't for now, it is to open Softimage and press 'freeze' button about hundred times over everything.
Ouch i don't get you on this one (poor bad english french guy), freezing what for what ?
Operator stack. Plus litre or two of nodicide on each ICE tree. Just for refresh, after few months of H. By the way my English is automatic translation from Klingon, so error is on my side.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.