MJCG compounds

MJCG compounds

mjcg91
Collaborator Collaborator
21,090 Views
61 Replies
Message 1 of 62

MJCG compounds

mjcg91
Collaborator
Collaborator

Hi Everyone,


Since Bifrost is about to release, I thought it would be a good idea to share all the compounds I've made during the beta. Most of them are utility compounds, or related to strands, procedural modeling, etc.

I added the list of all the compounds bellow.

 

User::MJCG::Array
2D_to_1D_array
fill_interpolated
get_near_current_index
interpolate_on_array
pop
transpose_2D_array

 

User::MJCG::Display
draw_point_axis

 

User::MJCG::Geometry::Deformation
deform_by_uv

 

User::MJCG::Geometry::Mesh
create_mesh_from_uv
get_mesh_structure

 

User::MJCG::Geometry::points
create_3D_grid
create_mandelbrot
create_mandelbulb

 

User::MJCG::Geometry::strands
catmull_rom_strand
create_braid_along_strand
create_cardioid
create_circle
create_tube_along_strands
curl_strands
extrude_strands
update_strand_length
update_strand_orientation

 

User::MJCG::Math
angle_between
arc_length
average
distance_to
matrix_lerp
multiply_vector_by_matrix
multiply_vector_by_quaternion
normalize_quaternion
oscillator
quaternion_from_direction_and_upVector
quaternion_from_two_unit_vectors
rescale
resize_vector

 

User::MJCG::Rigging
mjBlendSpace_solver
mjEyelid_solver
mjLookAt_solver

 

Although I've updated it with the last script provided, please note that I did not test them myself as I cannot currently use either Maya or Bifrost from where I am. Hopefully everything works fine !

 

Cheers,
Maxime

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
21,091 Views
61 Replies
Replies (61)
Message 21 of 62

Christoph_Schaedl
Mentor
Mentor

Thanks that great!

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes
Message 22 of 62

Christoph_Schaedl
Mentor
Mentor

I tried the eye_rig sample scene but i looks like its broken.

The eye lids are moved into invinity. I get them back if i disable the skincluster on the head geo.

But the eyelids wont follow at all.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes
Message 23 of 62

mjcg91
Collaborator
Collaborator

Thanks for pointing this out, I haven't opened these scenes in a while.

 

It looks like there is a bug, but its not coming from the compound.  Somehow, the joints are not pulling the output matrix data.

 

If you connect a value node of type "Object" to the eyelid solvers's output, then it will work as expected.

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
0 Likes
Message 24 of 62

mjcg91
Collaborator
Collaborator

MJCG compounds 1.2.0 is here!

I attached a zip file to this post. I wanted to upload it on the compound hub, but the file checked restricts me to do so: 

Invalid archive. Check the contents of your file: Archive has too many folders.


Anyway, here is the release note!

---------------------------------------------
v1.2.0 February 5, 2020

● "extrude_strands":
	● Has now 3 extrusion modes (Ribbon, Tube, Custom).
	● Is now working with multiple strands of variable size.
	● Is now generating clean, normalized UVs.
	● Is faster.
● "create_braids_from_strands": 
	● Is now working with multiple strands of variable size.
	● Fixed a rare glitch when the input strands had strong orientation changes.
	● Is faster.
● "update_strands_orientations": 
	● Has now 4 curve framing algorithms (Frenet, Up Vector, Parallel Transport, Double Reflection).
	● Is now working with multiple strands of variable size.
	● "up_vector" port is now overloadable. You can feed an array of vectors ( has to be the size as strand_count).
	● ability to use up-vectors from a custom property.
	● compute a correct tangent on the last strand points. 
● "catmull_rom_strands" is faster.
● "quaternion_from_direction_and_up_vector" now returns accurate results.
● Fixed node names that caused illegal name warnings.
● Added custom icon.

● New compound: "matrix_scope", a diagnostic tool to visualize transformation matrices as axis.
● New compound: "twist_strands", twists the strands basis vector and orientation along ther lenghts.
● New compound: "set_strands_orientations_from_closest_mesh", orients the strands's points based on a closest mesh's normals.
● New compound: "get_face_vertex_indices", returns the vertex indices associated to a face (given its index).
● New compound: "flatten_2D_array", an improved version of "convert_2D_to_1D_array", with multiple flattening modes.
● New compound: "flatten_3D_array", same as above, but for 3D array.
● New compound: "all_elements_true", returns true if all the elements of a given array<bool> are true.
● New compound: "all_elements_false", returns true if all the elements of a given array<bool> are false. 
● New compound: "get_strands_start_position", returns the first point of each strands.
● New compound: "set_point_ratio", simple set property node.
● New compound: "set_point_tangent", simple set property node.
● New compound: "get_point_binormal", simple get property node.
● New compound: "set_point_binormal", simple set property node.
● New compound: "get_point_orientation", simple get property node.
● New compound: "set_point_orientation", simple set property node.
● New compound: "get_strand_up_vector", simple get property node.
● New compound: "set_strand_up_vector", simple set property node.

● New sample scene: "strands_orientations_from_closest_mesh".

● Deleted "create_tubes_from_strands", now available as a "Tube" extrusion type using the "extrude_strands" compound.
● Deleted "interpolate_on_array",  better compound available in the "rebel-pack" as "get_from_interpolated_array".
● Deleted "update_strands_length", better compound available in the "rebel-pack" (same name).
● Deleted "convert_2D_to_1D_array", replaced by "flatten_2D_array".

 

Please don't hesitate to ask me if you have questions (some .md doc files are still missing). 

Enjoy

 

 

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 25 of 62

juanjo_bernabeu
Enthusiast
Enthusiast
O M G !!!!! This is superb!

Thanks Maxime!
Message 26 of 62

Christoph_Schaedl
Mentor
Mentor

Thanks Maxime thats beyond cool! 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 27 of 62

Christoph_Schaedl
Mentor
Mentor

They are beautiful! 

 

 

MJCG_compounds.jpg

 

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 28 of 62

juanjo_bernabeu
Enthusiast
Enthusiast

Hey Maxime, how can I add more braids instead of three by defualt, I can´t find it.

 

I'm trying to use the node as a cloner  from the main guide to make cool strands with noise, like fibers.

 

Anotación 2020-02-05 122554.png

 

 

 

 

 

0 Likes
Message 29 of 62

mjcg91
Collaborator
Collaborator

If you want to generate strands around the each braid strands, you should use the "create_strands_around_strands" compound from the rebel pack. Just make sure to use "update_strands_ratio" before using it.

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
0 Likes
Message 30 of 62

juanjo_bernabeu
Enthusiast
Enthusiast
Thanks maxime, I forgot completely.:)
0 Likes
Message 31 of 62

Christoph_Schaedl
Mentor
Mentor

Thanks for the answer Maxime. 

But i have no idea what you mean with "connect a value node of type "Object" to the eyelid solvers's output".

I tried to find the right node but there is more than one eyelid solver.

 

Im confused by all this nodes.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes
Message 32 of 62

mjcg91
Collaborator
Collaborator

You have to do it on the 4 eyelid solver graphs. Create a simple "value" node, set its data type to "Object", and plug it to the output port. Repeat for each eyelid graphs. once done, just move a controller and the rig will be behave as expected.

 

You can even delete the port and bifShape once the rig is working, but if you re-open the scene, you'll have do this workaround again. It was working without this workaround in the past, so I expect it will be fixed in a future version. Until then, you have to force the data to pull by having a bifShape pulling from the graph. 

 

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
0 Likes
Message 33 of 62

Christoph_Schaedl
Mentor
Mentor

Thanks got it.

Thats sooo cool!

 

eyelid.jpg

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 34 of 62

mjcg91
Collaborator
Collaborator

Hi guys,

 

here is a new version. It includes a new strands deformer and some bug fixes.

 

v1.3.0 February 11, 2020

● "update_strands_orientations":
	● Lifted Parallel Transport precision to avoid NaN errors in some cases.
	● Added tangents & orientations update options.
	● Double Reflection is now the default framing algorithm.
● "create_braids_from_strands": 
	● Now generates point_ratio.
	● Is faster.
● "create_circle", axis input was not working.

● New compound: "strands_deformer", Deforms geometry along strands. (similar to Maya's curveWrap).
● New compound: "set_strands_up_vector_from_closest_geometry", sets a "strand_up_vector" geo property, based on the closest geometry from the strands's starting points.

● New sample scene: "strands_deformer".

 

curve_wrap2.gif

 

Bifrost team: Please lift the folder count limitation so that I can upload it on the compound hub. 

 

Enjoy

 

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 35 of 62

Christoph_Schaedl
Mentor
Mentor

That does look great. I cant follow you are to fast.

 

Could you tell me what limitation are you talking about?

You cant upload the compounds cause they have to much folder?

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes
Message 36 of 62

jonah.friedman
Community Manager
Community Manager

Incredible work @mjcg91, thank you for your continuing contributions to the community. I'll look into the folder count limitation for you asap. 

Jonah Friedman
Bifrost Product Manager
Message 37 of 62

marcus.nordenstam
Alumni
Alumni

 

Amazing work, Maxime!

 

I'll do my best to work with the people responsible for this forum to see if we can change that limitation.

 

/marcus

 

Message 38 of 62

mjcg91
Collaborator
Collaborator

Here is a minor update, which provides documentation for ALL compounds, a few bug fixes, and a new toy deformer.

---------------------------------------------
v1.3.1 February 24, 2020

● All compounds are now documented.	
● "strands_deformer": 
	● Fixed a bug with "keep_length" where input geometries longer than a strand would shrink.
	● "out_objects" is now a simple 1D array; removed extra output ports.
● "create_braids_from_strands", became extremely slow in 1.3.0, this is now resolved. 
● "set_strands_orientations_from_closest_geometry", modified computational method.
● Fixed "~can not be resolved", "~does not match a registered resolver" errors showing up in the script editor.

● New compound: "spherify_deformer", deforms any point based geometry into a spherical shape
● New compound: "get_point_scale", simple set property node.
● New compound: "set_point_scale", simple set property node.
● New compound: "get_point_length", simple get property node.
● New compound: "set_point_length", simple set property node.
● New compound: "get_strand_length", simple get property node.
● New compound: "set_strand_length", simple set property node.

● New sample scene: "spherify_deformer".

 

spherify.gif

 

Enjoy

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 39 of 62

jonah.friedman
Community Manager
Community Manager

Hi Maxime,

 

The area team has removed the restrictions on folder structure. Can you try to upload again? 

 

Thank you,

Jonah

Jonah Friedman
Bifrost Product Manager
0 Likes
Message 40 of 62

mjcg91
Collaborator
Collaborator

I was able to successful submit the compounds for review. Thanks a lot for forwarding the issue to the AREA team!

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts