How to get colors from mesh?

 
 
 
Posted by:ELmoArchitect
Data created:5 October 2023

Hey i just bought the ornatrix UE version, and i was wondering if there is a way to get the hairstrands to use the main mesh colors?

 

Thanks!

Hello,

By default, the Ornatrix hair added to a polygon mesh will inherits the mesh UVs, so any texture that works on the mesh will work on the hair in the same way.

Isn't this the case for your model?

Jeordanis Figuereo (Product Designer. EPHERE Inc.)

well, when i edit the hairs in design mode, they are some kind of brownish color. When i am finished and convert it to UE native groom it gets dark brown. It doesnt take the color from underlaying mesh, like for example blender does. Sp maybe i missed a section where i can set it to be the same color as underlaying mesh.

Just to be clear, when you say "It doesnt take the color from underlaying mesh", are you referring to the vertex colors of the mesh or the texture/material?

In fact i have both in the fbx file. color texture and Polypaint information from zbrush. So when i convert it to UE groom it is only white. The physics are working and all but only the color remains white. There is probably a seting i need to enable that the new hairs take the color information either from Vertex Color or color texture. Only thing is i have no clue how to do it


Attached Files:
Image 1

Ornatrix UE assigns a basic material to the hair,  which does not use a texture by default. Probably the easiest course of action here would be to duplicate the base mesh's material, change its shading model to "Hair" and assign it to the hair. In case the UV is incorrect with the native UE hair you can try using the "HairAttributes" node inside of the material use its "RootUV" output to get the proper UV instead of the usual Texcoord material node and sample a texture using that.

Since Ornatrix's "editing hair" uses a different shader than Unreal's "native hair" there are two different materials used by Ornatrix by default. In the end, since the end output is inteded to be the native hair the users are expected to author their own hair materials. We can add some more presets in the future though, making this a bit easier.