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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Strand offset ?

Message 1 of 5
728 Views, 4 Replies

Strand offset ?



I am trying to figure out how to use the strand_offset on the construct_strands node.

The info on the node tells me this



The port type is: array<UInt>.

These will directly set a property of the same name - and this is the offset array of the strands structure. The offset array defines where each strand starts, and has one extra element at the end which is the count of the point_component.

An offset array as follows define two strands as follows:

strand_offset: [0, 3, 8]
Resulting strands: 0-2, 3-7. 

If strand_offset is an empty array, one will be constructed which is a single strand tracing through all the point_positions."


So from that I get that if an array isn't set in the offset the strands will  trace through all point positions which is what we see allot of the time. I want to control where strands start and finish and I know I need to get some info from some nodes and create some kind of array but its all pretty complicated with zero information about it anywhere else. To be honest there is pretty much zero information about all nodes apart from some very basic descriptions but that's for another discussion.
So, can someone explain what I would need to create to give the strand_offset what it needs?
I understand that it is a UInt - which I am guessing is an unsigned integer.

Thanks in advance


Message 2 of 5

Sure! Take a look at this screenshot. I've circled the first strand in red and the second strand in green.


The first strand is made up of the first three vertices. We count from zero so that's points 0, 1 and 2. The second strand is made up of the next four vertices, i.e. 3, 4, 5 and 6. The strand offset array then becomes [0, 3, 7]. Each element of the strand offset array is the starting vertex of each strand (except for the last element, which is just there to know where the last strand ends). In this case the first strand starts at vertex 0 and the next strand starts at vertex 3. The last element is always the total number of vertices of all the strands plus one. In our case we have two strands, one strand has three points and the other has four points so 3+4=7. Hope this helps.

Message 3 of 5

This is great, and thank you for taking the time to put together this example, much appreciated !

Can I ask though, if I wanted to trace a strand around an object BUT NOT have that strand 'loop' back to the starting point, how would one do this ?
Currently if you get a point position from an object and construct a strand using the pp the strand loops back to the starting point or the next row of verts, which creates a crossing effect around the mesh. So as in the image attached, if I wanted a strand to circle each edge loop incrementally over the sphere creating concentric circles all the way without a loop back,  I am guessing this is more complicated ? I had thought the strand offset would help here if I could build an array of edge loop information . 
I would like to get to a point where I can create a compound that allows me to plug in any mesh and have this function work and a such I don't mind putting in a bit of work to get to that.
many thanks

Message 4 of 5

It's possible but it's a bit advanced. I've attached a compound that does it. It uses the new get_mesh_structure compound from Bifrost which was also demoed in Marcus' new master class.



Message 5 of 5

Amazing, thank you so much !!
Going to add that to my library and look into its guts to see how its made. 
Again, thank you !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report