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: 

Update strands tangent giving odd results

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
labbejason
589 Views, 6 Replies

Update strands tangent giving odd results

Hi world,

 

I'm having some issues using the `update_strands_tangents` node.

 

I created new curve in the front viewport as a straight line using the EP Curve Tool as 3 cubic.

If I pass this curve as is in Bifrost and display its tangents with a `point_scope` it looks ok like this:

 

tangent1.gif

 

But if I place an `update_strands_tangents` in between I noticed the first tangent gets flipped to a weird angle. And if I move all other cvs the first tangent doesn't react.

tangent2.gif

 

Is this expected or am I missing something? I was using this to deform a mesh, but the flipped static tangent deforms that bit incorrectly. Here's what the graph looks like:

graph.jpg

 

I'll also attach the scene for anyone who wants to check it out.

Thanks!

6 REPLIES 6
Message 2 of 7
mjcg91
in reply to: labbejason

I believe this is the last point of your strands. This bug has been going on ever since this compound existed, and has not been fixed since then. 

If you have MJCG_compounds, you can look inside update_strands_orientations, there is a sub-compound that you can use, which fixes the boundary tangents.  

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 3 of 7
labbejason
in reply to: mjcg91

Ah ok good to know, so I guess I need to calculate the tangent myself by having it look at the point beside it?

Message 4 of 7
mjcg91
in reply to: labbejason

Correct, basically the end point's tangent is the direction from the second last point to the last point.

 

for each strand:

 

lastPoint = point_position[-1]

secondLastPoint = point_position [-2]

direction = lastPoint - secondLastPoint

lastTangent = normalize(direction) 

 

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 5 of 7
labbejason
in reply to: mjcg91

Yes manually calculating it seems to do the trick! As always thanks so much for the help. Do you suggest using `update_strands_tangents` at all then or just calculate all the tangents yourself?

Message 6 of 7
mjcg91
in reply to: labbejason

That's up to you. IMO the current tangent compound is already quite efficient. Aside from the last tangents, the result would most likely be the same.

Obviously the best would be that update_strands_tangents gets fixed 🙂  

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 7 of 7
labbejason
in reply to: mjcg91

Ok good stuff, I think I'll include it for now unless I start seeing it spit out tangents I don't like.

 


@mjcg91 wrote:

Obviously the best would be that update_strands_tangents gets fixed 🙂  


We owe someone a beer when that happens! :beer_mug::beer_mug::beer_mug:

 

 

 

 

  

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

Post to forums  

Autodesk Design & Make Report