In order to correctly render with the scene, I reversed the splat rendering and changed the blending. The results look identical but correctly merge with the scene geometry:
Known issues:
I query the gl device directly so it does change the blend/vertex/vbo attributes, so stuff after the splat may create artifacts. So next step would be to correctly using Playcanvas vertex buffers and shaders.
I had this once when I was not copying all vbo data after sorting, not sure if the same case or just my GPU/OS/Browser.
I guess you sort by distance and re-arrange the VBO by shuffling all vertex data around. I recently started to experiment with texelFetch in the vertex shader, suppliying all data as texture, just sort the particle indices (@LeXXik yes indices again ) and fetch vertex attributes, which means much less memory copying from the worker and less cpu/gpu transfer.
The speedup is not great for large scenes, maybe its now vertex shader bound, I have to do some benchmarks.
@TRT Rather than work on separate implementations, it’d be cool to join forces! If you feel that you would like to contribute, check out the Model Viewer codebase:
Things are developing very rapidly, but it’d be great to build on the current momentum around this.
BTW, I noticed the blue splats on iOS too yesterday. Doesn’t happen on my PC. Not entirely sure why that happens. Your suspicions could be correct…
I am looking for some example / documentation on how render a ply (GS model) in my own viewer (playcanvas npm module). I can load my model into playcanvas using the load= query parameter. But I want to know how to do it in javascript on my own app.
I have been trying to reverse engineer the model viewer code, but its getting a bit too complicated. So, before I implement the whole entire model viewer in my app I am looking for some help with exactly what methods I need without extra stuff like the sidebar and icons.
We are very busy adding splat support directly to the engine. We initially added support to model-viewer so we could iterate quickly, but the next minor engine release will have the support instead.
I’m new here. came in searching for a way to present my splatts via the web.
Any news or resources I should check out?
I tried making a PlayCanvas modelviewer project but my .PLY was too big.