text: [{"Owner":"jsauca","Date":"2018-12-03T01:44:05Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI would like to randomly clone billboard instances onto any meshes template/surface.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI could not find much example online and I am now facing an issue that I am still not able to solve. \n_lt_/p_gt_\n\n_lt_p_gt_\n\tHere is the playground _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#532G31%2310_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#532G31#10_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks for your help.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2018-12-03T17:00:04Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHello\n_lt_/p_gt_\n\n_lt_p_gt_\n\tso you want to clone a billboard mesh and move it to the surface of a target mesh right?\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIn this case your code is almost fine_co_ you just need to random pick vertices from your mesh_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#532G31#11_qt_ ipsnoembed_eq__qt_false_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#532G31#11_lt_/a_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"jsauca","Date":"2018-12-04T02:05:34Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi @_lt_strong_gt__lt_a data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/4442-deltakosh/?do_eq_hovercard&amp_sm_referrer_eq_http%253A%252F%252Fwww.html5gamedevs.com%252Ftopic%252F41651-how-to-randomly-clone-billboard-instances-onto-a-mesh%252F_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/4442-deltakosh/_qt_ style_eq__qt_background-color_dd_transparent_sm_color_dd_inherit_sm__qt_ title_eq__qt_Go to Deltakosh_t_s profile_qt_ rel_eq__qt__qt__gt_Deltakosh_lt_/a_gt__co__lt_/strong_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks for your help. As per the playground you have provided you can see that the billboards does not really _t_populate_t_ the target mesh. The billboard are placed on the vertices_co_ however the target mesh has really few vertices_co_ hence the generated billboard are duplicating and positioned on top of each others.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI started to look into how to subdivide the target mesh _lt_u_gt_to get additonal vertices_lt_/u_gt_ and get the billboard to be more spead out. However_co_  I have found out that BabylonJS does not provide a way to subdivide a mesh. I am not sure if I am going in the right direction here.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWould they be another way to populate a target mesh with billboarda/sprites ?\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks for your time_co_ much appreciated!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"trevordev","Date":"2018-12-04T17:49:18Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/33423-jsauca/?do_eq_hovercard_qt_ data-mentionid_eq__qt_33423_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/33423-jsauca/_qt_ rel_eq__qt__qt__gt_@jsauca_lt_/a_gt_ do you require them to be placed on vertices? One option might be to find the triangles that make up the mesh and randomly place billboards within those triangles.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"jsauca","Date":"2018-12-04T21:17:29Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/29361-trevordev/?do_eq_hovercard_qt_ data-mentionid_eq__qt_29361_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/29361-trevordev/_qt_ rel_eq__qt__qt__gt_@trevordev_lt_/a_gt__co_ \n_lt_/p_gt_\n\n_lt_p_gt_\n\tNo I do not require the billboards to be placed on vertices_co_ just anywhere &amp_sm_ randomly on the target mesh. I will have a look into how to _lt_span style_eq__qt_background-color_dd_#ffffff_sm_color_dd_#353c41_sm_font-size_dd_14px_sm__qt__gt_find the triangles that make up a mesh_lt_span_gt_ ! Thanks for your help_lt_/span_gt__lt_/span_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"trevordev","Date":"2018-12-04T23:08:22Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/33423-jsauca/?do_eq_hovercard_qt_ data-mentionid_eq__qt_33423_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/33423-jsauca/_qt_ rel_eq__qt__qt__gt_@jsauca_lt_/a_gt_ here_t_s a playground that might help get the triangles _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#KWSAU4%231_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#KWSAU4#1_lt_/a_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]