I try to add hair geometry to embree (3.20)
-RTCGeometry geom = rtcNewGeometry(*g_device, RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE);
Unfortunetely it crashes when BVH build "embree::avx::UnalignedHeuristicArrayBinningSAH<embree::PrimRef, 32ul>::computeAlignedSpace() at 0x7f82e8211a6a "
I put all vertices in an array. (vertices_radius - vec4 with radius on 4 coord).
In vertices_indices for each fiber i vertices_indices.push_back(ISPCHair(offsets[i], i)); ( offsets[i] - is index position )
rtcSetSharedGeometryBuffer(geom, RTC_BUFFER_TYPE_INDEX, 0, RTC_FORMAT_UINT, &(vertices_indices), 0,
rtcSetSharedGeometryBuffer(geom, RTC_BUFFER_TYPE_VERTEX, 0, RTC_FORMAT_FLOAT4,
&(vertices_radius), 0, sizeof(EmbreeVertex4), vertex_count);
Does fibers have to have the same number of control vertices? Or is it Embree's limitations ?
I followed tutorial. From my understanding i needed to put in vertices_indices a structure 2 unsigned int :
unsigned int vertex;
unsigned int id;
where vertex is position of the vertex in vertices_radius and id is fibers index. Is it right?