Exporting points to gltf

   984   0   1
User Avatar
Member
1 posts
Joined: July 2018
Offline
I'm trying to export a bunch of points for rendering in webGL but the gltf rop seems to only export poly primitives and ignores points and polyLines. I've currently hacked around this by creating a poly primitive and adding the same point 3 times in a point wrangle like so:

int prm = addprim(0, 'poly');
addvertex(0, prm, @ptnum);
addvertex(0, prm, @ptnum);
addvertex(0, prm, @ptnum);

and then I manually change the primitive mode to 0 in the gltf file (which indicates to render as points):

	"meshes":[
{
"primitives":[
{
"mode": 0 //ADD THIS LINE TO FORCE POINT RENDERING
"attributes":{
"_interpolation":2,
"POSITION":1
},
"indices":0
}
],
"name":"wireMesh"
},

],

But this all seems super crappy, if there are 3 indices in the same primitive does it re-render the same point 3 times? Also it's just a bad workflow.

Is there a normal way to get Houdini to export a bunch of points to a gltf for gl.POINT rendering?
  • Quick Links