I want to randomize the “orientation” of the L-shape block for each patch of a grid surface. The rand() function is used inside a foreach node to decide randomly which of the four corners of a polygon is used as pivot point for the transform node based on the surface ID of a given polygon.
However, I can't get the random form as expected.
Can you kindly advise?
Thanks!
Found 479 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » rand() doesn't work inside foreach node
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » can't randomize scale factor within foreach node
- oat
- 479 posts
- Offline
Thank you all very much for all the good advice!
Here's the summary of all the approaches so far …
Here's the summary of all the approaches so far …
Houdini Indie and Apprentice » can't randomize scale factor within foreach node
- oat
- 479 posts
- Offline
I want to randomize the scale factors for faces within a foreach node, somehow all the surfaces are scaling in the same way, even if I use an attribute unique to each face for the rand() function.
your advice are greatly appreciated!f
your advice are greatly appreciated!f
Houdini Indie and Apprentice » can multiparm block items be referenced automatically?
- oat
- 479 posts
- Offline
Technical Discussion » Referencing Multiparm List
- oat
- 479 posts
- Offline
Raavenish
Hi Koen,
Sorry for the late reply. Initially I was also using python. But you can also do it via edit parameter interface. Create a “multiparm list” for a node. Create another node and select “edit parameter interface” option. In that dialog box, Choose “From nodes” option and select the node which has the “multiparm list” and copy the folder onto your node. Now the node you created first will be refernced by the new node.
Try this out and this works for me.
once again sorry for the late reply and thanks a lot for your interest.
Cheers.
Hi, I can't make it work as you suggested. I got warning that Node is outside subnet: /obj/geo1/null1/folder0.
Can you kindly post an example for your solution?
Thanks!
Houdini Indie and Apprentice » can multiparm block items be referenced automatically?
- oat
- 479 posts
- Offline
I have a null node within a subnet node, both have the same parameter folder in the form of multiparm block (list) containing a integer parameter.
I can use hscript to link the folder name field of the null node with the same field on the subnet, i.e. as I change the number of the integer items within the folder on the subnet, the same will be reflected on the same field on the null node.
I want to ask how to do the following, i.e. each time I create a new integer item on the subnet node and change its value, the same will automatically happen on the null node within the subnet node ….
Hope I explained my question clearly.
I can use hscript to link the folder name field of the null node with the same field on the subnet, i.e. as I change the number of the integer items within the folder on the subnet, the same will be reflected on the same field on the null node.
I want to ask how to do the following, i.e. each time I create a new integer item on the subnet node and change its value, the same will automatically happen on the null node within the subnet node ….
Hope I explained my question clearly.
Houdini Indie and Apprentice » nested foreach problem
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » nested foreach problem
- oat
- 479 posts
- Offline
I'm trying to model the geometry as shown in the image below: each cell is composed of a cross-shape tower and 4 L-shape perimeter buildings.
It works for just one foreach node with a uniform height (the 1st hip file).
I want to have height variation across different cells by using nested foreach loop. i.e. each polygon within a grid (2x2 or higher) will be subdivided into four polygons, each will be used to construct one quarter of the cross-shape tower and one of the 4 L-shape building over the diagonal corner.
However, the geometry in one cell is completely missing in the final results, and there is strange result within the top level foreach node sometimes. see image below.
May I ask why the the nested foreach nodes don't work?
Thanks
It works for just one foreach node with a uniform height (the 1st hip file).
I want to have height variation across different cells by using nested foreach loop. i.e. each polygon within a grid (2x2 or higher) will be subdivided into four polygons, each will be used to construct one quarter of the cross-shape tower and one of the 4 L-shape building over the diagonal corner.
However, the geometry in one cell is completely missing in the final results, and there is strange result within the top level foreach node sometimes. see image below.
May I ask why the the nested foreach nodes don't work?
Thanks
Houdini Indie and Apprentice » how to use hscript and python to output point position
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » how to use hscript and python to output point position
- oat
- 479 posts
- Offline
Hi, I think there's a point order issue, so a “sort” node is needed before the curve node.
Thanks!
Thanks!
Houdini Indie and Apprentice » how to use hscript and python to output point position
- oat
- 479 posts
- Offline
Thank you very much, pezetko!
You advice works!
However, it seems the point coordinates obtained only works for triangle polygon if I want to use it to get a closed cubic NURBS surface based on a polygon with more than 3 corners. (http://www.derivative.ca/wiki088/index.php?title=Spline) [derivative.ca]
I wonder how to do this using your method…
You advice works!
However, it seems the point coordinates obtained only works for triangle polygon if I want to use it to get a closed cubic NURBS surface based on a polygon with more than 3 corners. (http://www.derivative.ca/wiki088/index.php?title=Spline) [derivative.ca]
I wonder how to do this using your method…
Houdini Indie and Apprentice » how to use hscript and python to output point position
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » how to use hscript and python to output point position
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » how to use hscript and python to output point position
- oat
- 479 posts
- Offline
I have the following hscript to output the xyz positioins of 3 points as text, something like a string of “-0.755747, -0.65044, 0.0759825 -0.715619, -0.658654, 0.232518 -0.830901, -0.524088, 0.18691”
point(“../each1”, 0, “P”, 0) + “, ” +
point(“../each1”, 0, “P”, 1) + “, ” +
point(“../each1”, 0, “P”, 2) + “ ” +
point(“../each1”, 1, “P”, 0) + “, ” +
point(“../each1”, 1, “P”, 1) + “, ” +
point(“../each1”, 1, “P”, 2) + “ ” +
point(“../each1”, 2, “P”, 0) + “, ” +
point(“../each1”, 2, “P”, 1) + “, ” +
point(“../each1”, 2, “P”, 2)
I want to make it generally applicable to polygons with whatever number of points. However, I can't get the following python script to output the same thing:
points = hou.pwd().geometry().points()
txt = “”
for point in points:
pos = point.attribValue(“P”)
x = pos
y = pos
z = pos
txt = txt + str(x) + “, ” + str(y) + “, ” + str(z) + “ ”
return txt
May I ask how to correct it? and How to achieve it use Hscript programming using command like “for”?
Thanks!
point(“../each1”, 0, “P”, 0) + “, ” +
point(“../each1”, 0, “P”, 1) + “, ” +
point(“../each1”, 0, “P”, 2) + “ ” +
point(“../each1”, 1, “P”, 0) + “, ” +
point(“../each1”, 1, “P”, 1) + “, ” +
point(“../each1”, 1, “P”, 2) + “ ” +
point(“../each1”, 2, “P”, 0) + “, ” +
point(“../each1”, 2, “P”, 1) + “, ” +
point(“../each1”, 2, “P”, 2)
I want to make it generally applicable to polygons with whatever number of points. However, I can't get the following python script to output the same thing:
points = hou.pwd().geometry().points()
txt = “”
for point in points:
pos = point.attribValue(“P”)
x = pos
y = pos
z = pos
txt = txt + str(x) + “, ” + str(y) + “, ” + str(z) + “ ”
return txt
May I ask how to correct it? and How to achieve it use Hscript programming using command like “for”?
Thanks!
Houdini Indie and Apprentice » hkey related error during installation
- oat
- 479 posts
- Offline
I have the following error messages during installation. May I ask what the source of the problem is?
Thanks!
Thanks!
Houdini Indie and Apprentice » how to make houdini always use the latest version of otl
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » how to group every 3 prims as a new group?
- oat
- 479 posts
- Offline
Hi, ajz3d, thanks! May I ask how to display those fps and geometry information at the lower right corner of the scene view panel? can it be customized to display other information?
Anyway, will study your code later.
Thanks again!
Anyway, will study your code later.
Thanks again!
Houdini Indie and Apprentice » os.system() doesn't work in Python node
- oat
- 479 posts
- Offline
sorry for bringing up this post again, since I still can't solve this problem on a Macbook Pro newly reinstalled and updated.
Even using the subprocess.call(cmd, shell=True) method instead of os.system(cmd), the problem is still the same:
1. the command line program can't be executed using Python withing Houdini DA, which can obviously run in the Terminal after pasting the entire cmd string in the terminal
2. After the command line program I'm using is copied from the place it's installed currently to the /usr/bin folder, it can be executed from within Houdini, but the output file is currupted or incomplete.
I'm quite frustrated about the issue as the same houdini file and the same command line program installed in the same way have no such problem on another iMac desktop…
Did I miss something here related to system configuration?
I sincerely hope you can give me some hints to solve this “should be simple and obvious” problem!
Thank you!
Even using the subprocess.call(cmd, shell=True) method instead of os.system(cmd), the problem is still the same:
1. the command line program can't be executed using Python withing Houdini DA, which can obviously run in the Terminal after pasting the entire cmd string in the terminal
2. After the command line program I'm using is copied from the place it's installed currently to the /usr/bin folder, it can be executed from within Houdini, but the output file is currupted or incomplete.
I'm quite frustrated about the issue as the same houdini file and the same command line program installed in the same way have no such problem on another iMac desktop…
Did I miss something here related to system configuration?
I sincerely hope you can give me some hints to solve this “should be simple and obvious” problem!
Thank you!
Houdini Indie and Apprentice » how to group every 3 prims as a new group?
- oat
- 479 posts
- Offline
Houdini Indie and Apprentice » how to make houdini always use the latest version of otl
- oat
- 479 posts
- Offline
-
- Quick Links