,
@Manuloti, don't get confused by the @curveu attribute, it is just an example to vizualize the path of the rotation. The function itseld doesn't care what you put in as parameters as long it is a float attribute. You can put in any float value and for the function it is always "u". So yes internally the function is creating a reference like (u = f@curveu) and if you manipulate u the parameter (f@curveu) changes aswell (if it is not a constant value like number of course).
But this is the great advantage of using functions. You are independent from context.
Found 477 posts.
Search results Show results as topic list.
Technical Discussion » How to reference @ptnum in a point() Expression Function
- Aizatulin
- 477 posts
- Offline
Technical Discussion » How to reference @ptnum in a point() Expression Function
- Aizatulin
- 477 posts
- Offline
In my example "rotate_chramp" is a function which takes 3 vectors "A,B,C" and a float value "u". In the last line the function evaluates the three given points from the second input and the "curveu" value of the first input, which was calculated by the resample node. So usually each point has a curveu value between 0 and 1 corresponding to its point number.
The first ramp "interpolate" takes the u (between) 0 and 1 and it is called by lerp(lA, lB, ...), which means, whenever your ramp is close to the zero, the length is close to lA and on the other side the same for lB and one. Ideally your the ramp starts from 0 and ends at 1. The second ramp is just an additional length, which can be set zero by default (I think can be ignored in your case).
The first ramp "interpolate" takes the u (between) 0 and 1 and it is called by lerp(lA, lB, ...), which means, whenever your ramp is close to the zero, the length is close to lA and on the other side the same for lB and one. Ideally your the ramp starts from 0 and ends at 1. The second ramp is just an additional length, which can be set zero by default (I think can be ignored in your case).
Technical Discussion » How to reference @ptnum in a point() Expression Function
- Aizatulin
- 477 posts
- Offline
Not sure if I got your point correctly, but if you want to rotate a point to another point around a center with ramp control, you may want have control over the scale between the points and the center. So if the scale is different you can interpolate it and/or can add extra scale aswell.
Here is an example
Here is an example
Edited by Aizatulin - Aug. 26, 2023 04:05:36
Technical Discussion » how to make a clean curve to sweep a shape cleanly?
- Aizatulin
- 477 posts
- Offline
You can apply orientation along curve and set target up vector to Y-Axis
@edit: in fact you can do the same in the sweep node aswell
@edit: in fact you can do the same in the sweep node aswell
Edited by Aizatulin - Aug. 18, 2023 17:36:48
Technical Discussion » Integrate Under a chramp()
- Aizatulin
- 477 posts
- Offline
Technical Discussion » Wrap a UV around a procedurally generated box without seams
- Aizatulin
- 477 posts
- Offline
If you have different lines you can use polypath to make single polyline from it. After this, you can apply resample to create a curveu attribute, which can be use to set one uv-component. Sweep should also work.
here is a example
here is a example
Technical Discussion » Geometry Basics
- Aizatulin
- 477 posts
- Offline
Another thing is, that there are different ways to count vertices. One way (like in the picture above from the document page) is starting from 0 for each primitive, which gives you relative vertex number for each primitive.
The other way is counting all vertices together, which is called linear vertex number/index. If you read a vertex number in VEX for example, it will usually give you the linear vertex index and not the primitive related number, but there are functions to convert them to each other.
In fact a vertex is always bound to a primitive (I don't know, where this is not the case). While a vertex is just point reference and nothing much more (there are not different types for vertices AFAIK) but on the opposite for primitives there multiple different types.
There are polygons and polylines for example (not the only ones).
The other way is counting all vertices together, which is called linear vertex number/index. If you read a vertex number in VEX for example, it will usually give you the linear vertex index and not the primitive related number, but there are functions to convert them to each other.
In fact a vertex is always bound to a primitive (I don't know, where this is not the case). While a vertex is just point reference and nothing much more (there are not different types for vertices AFAIK) but on the opposite for primitives there multiple different types.
There are polygons and polylines for example (not the only ones).
Edited by Aizatulin - Aug. 9, 2023 14:41:07
Houdini Indie and Apprentice » Path deformer flattening out mesh
- Aizatulin
- 477 posts
- Offline
There is no "transform" attribute on the curve, but you can create one with orientation along curve. Just check the 3x3 matrix as output attribute (transform). Just put this node between connectivity1 and foreach_begin2. Probably you have to rotate your Petal by 90 degree steps depending on setting of the orientation node.
Technical Discussion » instance Flipping when orient was twisted far
- Aizatulin
- 477 posts
- Offline
Hi,
you can use as rotation axis something like cross product of a constant up direction and the curve normal(tangent).
you can use as rotation axis something like cross product of a constant up direction and the curve normal(tangent).
Edited by Aizatulin - July 1, 2023 07:52:07
Technical Discussion » Move objects independently inside For Each with Feedback
- Aizatulin
- 477 posts
- Offline
If you want to calculate the bounds individually, you can loop over the "ids" for example (like over connected pieces).
@edit: it is better to use id as integer attribute (not float) -> sometimes float may work but some notes expecting integer attribute input and it is more consistent using integer for id.
If you use CopyToPoints, you can also use piece/variant attribute to distinguish between the different ids aswell.
@edit: it is better to use id as integer attribute (not float) -> sometimes float may work but some notes expecting integer attribute input and it is more consistent using integer for id.
If you use CopyToPoints, you can also use piece/variant attribute to distinguish between the different ids aswell.
Edited by Aizatulin - July 1, 2023 02:14:28
Technical Discussion » Move objects independently inside For Each with Feedback
- Aizatulin
- 477 posts
- Offline
Houdini Indie and Apprentice » create a surface from line with copy to point and skin
- Aizatulin
- 477 posts
- Offline
Houdini Indie and Apprentice » create a surface from line with copy to point and skin
- Aizatulin
- 477 posts
- Offline
Houdini Indie and Apprentice » Flatten a geometry by its UV map an reprojecting it back.
- Aizatulin
- 477 posts
- Offline
You can also use the uv-coordinates to project geometry onto the surface. In fact you can identify X with u, Y with v and the Z with the normal. But this will only work, if the coordinates are existing (so this is quite limited).
You can take other surfaces as well to project you geo on.
You can take other surfaces as well to project you geo on.
Edited by Aizatulin - June 23, 2023 12:51:58
Houdini Indie and Apprentice » create a surface from line with copy to point and skin
- Aizatulin
- 477 posts
- Offline
Hi,
you can try boolean instead of intersection analysis and extract the boundary shape. With this shape you can sort the primitives.
you can try boolean instead of intersection analysis and extract the boundary shape. With this shape you can sort the primitives.
Technical Discussion » Get the highes prim number with the same attribute value
- Aizatulin
- 477 posts
- Offline
Here is one way,
if you have an int attribute you can sort by this attribute -> extract all classes -> create dummy points for each class -> foreach class/point put all prim numbers in an array -> sort all arrays -> get highest value.
if you have an int attribute you can sort by this attribute -> extract all classes -> create dummy points for each class -> foreach class/point put all prim numbers in an array -> sort all arrays -> get highest value.
Technical Discussion » Stitching together adjacent surfaces with different topo
- Aizatulin
- 477 posts
- Offline
@badman_
here is a (not optimized) way to add the intersecting points and rebuild each polygon (with new points). The points, which are supposed to be the border points, should be very close to each edge.
here is a (not optimized) way to add the intersecting points and rebuild each polygon (with new points). The points, which are supposed to be the border points, should be very close to each edge.
Technical Discussion » While Loop Problem
- Aizatulin
- 477 posts
- Offline
Here is a modification of your file. The algorithm should be similar to the algorithm in the link you have given.
In fact it is repeating, to find a random location on a grid, where there is "enough" space to find a circle with a specific radius. The problem is, that the remaining space can get very small, that it is almost impossible to find a valid position for the next circle, because the probability is getting smaller with each circle and there is no guarantee that it finds such a position. So in this case it might be better to omit this circle and try another (smaller) one.
In fact it is repeating, to find a random location on a grid, where there is "enough" space to find a circle with a specific radius. The problem is, that the remaining space can get very small, that it is almost impossible to find a valid position for the next circle, because the probability is getting smaller with each circle and there is no guarantee that it finds such a position. So in this case it might be better to omit this circle and try another (smaller) one.
Technical Discussion » Controlling life expectancy/variance falloff for paricles
- Aizatulin
- 477 posts
- Offline
Hi,
maybe you can try to kill the particles based on the weibull distribution (or any other distribution). Especially for the weibull, you can control the skewness by the shape parameter.
https://en.wikipedia.org/wiki/Weibull_distribution [en.wikipedia.org]
maybe you can try to kill the particles based on the weibull distribution (or any other distribution). Especially for the weibull, you can control the skewness by the shape parameter.
https://en.wikipedia.org/wiki/Weibull_distribution [en.wikipedia.org]
Technical Discussion » Shortest path.
- Aizatulin
- 477 posts
- Offline
If you are looking for a path like this, you should probably add an angle multiplier (turning cost).
-
- Quick Links