I am wondering if it´s possible to scatter points on strands. That would allow to instance geo on strands (or replace the strands with geo)...
I don't think that is implemented yet, but you can use the positions of the strand to instance on.
That´s true, but I´d like to go a bit further and place geos along each strand. Right now I build a line of points and try to copy the point_orient to each point.
Thomas have you seen this breakdown? It might help.
That should work just fine. Just set the point_orientation geo-property, and ensure you are feeding it an array of quaterions, as Bifrost rotations/orientations are quaternions.
Here is a very simple example showing:
1. Creating an array of 10 points, and also an array of 10 orientations
2. Creating a strand from the 10 points
3. Setting the point_orientation from the array of 10 orientations
4. Finally just doing a set_instance_geometry and feeding a cube.
Note how the cubes are instanced across the spline, but each cube has a different rotation (orientation).
Here is one better!
In this, slightly expanded, example, I am using the strand tangent to compute a per-point orientation, so that the cubes "follow" the flow of the strand. This is simply done by creating a rotation going from the X axis (1,0,0) to the normalized tangent of the strand, per-point. This works because we know the strand is going along the X axis. A more complex example could use the rebel pack's "update_strands_basis" to compute a full set of basis vectors, per strand point, and then construct a quaternion from that.
Thank you, Marcus!
I will try to recreate your examples. I struggled with the need to copy one orientation value to an array, but I finally managed it using a second fill_inferpolated compound. I'm sure there must be an easier way...
Now I can define start - end point and have my additional points in the correct position and rotation.
One strange sidenote: When I grouped the whole setup the result failt. It turned out that the compound "rotation_matrix_to_quaternion" I grabbed from the sample file "instancing_1_basic" wasn't working correctly. As soon as I published it and replaced it in my graph everything behaved as expected.
@Christoph_Schaedl @ I saw the video but it was quite a whule. I'll have a second look!
If you look at my example graphs, you can see how I am using the sequence_array compound to generate arrays of values. sequence_array is a great way to generate an array with pre-filled values, all with a single compound.
If you set the "step" parameter to 0, then the value you use for "start" will be filled throughout the generated array. If you set "step" to non-zero, then each element will grow by that step value throughout the array. Negative step values will cause the start value to shrink.
I'd use that instead of fill_interpolated...
Can't find what you're looking for? Ask the community or share your knowledge.