Unreal per instance custom data not working ( 5.0 )

   444   0   0
User Avatar
10 posts
Joined: 9月 2016
Hi, guys!

I try to use unreal per instance custom data attribute to transfer some values from HDA to unreal materials.
Actually HDA just create simple instances on points.
And here is my basic code.

i@id = @ptnum;
@pscale = 1;

v@up = {0,1,0};
v@N = {0,0,1};

s@unreal_output_name    = "geo_" + itoa( i@id );
s@unreal_instance       = chs("ue_inst");
s@unreal_material       = chs("ue_mat");

i@unreal_num_custom_floats = 3;
f@unreal_per_instance_custom_data0 = float ( i@id ) ;
f@unreal_per_instance_custom_data1 = 2.0;
f@unreal_per_instance_custom_data2 =  rand( v@P.y);

With this values I wanna to adjust uv`s in unreal and read texture. Then send it to world offset.
But some how it's not working. And the most interesting that when I use "VERTEX ONTERPOLATOR" node in material and send result to base color everything is fine. Unfortunately there is no option to send data after "vertex interpolator" to world offset.

Thanks for any help.
Edited by alizarin - 2023年1月14日 05:29:21
  • Quick Links