How to export groom with attributes from Houdini to Unreal5?

Hello guys!

I’m new to Unreal and Houdini. I’m trying to export the groom to uneal.

For now, I’m able to export ‘groom_width’, ‘groom_guide’, ‘groom_color’, ‘groom_root_uv’, ‘groom_id’ and ‘groom_group_id’

but I have no idea how to export ‘groom_group_name’ ‘groom_closest_guides’ and ‘groom_guide_weights’.

for the group name, sidefx lab - unreal groom export didn’t work for Unreal 5.1

and for closest guides and gudie weights, I don’t know whitch attributes I should set for.

1 Like

Does anyone know how to solve this problem?

Hi there! Dunno if you solved it but I followed this video: https://www.youtube.com/watch?v=hrDMH25cswg

Hi, Thanks for sharing, I have posted the comment under the video from two years ago

mazi2043
Does anyone know how to export ‘groom_group_name’ ‘groom_closest_guides’ and ‘groom_guide_weights’ attributes to Unreal?

#引导线创建groom_group_id属性
def add_groom_id(self,curve_groups):
    attr_name = 'groom_id'
    for groom_id,curve_group in enumerate(curve_groups,start=1):
        cmds.addAttr(curve_group, longName=attr_name, attributeType='short', keyable=True)
        cmds.addAttr(curve_group, longName='{}_AbcGeomScope'.format(attr_name), dataType='string')
        cmds.setAttr('{}.{}'.format(curve_group, attr_name), groom_id)
        cmds.setAttr('{}.{}_AbcGeomScope'.format(curve_group, attr_name), 'uni', type='string')
        print('{}_groom_id:{}'.format(curve_group,groom_id))

#毛发创建add_groom_closest_guides属性
def add_groom_closest_guides(self,curve_group):
    attr_name = 'groom_closest_guides'
    values = [[0,0,1],[0,0,1]]
    cmds.addAttr(curve_group, longName=attr_name, dataType='vectorArray')
    cmds.addAttr(curve_group, longName='{}_AbcGeomScope'.format(attr_name), dataType='string')
    cmds.addAttr(curve_group, longName='{}_AbcType'.format(attr_name), dataType='string')
    cmds.setAttr('{}.{}'.format(curve_group, attr_name), len(values), *values, type='vectorArray')
    cmds.setAttr('{}.{}_AbcGeomScope'.format(curve_group, attr_name), 'uni', type='string')
    cmds.setAttr('{}.{}_AbcType'.format(curve_group, attr_name), 'vector3', type='string')

#毛发创建groom_guide_weights属性
def add_groom_guide_weights(self,curve_group):
    attr_name = 'groom_guide_weights'
    values = [[1,1,1],[1,1,1]]
    cmds.addAttr(curve_group, longName=attr_name, dataType='vectorArray')
    cmds.addAttr(curve_group, longName='{}_AbcGeomScope'.format(attr_name), dataType='string')
    cmds.addAttr(curve_group, longName='{}_AbcType'.format(attr_name), dataType='string')
    cmds.setAttr('{}.{}'.format(curve_group, attr_name), len(values), *values, type='vectorArray')
    cmds.setAttr('{}.{}_AbcGeomScope'.format(curve_group, attr_name), 'uni', type='string')
    cmds.setAttr('{}.{}_AbcType'.format(curve_group, attr_name), 'vector3', type='string')