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: 

Procedural partly deforming Pipe

24 REPLIES 24
Reply
Message 1 of 25
Christoph_Schaedl
1809 Views, 24 Replies

Procedural partly deforming Pipe

I have a compound in mind to create partly deforming Pipes.

 

The blue parts should deform and the gray parts should stay in shape.

pipe.JPG

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
24 REPLIES 24
Message 2 of 25

As a starting point i have two compounds here.

The wall compound from Anton Kalchenko.  (Attached)

 

And the strands_deformer from Maxime. 

https://area.autodesk.com/downloads/mjcg-compounds-131/

 

 

Any ideas welcome.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 3 of 25
mjcg91
in reply to: Christoph_Schaedl

For the blue part, you already mentioned the compounds for doing it.

For the rigid parts however, as far as I know there are no compound to do this at the moment, so you'll have to build it yourself. Since you don't want them to deform, then it is relatively easy to do. Instancing could even be used if wanted. 

I'll let you try to make it yourself first, and I'll post the solution another time if you're struggling. Here are some Rebel-pack and MJCG compounds that could be used in order to make the it (in order):

 

  • resample_strands: used to evenly redistribute points along the strands (using it with spatial_resample ON). 

 

  • update_strands_orientation: used to compute the point_orientation data on the strands. 

 

  • get_from_interpolated_array: Definitely the most needed compound here. Use it to sample positions and orientations along the strands. You would use it using normalized_index ON, and feeding an array of float values between 0 and 1. the size of the array would define the number of output objects to instance, and the fraction between 0 and 1 would define where to sample along the strand's length. Also you'd need to use 2 of these. Once to sample the strands point_position, and one to sample the point_orientation.

 

  • fill_interpolated_array: The easy way to fill a float array between 0 and 1 needed prior the above compound.

 

  • construct_points: To creates a point cloud object. Feed in the previously sampled point_position, and then set a geo property called point_orientation using the previously sampled orientations from the strands. 

 

  • built in instancing compounds: There you'd just feed your point cloud object and the meshes you want to instances, and voila.

 

Good luck 🙂

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

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

I have todo some research first. Thats above my head.

I come back if i have something.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 5 of 25

Here is a little update to replicator

Anton Kalchenko
Message 6 of 25
to-to-ro
in reply to: to-to-ro

Add some extra functions

Anton Kalchenko
Message 7 of 25

Thanks for the new version Anton!

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 8 of 25
mjcg91
in reply to: Christoph_Schaedl

Just by following the steps explained above, here is the result:

instance_along_strands.gif

 

And here is the graph with explanations:

instance_along_strands_graph.jpg

 

Try to recreate it yourself, it will help you understand what's going on 😉

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

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

ooh man thats beyond genial!

I try to recreate it now.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 10 of 25

Great i fail on the first node.

I cant find a way to get a maya curve into my input?

Drag and drop like with a cube doesnt work.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 11 of 25
mjcg91
in reply to: Christoph_Schaedl

Curve import is not supported yet.

The workaround is to use a curveInfo not and feed each individual points into the graph. Aslan Jafari made a script for this: https://forums.autodesk.com/t5/bifrost-forum/curve-to-bifrost-board/m-p/8962186/highlight/true#M453

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

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

Thanks Maxime that did the trick. 

I have an issue somewhere. I only get one object at the start of the curve.

 

Could someone help me to debug this graph please.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 13 of 25
mjcg91
in reply to: Christoph_Schaedl

You're almost there ! The "b" value on fill_interpolated array was not set to 1, so all the instance were staying at the start of the strand.

You also want to orient your metal part to face the X axis, and you might want to rebuild the curve before feeding it into bifrost, cause it doesn't look smooth.

 

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

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

Oh yes its working. Im excited!

Thanks Maxime i learned more from this graph as from the last 10 Bifrost tutorials.

 

 

But somehow the green tube needs to be the exact same length as the curve. Take a look at the video.

Is there a way to scale the tube in the graph.

Or create a new tube as long as the curve and with the same spans as the curves CVs.?

 

And the other thing would be to add more metal parts if the curve gets stretched.

 

Cant wait for the next update of Bifrost with some more nodes.

 

 

Cheers

 

 

 

 

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 15 of 25
mjcg91
in reply to: Christoph_Schaedl

You're welcome. Glad you learned something.

Actually there is an option on the strands_deformer compounds. Just disable "Keep Length", and your cylinder will fit the curve regardless of its length. The deformer also has options that might interest you. It's almost the same as Maya's curveWrap deformer so it should be straightforward.

To have more or less metal parts based on spatial distance, There are cleaner ways to do this, but for the sake of simplicity I'll show you this one. The value node defines the number of instance per unit (like 0.5), and it is multiplied by the length of the strands. Then, the result is fed into the fill_interpolated_array node.

 

instance_along_strands_graph2.jpg


And the result using your scene:
instance_along_strands2.gif

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

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

This is really cool Maxime.

Thanks again.

 

I will try to make something different wiht the stuff i learned here.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 17 of 25

inpu.JPGHi Maxime i got it working.

 

But i have some questions. Why i dont have a instance_per_unit node?

And what does the first_in_array and the to_long node do?

 

I cant explode those nodes so i assume they are math nodes.

 

Cheers

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 18 of 25
mjcg91
in reply to: Christoph_Schaedl

first_in_array get the first element of an array. It's the same as get_from_array(0). In this exemple, it's just dealing with a single strands, so there are no loops involved. instead you just get the strand's length value.

 

to_long convert the float value into an integer 64 bits.

 

instance_per_unit is just a value node I renamed.

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

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

Thanks Maxime!

 

I did a littel video review.

https://www.youtube.com/watch?v=rXzqYRhATxs&feature=youtu.be

 

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 20 of 25

And here the Maya file.

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu

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

Post to forums  

Autodesk Design & Make Report