Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

points on strands

8 REPLIES 8
Reply
Message 1 of 9
thomas_kutschera
1166 Views, 8 Replies

points on strands

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)...

8 REPLIES 8
Message 2 of 9

 

I don't think that is implemented yet, but you can use the positions of the strand to instance on.  

Message 3 of 9

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.

Message 4 of 9

copy to the single points fails so far

Message 5 of 9

Thomas have you seen this breakdown? It might help. 

https://vimeo.com/355418791

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 6 of 9

 

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).

 

Message 7 of 9

 

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.

 

 

Message 8 of 9

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!

Message 9 of 9

 

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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report