# Get selected Node selection = hou.selectedNodes() # Loop for each selected node for node in selection: nodeName = node.name() # Get the selected node name allChildren = node.allSubChildren() # List all children inside the node count = len(allChildren) # Counting the number of node inside # Loop for each node inside the selected node for i in range(0, count): childName = allChildren[i].name() # Get the name of the child Node newName = nodeName + '_' + childName # Create new name allChildren[i].setName(newName) # apply new name #print newName
Found 52 posts.
Search results Show results as topic list.
Technical Discussion » auto set node names
- c0y
- 52 posts
- Offline
create a new tool in a shelf and type this code
Technical Discussion » Normal Vex Behavior
- c0y
- 52 posts
- Offline
//printf("pt:%d\n", @ptnum); if(@ptnum % 3 == 0) { printf("pt:%d ->copy\n",@ptnum); } else { printf("pt:%d ->src\n",@ptnum); }
your first line is executed one time on every points, then I think your code is not properly written, try this code with brackets
Technical Discussion » Need Help understanding my VEX Code (For each Loop)
- c0y
- 52 posts
- Offline
I think it's because you are looping though the npts array. So @ptnum don't have the same numbers. That's why you need the int num;
Technical Discussion » VEX get the vertex number
- c0y
- 52 posts
- Offline
Ahh okay, i've missed this one !
so I did something, a little bit tricky, I don't know if there's a simpler way but I found what I want.
Thanks !
so I did something, a little bit tricky, I don't know if there's a simpler way but I found what I want.
int point = 55; int primitive = 41; int vtxList[] = pointvertices(0, point); i[]@vtxList = vtxList; int primList[]; foreach(int vtx; vtxList) { int prim = vertexprim(0, vtx); append(primList, prim); if(prim == primitive) { int vtxNum = vertexprimindex(0, vtx); setpointattrib(0, "vtxNum", point, vtxNum, "set"); } } i[]@primList = primList;
Thanks !
Technical Discussion » VEX get the vertex number
- c0y
- 52 posts
- Offline
Hi,
I simply want to find the vertex number of a point inside a given primitive in VEX
For example :
I want to find the vertex number of point 45 in primitive 41 (which is 0)
I want to find the vertex number of point 45 in primitive 31 (which is 2)
I want to find the vertex number of point 55 in primitive 41 (which is 3)
I tried int pointvertex(<geometry>geometry, int point_num) function,
int primvertex(<geometry>geometry, int primnum, int vertex)
I also tried primvertices or pointvertices
But they never gives me the good number, maybe because this is linear vertex
Any help would be appreciated
Thanks !
I simply want to find the vertex number of a point inside a given primitive in VEX
For example :
I want to find the vertex number of point 45 in primitive 41 (which is 0)
I want to find the vertex number of point 45 in primitive 31 (which is 2)
I want to find the vertex number of point 55 in primitive 41 (which is 3)
I tried int pointvertex(<geometry>geometry, int point_num) function,
int primvertex(<geometry>geometry, int primnum, int vertex)
I also tried primvertices or pointvertices
But they never gives me the good number, maybe because this is linear vertex
Any help would be appreciated
Thanks !
Technical Discussion » Create a custom wireCapture attributes for wireDeform
- c0y
- 52 posts
- Offline
oh yes, indeed, but I tried to add this previously, but maybe I made a mistake…
Thanks for your help !
Thanks for your help !
Technical Discussion » Create a custom wireCapture attributes for wireDeform
- c0y
- 52 posts
- Offline
Hi,
I'm working on a tree asset, and now I need to manage the meshing of the tree.
The mesh is created from simulated curves, and I need a fast way to mesh the tree and deform it according to the splines simulation.
The problem is that I have a big amount of branches, and the wireCapture and deform are not compilable into ‘Compiled Blocks’, which means that the final WireDeform is very long.
I cannot do the wireCapture on the hole mesh, because there are so many branches that the capture is not proper.
So I tried to create my own custom capture datas, looking at the Capture Attribute Unpack, and Capture Attribute Pack.
But it seams that even if I'm creating the wireCapture attributes and packing it, the ‘wireCapt’ is still missing when I plug the geometry in the wireDeform SOP. And I don't know what to add to make it work.
To be clearer : i want to store the wireCapture data in a for_each loop for each branch, and then apply the wireDeform on the final hole mesh, to be faster.
Thanks for your help !
I'm working on a tree asset, and now I need to manage the meshing of the tree.
The mesh is created from simulated curves, and I need a fast way to mesh the tree and deform it according to the splines simulation.
The problem is that I have a big amount of branches, and the wireCapture and deform are not compilable into ‘Compiled Blocks’, which means that the final WireDeform is very long.
I cannot do the wireCapture on the hole mesh, because there are so many branches that the capture is not proper.
So I tried to create my own custom capture datas, looking at the Capture Attribute Unpack, and Capture Attribute Pack.
But it seams that even if I'm creating the wireCapture attributes and packing it, the ‘wireCapt’ is still missing when I plug the geometry in the wireDeform SOP. And I don't know what to add to make it work.
To be clearer : i want to store the wireCapture data in a for_each loop for each branch, and then apply the wireDeform on the final hole mesh, to be faster.
Thanks for your help !
Edited by c0y - Nov. 13, 2019 10:23:05
Technical Discussion » uniform scale particular object through loop with vex
- c0y
- 52 posts
- Offline
Technical Discussion » how to remove existing image and view heightfield Quickshade.
- c0y
- 52 posts
- Offline
Hi,
I think the caches are not properly cleared.
Did you try the “glcache -c” and the “texcache -c” commands ?
https://www.sidefx.com/docs/houdini/commands/glcache.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/commands/texcache.html [www.sidefx.com]
Enter this in the hscript textport
I think the caches are not properly cleared.
Did you try the “glcache -c” and the “texcache -c” commands ?
https://www.sidefx.com/docs/houdini/commands/glcache.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/commands/texcache.html [www.sidefx.com]
Enter this in the hscript textport
Technical Discussion » Point Deform with a curve
- c0y
- 52 posts
- Offline
Hi there,
I'm working on a dynamic tree asset, and my wish is to use a wire solver or vellum to drive the mesh.
So I was initially working with wirecapture + wiredeform which work pretty well. The problem is that wirecapture and wiredeform are not compilable… When you deal with hundreds or thousands branches, it becomes very very slow.
Finally I tried the pointdeform SOP, which is compilable. But it seems that it doesn't get the orient from the curve…
Here is the point deform result :
and here is the wire deform result (which is what I want to have, but with the point deform) :
So, if anybody can help me with modifying the pointdeform code, which is pretty harsh to get the orientation with an animated curve ?
Or maybe there's a trick I don't know…
Thks !
I'm working on a dynamic tree asset, and my wish is to use a wire solver or vellum to drive the mesh.
So I was initially working with wirecapture + wiredeform which work pretty well. The problem is that wirecapture and wiredeform are not compilable… When you deal with hundreds or thousands branches, it becomes very very slow.
Finally I tried the pointdeform SOP, which is compilable. But it seems that it doesn't get the orient from the curve…
Here is the point deform result :
and here is the wire deform result (which is what I want to have, but with the point deform) :
So, if anybody can help me with modifying the pointdeform code, which is pretty harsh to get the orientation with an animated curve ?
Or maybe there's a trick I don't know…
Thks !
Technical Discussion » Vellum on animated source
- c0y
- 52 posts
- Offline
Well, i've found some tricks to do what I want…
First, i've created my base constraints : one cloth constraints with export ‘basestretch’ and ‘basebend’ groups, second with “pin to target” in soft type and respective “pinstretch” et “pinbend” groups.
Then I used a SOP Solver (I didn't know that it would work) inside the vellum solver, to update the constraints from a external node (/CONST1/ in my case).
This will update all the constraints from the base animation to the vellum solver so that you'll have correct restlength.
And finally, I used a vellum constraint property with a VEXpression to get my f@blend attribute from a custom node.
It's working ! I didn't check other cases. I don't know if it's a “clean” way to do it, but it's still a solution .
If someone know another method, share with us
First, i've created my base constraints : one cloth constraints with export ‘basestretch’ and ‘basebend’ groups, second with “pin to target” in soft type and respective “pinstretch” et “pinbend” groups.
Then I used a SOP Solver (I didn't know that it would work) inside the vellum solver, to update the constraints from a external node (/CONST1/ in my case).
This will update all the constraints from the base animation to the vellum solver so that you'll have correct restlength.
And finally, I used a vellum constraint property with a VEXpression to get my f@blend attribute from a custom node.
It's working ! I didn't check other cases. I don't know if it's a “clean” way to do it, but it's still a solution .
If someone know another method, share with us
Technical Discussion » Vellum on animated source
- c0y
- 52 posts
- Offline
yes, but these examples are always animated with keyframes on the vellum constraint properties, they never use external attributes to activate… But inside the the solver, I can't figure out how to import my f@blend parameter
I also check the vellum rest blend, but I don't understand exactly how to use it inside the vellum solver.
I also check the vellum rest blend, but I don't understand exactly how to use it inside the vellum solver.
Technical Discussion » Vellum on animated source
- c0y
- 52 posts
- Offline
Hi,
i'd like to know would you do to create a vellum on an animated source :
Here is my base animated mesh.
It's a blend using a “f@blend” attribute. The blend goes from 0 to 1 : 1 means that the grid is unfolded.
What I want to do with vellum is :
use the f@blend attribute to drive constraints. It starts with a “pin to target” (soft type) with high stiffness value, that decrease based on the f@blend (f@stiffness *= (1 - f@blend) ).
When the (1 - f@blend) reaches 0, the grid use a standard “cloth” constraints.
But the problem I have is how to animate all these constraints.
First, the cloth constraint is calculated on first frame, so the constraints are all collapsed.
Then, even with a geometry wrangle in the vellum solver, I can't get the animated “f@blend” to calculate the stiffness…
So i'm stuck. I've also tried to do it inside a DOP Network and SOP Solvers, but no success.
All of this could be great for example on growing plants or other scaling stuffs
Thx !
i'd like to know would you do to create a vellum on an animated source :
Here is my base animated mesh.
It's a blend using a “f@blend” attribute. The blend goes from 0 to 1 : 1 means that the grid is unfolded.
What I want to do with vellum is :
use the f@blend attribute to drive constraints. It starts with a “pin to target” (soft type) with high stiffness value, that decrease based on the f@blend (f@stiffness *= (1 - f@blend) ).
When the (1 - f@blend) reaches 0, the grid use a standard “cloth” constraints.
But the problem I have is how to animate all these constraints.
First, the cloth constraint is calculated on first frame, so the constraints are all collapsed.
Then, even with a geometry wrangle in the vellum solver, I can't get the animated “f@blend” to calculate the stiffness…
So i'm stuck. I've also tried to do it inside a DOP Network and SOP Solvers, but no success.
All of this could be great for example on growing plants or other scaling stuffs
Thx !
Technical Discussion » Mantra black refract issue...
- c0y
- 52 posts
- Offline
Hi,
i'm doing some tests on mantra shaders, espacially on reflective / refractive shaders.
Reflections seems to works pretty well, but I have some issue on refractive shaders :
I tested a principled shader, with IOR 1.5, no reflectivity, fully refractive, and several roughness settings (0, 0.2, 0.4, etc).
I used a environment light with an HDRI only.
When I render the balls, I have black parts appearing inside the sphere.
It's not coming from the limits (I've left the setting to 10).
I think it's a GGX model. I don't know why, since you put fully refractive shader without fully reflective, it creates black parts.
The only solutions I found were :
1) Use a classic shader and change the refractive model to Phong. But the refract result is not the same. (the roughness is different)
2) Change the envlight rendering mode to “Ray Tracing background”, but when I use this mode, I lost the background and extra image plane passes !
3) I tried to create a geolight with a sphere, and assign a self-emissive shader on it, but same, I lost the passes.
So, I don't know if there is an option somewhere that I don't know, or if it's simply impossible to render a principled shader fully refractive without reflections.
Any help would be appreciated !
Thanks !
i'm doing some tests on mantra shaders, espacially on reflective / refractive shaders.
Reflections seems to works pretty well, but I have some issue on refractive shaders :
I tested a principled shader, with IOR 1.5, no reflectivity, fully refractive, and several roughness settings (0, 0.2, 0.4, etc).
I used a environment light with an HDRI only.
When I render the balls, I have black parts appearing inside the sphere.
It's not coming from the limits (I've left the setting to 10).
I think it's a GGX model. I don't know why, since you put fully refractive shader without fully reflective, it creates black parts.
The only solutions I found were :
1) Use a classic shader and change the refractive model to Phong. But the refract result is not the same. (the roughness is different)
2) Change the envlight rendering mode to “Ray Tracing background”, but when I use this mode, I lost the background and extra image plane passes !
3) I tried to create a geolight with a sphere, and assign a self-emissive shader on it, but same, I lost the passes.
So, I don't know if there is an option somewhere that I don't know, or if it's simply impossible to render a principled shader fully refractive without reflections.
Any help would be appreciated !
Thanks !
Technical Discussion » Overbright dots & Clamp White values in Mantra (Houdini 17.0)
- c0y
- 52 posts
- Offline
Technical Discussion » Overbright dots & Clamp White values in Mantra (Houdini 17.0)
- c0y
- 52 posts
- Offline
Hi,
I want to point out an issue with overbright dots when rendering reflective surfaces with Mantra.
I'm working on Houdini 17.0.x.
Here is an example of the problem I have :
I can't find a way to clamp these white values when rendering.
I tried :
- to increase Pixel Sample (even with 20x20 values, I've got the same result)
- to turn the Color Limit in the Limits Tab from 10 to 0, or lower values (same result)
I have to mention that I don't use a HDRI (in other tests, I thought that the hotspot value was too high) but I'm using the default Sky Light rig (environment light + Sun).
I'm using Principled Shader, with basic setup.
So my question is :
how can you avoid these very bright dots ? Is there a way to clamp white values when rendering (as well as VRay does, for example) ? Is there a hidden option in Mantra parameters ? Is there an option in shaders ?
Thx !
I want to point out an issue with overbright dots when rendering reflective surfaces with Mantra.
I'm working on Houdini 17.0.x.
Here is an example of the problem I have :
I can't find a way to clamp these white values when rendering.
I tried :
- to increase Pixel Sample (even with 20x20 values, I've got the same result)
- to turn the Color Limit in the Limits Tab from 10 to 0, or lower values (same result)
I have to mention that I don't use a HDRI (in other tests, I thought that the hotspot value was too high) but I'm using the default Sky Light rig (environment light + Sun).
I'm using Principled Shader, with basic setup.
So my question is :
how can you avoid these very bright dots ? Is there a way to clamp white values when rendering (as well as VRay does, for example) ? Is there a hidden option in Mantra parameters ? Is there an option in shaders ?
Thx !
Technical Discussion » Layered Shader Loses Point Color and Alpha
- c0y
- 52 posts
- Offline
Hi, i've got exactly the same problem. I used ‘Point Color’ in my principled shader, but when I use the Layer Mix or Layer Composite, it looses the @Cd.
Did you, or someone else, find a solution for this ?
Thx !
Did you, or someone else, find a solution for this ?
Thx !
Technical Discussion » Triplanar in displacement
- c0y
- 52 posts
- Offline
Hi,
i'm on houdini 16.5, is it possible to plug uvtriplanar in displacement / bump / normal when we are outside of the shader ?
thx
i'm on houdini 16.5, is it possible to plug uvtriplanar in displacement / bump / normal when we are outside of the shader ?
thx
Edited by c0y - June 23, 2018 05:18:32
Technical Discussion » Keep a point's position proportional to its neighbours
- c0y
- 52 posts
- Offline
Hi,
i'm trying to keep one point's position proportional to its neighbours. A kind of average position.
In my case, I want the point ‘0’ to be always at the same distance proportions of the other points.
I tried to make something with percentage, but i'm lost at this stage…
Thanks for help !
i'm trying to keep one point's position proportional to its neighbours. A kind of average position.
In my case, I want the point ‘0’ to be always at the same distance proportions of the other points.
I tried to make something with percentage, but i'm lost at this stage…
Thanks for help !
Technical Discussion » My question about growth animation...
- c0y
- 52 posts
- Offline
-
- Quick Links