Found 221 posts.
Search results Show results as topic list.
Houdini Lounge » python external file in hda
- kahuna031
- 897 posts
- Offline
That's what we're doing atm but for a special case we would like the hda to not have any external dependencies and include the python libraries inside it. But if this doesn't work we have to do as you describe.
Edited by kahuna031 - Aug. 9, 2017 05:28:11
Houdini Lounge » python external file in hda
- kahuna031
- 897 posts
- Offline
Technical Discussion » Tutorials on realistic foliage dynamics
- kahuna031
- 897 posts
- Offline
I'd definitely go for wire simulation as Houdini stands right now. That solver could let you do what you describe, only exception being leafs to leaf collisions.
If you create the plants in Houdini its also common that you can get the wires for free as they often are created by some kind of underlying skeleton structure.
If you create the plants in Houdini its also common that you can get the wires for free as they often are created by some kind of underlying skeleton structure.
Technical Discussion » Transfer texture from one mesh to another.....
- kahuna031
- 897 posts
- Offline
Bake texture rop node is what you're looking for. Apply the texture to one object using a basic shader, Set the other ovject as uv object on the bake texture node.
Technical Discussion » python node can't write to file?
- kahuna031
- 897 posts
- Offline
Technical Discussion » python node can't write to file?
- kahuna031
- 897 posts
- Offline
Have you tried using an absolute path? Normally Houdini points to the install location when using just a file name like that (to be able to easily point at defaults that come with the program).
Technical Discussion » open cl input variables
- kahuna031
- 897 posts
- Offline
I thought I'll start learning the OpenCL nodes and I'm looking at the ones in H16 tools as a ref. In the volume ones there's incoming variables like “stride_x” that is bound not from the user but by some hidden process. Is there a documentation of this step? Or any code I can look at in the install directory that explains what happens?
Just trying to understand what's going on to be able to work with them more freely.
Thx!
Just trying to understand what's going on to be able to work with them more freely.
Thx!
Technical Discussion » Loop through inputs attributes in VEX
- kahuna031
- 897 posts
- Offline
Sounds like you can put the attributes in a string with a chs() expression, split that to an array, loop over the attributes:
foreach (string attribName; splitArray){
point (0, attribName, @ptnum)
}
Edit: missed the nWeight attribute.
Do a for loop instead.
for (int i =1; i <nWeight+1;i++){
point (0,“weight”+itoa (i), @ptnum)
}
foreach (string attribName; splitArray){
point (0, attribName, @ptnum)
}
Edit: missed the nWeight attribute.
Do a for loop instead.
for (int i =1; i <nWeight+1;i++){
point (0,“weight”+itoa (i), @ptnum)
}
Edited by kahuna031 - April 4, 2017 16:01:13
Technical Discussion » Old vs. New Point SOP
- kahuna031
- 897 posts
- Offline
jlaitThis is one of the transition issues that could have been resolved by better docs and guides. Though there are some minor references to basics like “set” and “opinput” they are well hidden within quite extensive documentation.
Cause I do agree using set() is very esoteric.
It genarally feels like the docs was written in the pre-wrangle era. A sentence like “It also supports shading-specific statements such as the illuminance() and gather()” should probably not be one of the first things to tell a new user. I think a good place to start would be restructuring the current docs and adding a transition guide for people new to wrangling but not expressions. Basically, people shouldn't have to think about “vcc”, “pragmas” and “shader calls” when they just wanted to plus 1 to the y component.
That said, the docs that are new since wranglings, “half edges” and “geometry functions” is very nicely made.
Edited by kahuna031 - March 26, 2017 14:45:30
Houdini Engine for Unity » Collison geo for multiple pieces
- kahuna031
- 897 posts
- Offline
Please do. I'm updating the script above though, learned that parts can have multiple collision meshes so I'm changing the parenting order to allow that.
Houdini Engine for Unity » Collison geo for multiple pieces
- kahuna031
- 897 posts
- Offline
Ready to use script for this:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class importHoudiniRBD : MonoBehaviour { static void attachCollider(Transform renderXform, Transform colliderXform){ GameObject colObj = colliderXform.gameObject; GameObject renderObj = renderXform.gameObject; //print("Attaching collider: " + colObj.name); MeshCollider collider= colObj.AddComponent<MeshCollider>(); //add collider collider.convex = true; colliderXform.SetParent(renderXform); MeshRenderer colRend = colliderXform.GetComponent<MeshRenderer>(); colRend.enabled = false; //check if allready processed if (null==renderObj.GetComponent<Rigidbody>()) { renderObj.AddComponent<Rigidbody>(); } } static int getChildIndexByName(Transform parent, string name, int numChildren) { int i =-1; for (int ii = 0; ii < numChildren; ii++) { string currentName = parent.GetChild(ii).name; //print(nameSplit[0]); if (currentName.Contains(name+'_'))//'_' and a suffix int is added to the Houdini name { return ii; //found the correct i for current piece } } return i; } public float test = 0; // Adds a sphere collider to all children that doesn't have a collider void Start() { //print("init" + this.gameObject.name); //print("Components: " + this.gameObject.GetComponents(typeof(GameObject))); Transform houObjNode = this.gameObject.transform; int nChildren = houObjNode.childCount; //keep track of number of children as this number gets obsolete as we parent objects print (nChildren); int i = 0; int j = 0; int k = 0; //List<string> pieces = new List<string>(); List<string> colliders = new List<string>(); //get all pieces to attach foreach (Transform childXform in houObjNode) { //if (j > houObjNode.childCount) { continue; } //safety break if (childXform.name.Contains("Collider")) { colliders.Add(childXform.name); } //else { pieces.Add(childXform.name); } } foreach (string colliderName in colliders) { k++; if (k > 1000) { break;} //safety break i = -1; j = -1; string[] nameSplit = colliderName.Split(new string[] { "Collider" }, System.StringSplitOptions.None); string renderObjName = nameSplit[0]; nameSplit = colliderName.Split(new string[] { "Collider" }, System.StringSplitOptions.None); //get transform indices i = getChildIndexByName(houObjNode, renderObjName, nChildren); //check if we found render piece if (i < 0) { Debug.LogError("Couldn't find render mesh: " + renderObjName); //print("i:" + i +", j:" + j); break; } j = getChildIndexByName(houObjNode, colliderName.Split('_')[0], nChildren); if (j < 0) { Debug.LogError("Can't process " + colliderName); } else { Transform renderXform = houObjNode.GetChild(i); Transform colXform = houObjNode.GetChild(j); attachCollider(renderXform, colXform); //print("Render object: " + renderXform); nChildren--; //reduce loop size } } } }
Edited by kahuna031 - March 8, 2017 14:40:30
Houdini Engine for Unity » Tutorial request for attaching scripts automatically on unit
- kahuna031
- 897 posts
- Offline
i fixed it at runtime, the script searches for the collider inside the hierarchy and instantiates itself in that game object.LSparkle: I'd like to do exactly this. Do you mind (or anyone else) showing how this is done in a script? As someone who's used to do these setups inside Houdini, this runtime level of scripting is quite new to me.
Edit: Never mind. Think I'm getting it.
using UnityEngine; using System.Collections; public class inheritBehaviour : MonoBehaviour { // Adds a sphere collider to all children that doesn't have a collider void Start() { print("init" + this.gameObject.name); //print("Components: " + this.gameObject.GetComponents(typeof(GameObject))); int nChildren = this.gameObject.transform.childCount; for (int i = 0; i < nChildren; i++) { GameObject child = this.gameObject.transform.GetChild(i).gameObject; if (child.GetComponent<Collider>()) { // If this game object has a collider, continue print("Collider found on object" + gameObject.name); } else { print("No collider found on object" + gameObject.name); SphereCollider sc = child.AddComponent<SphereCollider>(); //add collider } } } }
Edited by kahuna031 - Feb. 26, 2017 15:01:48
Houdini Engine for Unity » Collison geo for multiple pieces
- kahuna031
- 897 posts
- Offline
Going to do some tests with scripts and obj networks first to understand the problem better.
Houdini Engine for Unity » Collison geo for multiple pieces
- kahuna031
- 897 posts
- Offline
Houdini Engine for Unity » Collison geo for multiple pieces
- kahuna031
- 897 posts
- Offline
Houdini Engine for Unity » Collison geo for multiple pieces
- kahuna031
- 897 posts
- Offline
New to Unity but not to Houdini. I want to create a fracture setup and get the pieces to get their respective collision geo. Naming them “piece0”, “piece0_collision_geo” etc doesn't work. It results in a object list as in the attachment, all collision geo merged to one piece and without any connection to their piece.
What's the correct way to do this?
Thanks!
What's the correct way to do this?
Thanks!
Technical Discussion » Strange License Problem
- kahuna031
- 897 posts
- Offline
Sounds like it was the H16 upgrade then. IT might have updated the license server without telling anyone.
Technical Discussion » Strange License Problem
- kahuna031
- 897 posts
- Offline
Had the same thing but found that Houdini Server service was turned off, now works after starting that.
This happens the same day as H16 was released and I also just installed Unity. Can't be sure but my money is on Unity to be the guilty part as that install took issues with other network apps.
This happens the same day as H16 was released and I also just installed Unity. Can't be sure but my money is on Unity to be the guilty part as that install took issues with other network apps.
Technical Discussion » half edge backwards vex functions missing
- kahuna031
- 897 posts
- Offline
I got a bunch of polylines that I'm trying to wrangle. I'm using detail mode and half edges to step through the points, it works fine when starting at the first vertex but if I want to reverse the order there doesn't seem to be any vex functions for me. There's only functions to get a half edges if you got the “source” point/vertex, not the “destination”.
Or am I missing something?
I think I work around this by reversing the curves and forward process them, then reverse again but I probably can't do that in a generic solution.
Or am I missing something?
I think I work around this by reversing the curves and forward process them, then reverse again but I probably can't do that in a generic solution.
Houdini Lounge » service down?
- kahuna031
- 897 posts
- Offline
-
- Quick Links