原来的实现,文档中是这么写的:
By default, heightfield masks will be converted to weight-blended landscape layers. If you want some of the heightfield masks to be exported to Unreal as non weight-blended layers, you must add a Primitive String attribute to your heightfield, named unreal_landscape_layer_nonweightblended. Set this attribute values to the names of the masks separated by spaces (ie: “mask water debris”).
https://www.sidefx.com/docs/unreal/_landscapes.html
https://www.sidefx.com/docs/unreal/_attributes.html#AttributesInput
但是在实测的过程中,发现插件里面的实现不起作用。
插件实现代码:
主要就是 GetAttributeNames 这个函数得不到正确的返回值。
因此这边采用新的实现方法,实现了新的函数判断是否是NoWeightLayer:
使用的时候的代码,就是将原来的判断条件改掉即可:
要注意的是,这边Houdini的使用方法做了变化,不再是 https://www.sidefx.com/docs/unreal/_attributes.html#AttributesInput 这个表里面标注的样子,改成如下:
Houdini节点实例: