I'm experiencing some trouble spawning null nodes to points in the Python Script node.
What I'm eventually trying to accomplish is a rig that will adjust to changes in a geometry, and add bones based on how many spawns of an object I have. For example, if I have a circle with 12 points, I'll want 12 bone chains (their length determined by a line node) to begin at those points and follow the spawned geometry. If I change that in an hda and reduce the points to 6, I want the rig to update its bones to only have 6 bone chains.
I believe the best way of accomplishing this is to run through the points in the circle node, get their world space positions, and create the nullNode at that position, which the bones will eventually be spawned onto. I'm having trouble actually getting those point values however, and as such can't spawn the null nodes correctly (type_01). the Bones from Curve shelf tool does something very similar to what I'm trying to accomplish.
I'm sure it's something as simple as running through the points in a for loop, getting some sort of vector3 value, and running through those values in another for loop when spawning the null nodes, but I haven't been able to access those point values.
The other way would be to do a lot of math in the python script, and essentially recreate the circle from the obj node (type_02) and mimic the transformations made in the obj network. This solution feels inefficient however.
Found 6 posts.
Search results Show results as topic list.
Technical Discussion » Generate Bones/Nulls on Points using Python
- Dylagent
- 6 posts
- Offline
Technical Discussion » Delete Geometry when Intersect
- Dylagent
- 6 posts
- Offline
Ah I see, so I didn't need to enable the compiling. I was a little worried if this shouldn't be done or not, but it works just fine without it.
Thanks!
Thanks!
Technical Discussion » Delete Geometry when Intersect
- Dylagent
- 6 posts
- Offline
Should I be putting this into my for-each loop?
At the moment when I do this, it fails to let me compile in the last node of the loop.
At the moment when I do this, it fails to let me compile in the last node of the loop.
Technical Discussion » Delete Geometry when Intersect
- Dylagent
- 6 posts
- Offline
I'm a bit new to for-each loops and am having some trouble at the moment and didn't know if they are a causing a problem or can give me a solution.
I'm spawning various geometry into a scene using scatter and copy to point. However, if they intersect with other geometry, they need to be deleted.
I saw a post on here about deleting geo if it intersect with itself when spawning, but it didn't provide a way to delete if it passed through geometries outside of that for-loop. I can currently get it to delete PARTS of the pieces spawned, but not the entire thing (it'll just create holes).
Any help or guidance is appreciated.
I'm spawning various geometry into a scene using scatter and copy to point. However, if they intersect with other geometry, they need to be deleted.
I saw a post on here about deleting geo if it intersect with itself when spawning, but it didn't provide a way to delete if it passed through geometries outside of that for-loop. I can currently get it to delete PARTS of the pieces spawned, but not the entire thing (it'll just create holes).
Any help or guidance is appreciated.
Edited by Dylagent - April 30, 2018 00:54:40
Technical Discussion » PolyExtrude, ptNum, and Sort
- Dylagent
- 6 posts
- Offline
That actually works quite well, and even follows the exact location of the curve, a problem I was having with polyExtrude but was working around.
I was worried about the lack of a thickness scale at first, but I was able to create one in the scale part of the sweep. Also, fusing sweeps together keeps the ptnum increasing after the end of the previous sweep merge, which is also a bonus.
Thanks a bunch!
I was worried about the lack of a thickness scale at first, but I was able to create one in the scale part of the sweep. Also, fusing sweeps together keeps the ptnum increasing after the end of the previous sweep merge, which is also a bonus.
Thanks a bunch!
Technical Discussion » PolyExtrude, ptNum, and Sort
- Dylagent
- 6 posts
- Offline
So I'm running into a problem with PolyExtrude where I need the ptNum values to continue directly after the extrusion, but instead it skips to the next row and the ‘continuation’ row is at the end of the extrusion.
For example, I have a grid and I extrude from edges with pt values of 8-15. I use polyextrude to extrude along a curve, but instead of 16-23 being the next row of points, I instead get 24-31, with 16-23 being at the end of a very long extrusion.
So it's:
0-7
8-15
24-31
32-39
“ ” “
” “ ”
16-23
I've tried using sort but none of its functions do exactly as needed, though “By Vertex Order” comes very close. Any tips would be greatly appreciated. Sort also fails using the X, Y, and Z, values because the extrusion is/will need to curve in several directions.
For example, I have a grid and I extrude from edges with pt values of 8-15. I use polyextrude to extrude along a curve, but instead of 16-23 being the next row of points, I instead get 24-31, with 16-23 being at the end of a very long extrusion.
So it's:
0-7
8-15
24-31
32-39
“ ” “
” “ ”
16-23
I've tried using sort but none of its functions do exactly as needed, though “By Vertex Order” comes very close. Any tips would be greatly appreciated. Sort also fails using the X, Y, and Z, values because the extrusion is/will need to curve in several directions.
-
- Quick Links