General / 16 January 2020

Coiffure: Ribbon tool

Disclaimer: Coiffure need an internet connexion  to be launched. It’s working for Maya 2018 and above


Perpetual License > https://gum.co/vhMyu

Subscription License > https://gum.co/GcyWU

What is a ribbon ?

If you know the Maya Bonus tool package, you might already know that there is a tool called "Ribbon tool" which convert a curve into a customisable polystrip. 

 In my opinion, this is the best way to create hair for game. Because hair is all about tweaking/editing. That's the great power of the ribbons, you can adjust the shape of the card by modifying its parent curve, subdivision can be modified and most important the orientation can be edited.
However, Maya's ribbon are not perfect, which my tool I tried to solve or improve some of those points. 

Orientation: When you create a ribbon it gets its orientation from its profil curve. So The orientation of the ribbons can be quiet deceptive. A part of the ribbon will be perfectly oriented while another half will be totally wrong. And it could easily take hours to fix everything ribbon by ribbon.
That why my first goal was to create a system that orient the ribbon automatically.
So when you will pick your curve you will also need to select a scalp geometry that will orient the ribbon.

The algorithm is not perfect and I would say that only 80 to 90 % are oriented correctly but I think it's still a better starting point. By the way some time the proper orientation is a matter of taste so it's hard to figure this out by an algorithm :D. Latter on you can fix what you dislike with the Orientation parameter of each ribbon


Duplication: When you are happy with a ribbon, it's common to duplicate it and replace it on another area to fill an empty space on a scalp. However if you do this with Maya's Ribbon, you will only duplicate the mesh. It's not that bad and it might be just what you need. But if you want to modify this new card, you will be stuck because none of the previous editing control will be running. When you duplicate a ribbon, all its parameter will be baked.
Well that's not the case with Coiffure's ribbon, they remain interactive so you can edit thing as you wish.




UV correction: If you change the uvs of your haircard, let's say you want to fit the UVs of a ribbon to fit a texture. Well if you decide to change the subdivision afterward, your UVs will be scrambled. Coiffure's ribbon take care of this issue, you have a button that can refresh the UV's and also an option to activate this correction interactively while you change the subdivision parameters. The interactive UV cleanup can take a lot of time if you are doing it over a large selection. 



Edit a ribbon ?

You can edit a ribbon by modifying its parameter on the transform node of the geometry. However for a question of available function and user experience. I would recommend to use the custom ribbon UI. Simply select a ribbon or a parent curve, even a selection of both, when you change the sliders everything will be modified accordingly. 

You can also access to some visibility controls for each ribbon.

Profil ribbon brush

If you don't have curve in your scene you can use this brush to place curve on your scalp. Then you will be able to modify them the same way you would do in Xgen. I won't say it's as powerful as what you can expect from Xgen but it's still, a viable solution. 

To create a ribbon with the brush:

Click on the surface, a curve will appears. If you release the click a ribbon will be created. However if you keep push the left click you can also drag the mouse to rotate the curve on the the X axis, if you also hold the left + middle mouse button it will rotate on the Y axis and if you hold the left + right mouse button it will rotate on the Z axis.

If you press Ctrl + left mouse button you will be able to scale the curve.

Moreover, you can select between 4 profil type to create your curve

Copy ribbon brush

This brush will copy a selected ribbon with all it's parameter and place it on the scalp surface where you clicked. The newly created ribbon remain interactive as any duplication in Coiffure.


To create a ribbon with the brush:

FIrst you need to pick a existing ribbon in the scene.

Click on the surface, a curve will appears. If you release the click a ribbon will be created. However if you keep push the left click you can also drag the mouse to rotate the curve on the the X axis, if you also hold the left + middle mouse button it will rotate on the Y axis and if you hold the left + right mouse button it will rotate on the Z axis.